Command Publisher module takes care of publishing incoming packages.
This module is part of Security Discovery feature
2018 Silicon Laboratories Inc.
Macros#
Typedefs#
Handle to the Cmd Publisher "object".
Callback function triggered by ZAF_CP_CommandPublish, when corresponding subscriber gets notified.
Functions#
Initializes Command publisher module.
Subscribe a function with pHandle to all command classes.
Subscribe a function with pHandle to an entire command class.
Subscribe a function with pHandle to a specific command of the given command class.
Unsubscribe from previously subscribed handle.
Unsubscribe from previously subscribed command class.
Unsubscribe from previously subscribed command.
Informs all relevant subscribers about incoming frame.
Macro Definition Documentation#
ZAF_CP_HEADER_SIZE#
#define ZAF_CP_HEADER_SIZEValue:
4
22
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_ELEMENT_SIZE#
#define ZAF_CP_ELEMENT_SIZEValue:
16
23
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_STORAGE_SIZE#
#define ZAF_CP_STORAGE_SIZEValue:
(num_elements)
26
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_STORAGE#
#define ZAF_CP_STORAGEValue:
(name, num_elements)
29
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
Typedef Documentation#
CP_Handle_t#
typedef void* CP_Handle_t
Handle to the Cmd Publisher "object".
32
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
zaf_cp_subscriberFunction_t#
typedef void(* zaf_cp_subscriberFunction_t) (void *pSubscriberContext, void *pRxPackage) )(void *pSubscriberContext, void *pRxPackage)
Callback function triggered by ZAF_CP_CommandPublish, when corresponding subscriber gets notified.
N/A | pSubscriberContext | Subscribers context to be passed to subscriber |
N/A | pRxPackage | Received Frame |
40
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
Function Documentation#
ZAF_CP_Init#
CP_Handle_t ZAF_CP_Init (void * pStorage, uint8_t numSubscribers)
Initializes Command publisher module.
N/A | pStorage | Stores the subscribers list. Should be allocated with ZAF_CP_STORAGE |
N/A | numSubscribers | Number of subscribers |
Note
ZAF_CP_STORAGE must be called before this
Returns
handle to the initialized content
50
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_SubscribeToAll#
bool ZAF_CP_SubscribeToAll (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction)
Subscribe a function with pHandle to all command classes.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
Returns
true if new subscription went OK, false if not
60
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_SubscribeToCC#
bool ZAF_CP_SubscribeToCC (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction, uint16_t CmdClass)
Subscribe a function with pHandle to an entire command class.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
N/A | CmdClass | Command Class to subscribe to |
Returns
true if new subscription went OK, false if not
73
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_SubscribeToCmd#
bool ZAF_CP_SubscribeToCmd (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction, uint16_t CmdClass, uint8_t Cmd)
Subscribe a function with pHandle to a specific command of the given command class.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
N/A | CmdClass | Command Class to subscribe to |
N/A | Cmd | Specific command to subscribe to |
Returns
true if new subscription went OK, false if not
88
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_UnsubscribeToAll#
bool ZAF_CP_UnsubscribeToAll (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction)
Unsubscribe from previously subscribed handle.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
Returns
true if unsubscribing went OK, false if not
102
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_UnsubscribeToCC#
bool ZAF_CP_UnsubscribeToCC (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction, uint16_t CmdClass)
Unsubscribe from previously subscribed command class.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
N/A | CmdClass | Command Class to unsubscribe from |
Returns
true if unsubscribing went OK, false if not
115
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_UnsubscribeToCmd#
bool ZAF_CP_UnsubscribeToCmd (CP_Handle_t handle, void * pSubscriberContext, zaf_cp_subscriberFunction_t pFunction, uint16_t CmdClass, uint8_t Cmd)
Unsubscribe from previously subscribed command.
N/A | handle | Handle to Cmd Publisher module |
N/A | pSubscriberContext | Context of the subscriber |
N/A | pFunction | Subscribers callback function |
N/A | CmdClass | Command Class to unsubscribe from |
N/A | Cmd | Specific command to unsubscribe from |
Returns
true if unsubscribing went OK, false if not
129
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h
ZAF_CP_CommandPublish#
void ZAF_CP_CommandPublish (CP_Handle_t handle, void * pRxPackage)
Informs all relevant subscribers about incoming frame.
N/A | handle | Handle to Cmd Publisher module |
N/A | pRxPackage | Received frame. It will be passed to subscribers |
Based on incoming frame, it will decide which type of subscribers should be notified It should be called when the receive queue is emptied
143
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h