Z-Wave Protocol Controller Reference
ZPC Utilities

Various conversion functions and macros for ZPC. More...

Collaboration diagram for ZPC Utilities:

Modules

 ZPC Hex to Int conversion utility
 hex to int convert functions and macros for ZPC
 
 Z-Wave UNID
 UNID mapping functions.
 
 Z-Wave Utilities
 

Macros

#define DSK_STR_LEN    (sizeof("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx") + 1)
 

Functions

sl_status_t zpc_converters_dsk_str_to_internal (const char *src, zwave_dsk_t dst)
 Convert DSK string to uint8_t array representation. More...
 
sl_status_t zpc_converters_dsk_to_str (const zwave_dsk_t src, char *dst, size_t dst_max_len)
 Convert a zwave_dsk_t to a String representation. More...
 

Detailed Description

Various conversion functions and macros for ZPC.

Macro Definition Documentation

◆ DSK_STR_LEN

#define DSK_STR_LEN    (sizeof("xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx") + 1)

Function Documentation

◆ zpc_converters_dsk_str_to_internal()

sl_status_t zpc_converters_dsk_str_to_internal ( const char *  src,
zwave_dsk_t  dst 
)

Convert DSK string to uint8_t array representation.

Parameters
srcDSK string formatted as "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" it doesn't need to 5 characters per entry, i.e., "1-12345-33-23423-0-1-3-4" is supported MUST BE ZERO TERMINATED
dstdestination buffer to store zwave_dsk_t in
Returns
sl_status_t SL_STATUS_OK if success

◆ zpc_converters_dsk_to_str()

sl_status_t zpc_converters_dsk_to_str ( const zwave_dsk_t  src,
char *  dst,
size_t  dst_max_len 
)

Convert a zwave_dsk_t to a String representation.

String representation in format "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx" as decimal numbers

Parameters
srcDSK to write to string
dstBuffer to store string representation in
dst_max_lenSize of the dst buffer to prevent overflow, shall be >= DSK_STR_LEN
Returns
SL_STATUS_OK for success
SL_STATUS_WOULD_OVERFLOW if char buffer is too small
Here is the caller graph for this function: