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

Method HandleMsg

cpp/src/command_classes/ControllerReplication.cpp:89–122  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

87// Handle a message from the Z-Wave network
88//-----------------------------------------------------------------------------
89bool ControllerReplication::HandleMsg
90(
91 uint8 const* _data,
92 uint32 const _length,
93 uint32 const _instance // = 1
94)
95{
96 // When creating replication messages, use FUNC_ID_ZW_SEND_REPLICATION_DATA instead of FUNC_ID_ZW_SEND_DATA
97 // e.g. Msg* msg = new Msg( "TransferGroup", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_REPLICATION_DATA, true, false );
98
99 switch( _data[0] )
100 {
101 case ControllerReplicationCmd_TransferGroup:
102 {
103 break;
104 }
105 case ControllerReplicationCmd_TransferGroupName:
106 {
107 break;
108 }
109 case ControllerReplicationCmd_TransferScene:
110 {
111 break;
112 }
113 case ControllerReplicationCmd_TransferSceneName:
114 {
115 break;
116 }
117 }
118
119 Msg* msg = new Msg( "ControllerReplicationCmd_Complete", GetNodeId(), REQUEST, FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE, false, false );
120 GetDriver()->SendMsg( msg, Driver::MsgQueue_Command );
121 return true;
122}
123
124//-----------------------------------------------------------------------------
125// <ControllerReplication::SetValue>

Callers

nothing calls this directly

Calls 2

SendMsgMethod · 0.80
GetNodeIdFunction · 0.70

Tested by

no test coverage detected