upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Types | Public Member Functions

Node management for ozw. More...

Detailed Description

This class is used by ozw to manage valueids for a node (device). No user-serviceable parts inside. It is not exposed to the end user.

Public Types

typedef std::map< int, OpenZWave::ValueID > valueMap_t
 
typedef std::list< OpenZWave::ValueID > valueList_t
 

Public Member Functions

 zwNode (uint32_t homeId, uint8_t nodeId)
 
uint8_t nodeId ()
 
uint32_t homeId ()
 
void addValueID (OpenZWave::ValueID vid)
 
void removeValueID (OpenZWave::ValueID vid)
 
bool indexToValueID (int index, OpenZWave::ValueID *vid)
 
void dumpNode (bool all=false)
 
void updateVIDMap ()
 
void setAutoUpdate (bool enable)
 

Constructor & Destructor Documentation

zwNode ( uint32_t  homeId,
uint8_t  nodeId 
)

zwNode constructor.

Parameters
homeIdthe homeId os the network controller
nodeIdthe node index

Member Function Documentation

uint8_t nodeId ( )

get the nodeId

Returns
The nodeId for this node
uint32_t homeId ( )

get the homeId

Returns
The homeId for this node
void addValueID ( OpenZWave::ValueID  vid)

Add an OpenZWave ValueID and index to the value map, incrementing m_vindex.

Parameters
vidThe OpenZWave ValueID
void removeValueID ( OpenZWave::ValueID  vid)

Remove an OpenZWave ValueID from the value map.

Parameters
vidThe OpenZWave ValueID
bool indexToValueID ( int  index,
OpenZWave::ValueID *  vid 
)

Lookup and return a ValueID corresponding to an index.

Parameters
indexthe index to look up
vidThe pointer to the returned ValueID, if it exists
Returns
true if the index was found, false otherwise
void dumpNode ( bool  all = false)

Dump various information about the ValueIDs stored in this node.

Parameters
alltrue to dump all values, false to limit dumping only 'user' values.
void updateVIDMap ( )

Clear the VID map, sort the list containing registered VID's, and re-create the VID map. The goal is to ensure that the Map is always sorted in acsending order by VID.

void setAutoUpdate ( bool  enable)
inline

When enabled, updateVIDMap() will be called every time a new VID is inserted or removed. This is disabled by default for performance reasons during init() time. Once the driver is initialized, then this option is, by default enabled so that the VID map is always kept in a sorted order.

Parameters
enabletrue to enable, false to disable.

The documentation for this class was generated from the following files: