Z-Wave Protocol Controller Reference
Z-Wave UNID

UNID mapping functions. More...

Collaboration diagram for Z-Wave UNID:

Typedefs

typedef char unid_t[17]
 

Functions

void zwave_unid_from_node_id (zwave_node_id_t node_id, unid_t unid)
 Form a UNID. More...
 
sl_status_t zwave_unid_to_node_id (const unid_t unid, zwave_node_id_t *node_id)
 Convert a UNID to a node ID. More...
 
sl_status_t zwave_unid_to_home_id (const unid_t unid, zwave_home_id_t *home_id)
 Convert a UNID to a Home ID. More...
 
void zwave_unid_set_home_id (zwave_home_id_t home_id)
 Set the Z-Wave home ID to create UNIDs from. More...
 

Detailed Description

UNID mapping functions.

This module provides utility function for constructing and parsing Unique Node IDentifiers(UNID)

Typedef Documentation

◆ unid_t

typedef char unid_t[17]

Function Documentation

◆ zwave_unid_from_node_id()

void zwave_unid_from_node_id ( zwave_node_id_t  node_id,
unid_t  unid 
)

Form a UNID.

This function creates a UNID from the provided node id and the current home ID.

Parameters
node_idNode ID to form the UNID from
unidThe UNID output
Here is the caller graph for this function:

◆ zwave_unid_set_home_id()

void zwave_unid_set_home_id ( zwave_home_id_t  home_id)

Set the Z-Wave home ID to create UNIDs from.

Deprecated:
This function may be deprecated when we start using the attribute system.
Parameters
home_idhome id

◆ zwave_unid_to_home_id()

sl_status_t zwave_unid_to_home_id ( const unid_t  unid,
zwave_home_id_t home_id 
)

Convert a UNID to a Home ID.

Provided a UNID, this function return the detected Home ID.

Parameters
unidUNID to parse
home_idHomeID output, must be a valid pointer.
Returns
sl_status_t
  • SL_STATUS_OK if HomeID could be parsed
  • SL_STATUS_INVALID_PARAMETER format of the UNID could not be parsed correctly.
Here is the caller graph for this function:

◆ zwave_unid_to_node_id()

sl_status_t zwave_unid_to_node_id ( const unid_t  unid,
zwave_node_id_t node_id 
)

Convert a UNID to a node ID.

Provided a UNID, this function returns the node ID.

Parameters
unidUNID to parse
node_idNode ID output, which must be a valid pointer.
Returns
sl_status_t
  • SL_STATUS_OK if node id could be mapped
  • SL_STATUS_INVALID_PARAMETER format of the UNID could not be passed.
  • SL_STATUS_INVALID_KEY home id does not match the current home id
  • SL_STATUS_INVALID_RANGE Node id is not in a valid range.

added for unit test cases, in a normal operation the returned node_id shall not be used.

Here is the caller graph for this function: