This is a simple example to show you the C coding workflow. We will send a broadcast ping message to all five LED modules so that they blink their red indicator LED. The message will be repeated every 500ms.
In FrontEnd task in main.c, write the following before the infinite loop:
#if _module == 1 BOS.response = BOS_RESPONSE_NONE; #endif
And this inside the loop:
#if _module == 1 SendMessageToModule(BOS_BROADCAST, CODE_ping, 0); Delay_ms(500); #endif
Recompile Module 1 and load. Note that the ping message takes zero parameters. The destination module ID (first parameter for SendMessageToModule API) is replaced with BOS_BROADCAST constant to broadcast the message everywhere.
For more information, about implementing these APIs check our BOS documentation.