Command Publisher module takes care of publishing incoming packages.

This module is part of Security Discovery feature

  • 2018 Silicon Laboratories Inc.

Macros#

#define
ZAF_CP_STORAGE_SIZE (num_elements)
#define
ZAF_CP_STORAGE (name, num_elements)

Typedefs#

typedef void *

Handle to the Cmd Publisher "object".

typedef void(*
zaf_cp_subscriberFunction_t)(void *pSubscriberContext, void *pRxPackage)

Callback function triggered by ZAF_CP_CommandPublish, when corresponding subscriber gets notified.

Functions#

ZAF_CP_Init(void *pStorage, uint8_t numSubscribers)

Initializes Command publisher module.

bool
ZAF_CP_SubscribeToAll(CP_Handle_t handle, void *pSubscriberContext, zaf_cp_subscriberFunction_t pFunction)

Subscribe a function with pHandle to all command classes.

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.

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.

bool
ZAF_CP_UnsubscribeToAll(CP_Handle_t handle, void *pSubscriberContext, zaf_cp_subscriberFunction_t pFunction)

Unsubscribe from previously subscribed handle.

bool
ZAF_CP_UnsubscribeToCC(CP_Handle_t handle, void *pSubscriberContext, zaf_cp_subscriberFunction_t pFunction, uint16_t CmdClass)

Unsubscribe from previously subscribed command class.

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.

void
ZAF_CP_CommandPublish(CP_Handle_t handle, void *pRxPackage)

Informs all relevant subscribers about incoming frame.

Macro Definition Documentation#

ZAF_CP_HEADER_SIZE#

#define ZAF_CP_HEADER_SIZE
Value:
4

Definition at line 22 of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h

ZAF_CP_ELEMENT_SIZE#

#define ZAF_CP_ELEMENT_SIZE
Value:
16

Definition at line 23 of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h

ZAF_CP_STORAGE_SIZE#

#define ZAF_CP_STORAGE_SIZE
Value:
(num_elements)

Definition at line 26 of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h

ZAF_CP_STORAGE#

#define ZAF_CP_STORAGE
Value:
(name, num_elements)

Definition at line 29 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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".


Definition at line 32 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/ApSubscriberContext

Subscribers context to be passed to subscriber

N/ApRxPackage

Received Frame


Definition at line 40 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/ApStorage

Stores the subscribers list. Should be allocated with ZAF_CP_STORAGE

N/AnumSubscribers

Number of subscribers

Note

  • ZAF_CP_STORAGE must be called before this

Returns

  • handle to the initialized content


Definition at line 50 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

Returns

  • true if new subscription went OK, false if not


Definition at line 60 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

N/ACmdClass

Command Class to subscribe to

Returns

  • true if new subscription went OK, false if not


Definition at line 73 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

N/ACmdClass

Command Class to subscribe to

N/ACmd

Specific command to subscribe to

Returns

  • true if new subscription went OK, false if not


Definition at line 88 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

Returns

  • true if unsubscribing went OK, false if not


Definition at line 102 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

N/ACmdClass

Command Class to unsubscribe from

Returns

  • true if unsubscribing went OK, false if not


Definition at line 115 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApSubscriberContext

Context of the subscriber

N/ApFunction

Subscribers callback function

N/ACmdClass

Command Class to unsubscribe from

N/ACmd

Specific command to unsubscribe from

Returns

  • true if unsubscribing went OK, false if not


Definition at line 129 of file /mnt/raid/workspaces/ws.6QOxxjIBR/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.

Parameters
N/Ahandle

Handle to Cmd Publisher module

N/ApRxPackage

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


Definition at line 143 of file /mnt/raid/workspaces/ws.6QOxxjIBR/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_CmdPublisher.h