MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / HandleMsg

Method HandleMsg

cpp/src/command_classes/Hail.cpp:48–67  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Handle a message from the Z-Wave network -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

46// Handle a message from the Z-Wave network
47//-----------------------------------------------------------------------------
48bool Hail::HandleMsg
49(
50 uint8 const* _data,
51 uint32 const _length,
52 uint32 const _instance // = 1
53)
54{
55 if( HailCmd_Hail == _data[0] )
56 {
57 // We have received a hail from the Z-Wave device.
58 // Request an update of the dynamic values.
59 Log::Write( LogLevel_Info, GetNodeId(), "Received Hail command from node %d", GetNodeId() );
60 if( Node* node = GetNodeUnsafe() )
61 {
62 node->RequestDynamicValues();
63 }
64 return true;
65 }
66 return false;
67}
68

Calls 3

WriteFunction · 0.85
RequestDynamicValuesMethod · 0.80
GetNodeIdFunction · 0.70

Tested by

no test coverage detected