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

Method GetAsString

cpp/src/Msg.cpp:237–262  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Create a string containing the raw data -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

235// Create a string containing the raw data
236//-----------------------------------------------------------------------------
237string Msg::GetAsString()
238{
239 string str = m_logText;
240
241 char byteStr[16];
242 if( m_targetNodeId != 0xff )
243 {
244 snprintf( byteStr, sizeof(byteStr), " (Node=%d)", m_targetNodeId );
245 str += byteStr;
246 }
247
248 str += ": ";
249
250 for( uint32 i=0; i<m_length; ++i )
251 {
252 if( i )
253 {
254 str += ", ";
255 }
256
257 snprintf( byteStr, sizeof(byteStr), "0x%.2x", m_buffer[i] );
258 str += byteStr;
259 }
260
261 return str;
262}
263
264//-----------------------------------------------------------------------------
265// <Msg::MultiEncap>

Callers 7

GetValueAsStringMethod · 0.45
SendMsgMethod · 0.45
WriteMsgMethod · 0.45
NotifyWatchersMethod · 0.45
SendEncryptedMessageMethod · 0.45
GetNodeStatisticsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected