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

Method GetNodeStatistics

cpp/src/Node.cpp:3592–3643  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Return driver statistics -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3590// Return driver statistics
3591//-----------------------------------------------------------------------------
3592void Node::GetNodeStatistics
3593(
3594 NodeData* _data
3595)
3596{
3597 _data->m_sentCnt = m_sentCnt;
3598 _data->m_sentFailed = m_sentFailed;
3599 _data->m_retries = m_retries;
3600 _data->m_receivedCnt = m_receivedCnt;
3601 _data->m_receivedDups = m_receivedDups;
3602 _data->m_receivedUnsolicited = m_receivedUnsolicited;
3603 _data->m_lastRequestRTT = m_lastRequestRTT;
3604 _data->m_lastResponseRTT = m_lastResponseRTT;
3605 _data->m_sentTS = m_sentTS.GetAsString();
3606 _data->m_receivedTS = m_receivedTS.GetAsString();
3607 _data->m_averageRequestRTT = m_averageRequestRTT;
3608 _data->m_averageResponseRTT = m_averageResponseRTT;
3609 _data->m_txStatusReportSupported = m_txStatusReportSupported;
3610 _data->m_txTime = m_txTime;
3611 _data->m_hops = m_hops;
3612 // petergebruers swap src and dst
3613 // petergebruers there are 5 rssi values because there are
3614 // 4 repeaters + 1 sending node
3615 strncpy(_data->m_rssi_1, m_rssi_1, sizeof(_data->m_rssi_1));
3616 strncpy(_data->m_rssi_2, m_rssi_2, sizeof(_data->m_rssi_2));
3617 strncpy(_data->m_rssi_3, m_rssi_3, sizeof(_data->m_rssi_3));
3618 strncpy(_data->m_rssi_4, m_rssi_4, sizeof(_data->m_rssi_4));
3619 strncpy(_data->m_rssi_5, m_rssi_5, sizeof(_data->m_rssi_5));
3620 _data->m_ackChannel = m_ackChannel;
3621 _data->m_lastTxChannel = m_lastTxChannel;
3622 _data->m_routeScheme = m_routeScheme;
3623 _data->m_routeUsed[0] = m_routeUsed[0];
3624 _data->m_routeUsed[1] = m_routeUsed[1];
3625 _data->m_routeUsed[2] = m_routeUsed[2];
3626 _data->m_routeUsed[3] = m_routeUsed[3];
3627 //petergebruers: missed m_routeSpeed
3628 _data->m_routeSpeed= m_routeSpeed;
3629 _data->m_routeTries = m_routeTries;
3630 _data->m_lastFailedLinkFrom = m_lastFailedLinkFrom;
3631 _data->m_lastFailedLinkTo = m_lastFailedLinkTo;
3632
3633 _data->m_quality = m_quality;
3634 memcpy( _data->m_lastReceivedMessage, m_lastReceivedMessage, sizeof(m_lastReceivedMessage) );
3635 for( map<uint8,CommandClass*>::const_iterator it = m_commandClassMap.begin(); it != m_commandClassMap.end(); ++it )
3636 {
3637 CommandClassData ccData;
3638 ccData.m_commandClassId = it->second->GetCommandClassId();
3639 ccData.m_sentCnt = it->second->GetSentCnt();
3640 ccData.m_receivedCnt = it->second->GetReceivedCnt();
3641 _data->m_ccData.push_back( ccData );
3642 }
3643}
3644
3645//-----------------------------------------------------------------------------
3646// <DeviceClass::DeviceClass>

Callers

nothing calls this directly

Calls 4

GetAsStringMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetCommandClassIdMethod · 0.45

Tested by

no test coverage detected