When a module needs internal state handling that should not be exposed to other modules, it uses a private channel. Private channels are reserved exclusively for the respective module and are not intended for external use. Otherwise, they are defined, published to, and subscribed to just like public channels. Three modules use one:
- The Cloud module uses
priv_cloud_chanto turn every attempt at connecting into a message, so that it can retry without blocking its state machine. - The FOTA module uses
priv_fota_chanto move the nRF Cloud FOTA library callbacks, which run in the library's own context, into the module's state machine. - The Main module uses
main_priv_chanto move the periodic cloud synchronization from the workqueue that runs the timer into its state machine.
Private channels are defined in the module's .c file and are never declared in a public header, so no other module can publish to them.