fsCommBusRegister

The fsCommBusRegister is used to register a communication event.

 

Syntax
bool fsCommBusRegister(
    const char* eventName,
    fsCommBusWasmCallback callback,
    void* ctx
    );

 

Members
Parameters Description
eventName The name of the event that you want to register.
callback Callback to use if the event is received.
ctx

Context given when the event is registered. The pointer will be sent back when the event is called

Default value is nullptr.


Return Values

The function returns False if something is wrong with the arguments and/or the registration did not happen, otherwise it returns True.

 

Remarks

It should be noted that when you register an event with this function, you msut give an eventName, callback and context. However, if in the same module you call this function again with the same eventName, the callback and context, it will not register the event a second time. If you change any of the three parameters, for example use a different eventName, then the registration will work.

 

See Also