----------------------------------------------------------------------------- Handle a message from the Z-Wave network -----------------------------------------------------------------------------
| 254 | // Handle a message from the Z-Wave network |
| 255 | //----------------------------------------------------------------------------- |
| 256 | void MultiInstance::HandleMultiInstanceEncap |
| 257 | ( |
| 258 | uint8 const* _data, |
| 259 | uint32 const _length |
| 260 | ) |
| 261 | { |
| 262 | if( Node* node = GetNodeUnsafe() ) |
| 263 | { |
| 264 | uint8 instance = _data[1]; |
| 265 | if( GetVersion() > 1 ) |
| 266 | { |
| 267 | instance &= 0x7f; |
| 268 | } |
| 269 | uint8 commandClassId = _data[2]; |
| 270 | |
| 271 | if( CommandClass* pCommandClass = node->GetCommandClass( commandClassId ) ) |
| 272 | { |
| 273 | Log::Write( LogLevel_Info, GetNodeId(), "Received a MultiInstanceEncap from node %d, instance %d, for Command Class %s", GetNodeId(), instance, pCommandClass->GetCommandClassName().c_str() ); |
| 274 | pCommandClass->ReceivedCntIncr(); |
| 275 | pCommandClass->HandleMsg( &_data[3], _length-3, instance ); |
| 276 | } |
| 277 | else |
| 278 | { |
| 279 | Log::Write( LogLevel_Warning, GetNodeId(), "Received invalid MultiInstanceReport from node %d. Attempting to process as MultiChannel", GetNodeId()); |
| 280 | HandleMultiChannelEncap( _data, _length ); |
| 281 | } |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | //----------------------------------------------------------------------------- |
| 286 | // <MultiInstance::HandleMultiChannelEndPointReport> |
nothing calls this directly
no test coverage detected