Cpc_system_primary#
CPC System Endpoint Primary.
Modules#
sl_cpc_system_event_listener_t
Functions#
Function Documentation#
sl_cpc_system_unsolicited_last_status_callback#
void sl_cpc_system_unsolicited_last_status_callback (sl_cpc_system_status_t status)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_cpc_system_status_t | [in] | status | The unsolicited PROP_LAST_STATUS value. |
Callback for when receiving an unsolicited PROP_LAST_STATUS.
This is a weak stub meant to be re-implemented as a strong function by the user in order to act upon unsolicited PROP_LAST_STATUS.
Note
When the PRIMARY issues a property-get/set command, the SECONDARY responds with the value requested. Upon receiving this reply, the PRIMARY executes the callback that was registered when issuing the command. If the PRIMARY receives a PROPERTY-IS command with PROP_LAST_STATUS property when no callback is registered (ie, the PRIMARY didn't asked anything), then this callback type will be called if registered.
The callback when an unsolicited last status is received
sl_cpc_system_event_listener_init#
void sl_cpc_system_event_listener_init (sl_cpc_system_event_listener_t * listener)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_cpc_system_event_listener_t * | [in] | listener |
Initialize an event listener
Initialize an event listener. Basically set all fields to zero, that way the structure can be expanded but new attributes will be initialized to zero, preventing CPC core from calling invalid function pointers.
sl_cpc_system_event_listener_subscribe#
sl_status_t sl_cpc_system_event_listener_subscribe (sl_cpc_system_event_listener_t * listener)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_cpc_system_event_listener_t * | [in] | listener |
Add an event listener that will be called when the secondary events occur.
Add a listener to the global list of event listeners
sl_cpc_system_event_listener_unsubscribe#
sl_status_t sl_cpc_system_event_listener_unsubscribe (sl_cpc_system_event_listener_t * listener)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_cpc_system_event_listener_t * | [in] | listener |
Remove an event listener that was previously added.
Remove a listener from the global list of event listeners. sl_slist_remove asserts if the node to be removed is not present in the list.