Skip to content

Commit

Permalink
Make @Fishwaldo happy
Browse files Browse the repository at this point in the history
  • Loading branch information
markruys committed Feb 10, 2021
1 parent ca50eb2 commit 04f3d7a
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions cpp/src/Msg.cpp
Expand Up @@ -51,7 +51,7 @@ namespace OpenZWave
//-----------------------------------------------------------------------------
Msg::Msg(string const& _logText, uint8 _targetNodeId, uint8 const _msgType, uint8 const _function, bool const _bCallbackRequired, bool const _bReplyRequired, // = true
uint8 const _expectedReply, // = 0
uint8 const _expectedCommandClassId // = 0
uint8 const _expectedCommandClassId // = 0
) :
m_logText(_logText), m_bFinal(false), m_bCallbackRequired(_bCallbackRequired), m_callbackId(0), m_expectedReply(0), m_expectedCommandClassId(_expectedCommandClassId), m_length(4), m_targetNodeId(_targetNodeId), m_sendAttempts(0), m_maxSendAttempts( MAX_TRIES), m_instance(1), m_endPoint(0), m_flags(0), m_encrypted(false), m_noncerecvd(false), m_homeId(0), m_resendDuetoCANorNAK(false)
{
Expand Down Expand Up @@ -108,13 +108,13 @@ namespace OpenZWave
// Encapsulate the data inside a Supervision message
//-----------------------------------------------------------------------------
void Msg::SetSupervision(uint8 _supervision_session_id)
{
if (_supervision_session_id != Internal::CC::Supervision::StaticNoSessionId())
{
m_supervision_session_id = _supervision_session_id;
m_flags |= m_Supervision;
}
}
{
if (_supervision_session_id != Internal::CC::Supervision::StaticNoSessionId())
{
m_supervision_session_id = _supervision_session_id;
m_flags |= m_Supervision;
}
}

//-----------------------------------------------------------------------------
// <Msg::Append>
Expand Down Expand Up @@ -305,27 +305,27 @@ namespace OpenZWave
// Encapsulate the data inside a Supervision message
//-----------------------------------------------------------------------------
void Msg::SupervisionEncap()
{
{
char str[256];
if (m_buffer[3] != FUNC_ID_ZW_SEND_DATA)
{
return;
}

for (uint32 i = m_length - 1; i >= 6; --i)
{
m_buffer[i + 4] = m_buffer[i];
}
m_buffer[6] = Internal::CC::Supervision::StaticGetCommandClassId();
m_buffer[7] = Internal::CC::Supervision::SupervisionCmd_Get;
m_buffer[8] = Internal::CC::Supervision::SupervisionMoreStatusUpdates_MoreReports | m_supervision_session_id;
m_buffer[9] = m_buffer[5];
m_buffer[5] += 4;
m_length += 4;

snprintf(str, sizeof(str), "Supervisioned: %s", m_logText.c_str());
m_logText = str;
}
for (uint32 i = m_length - 1; i >= 6; --i)
{
m_buffer[i + 4] = m_buffer[i];
}
m_buffer[6] = Internal::CC::Supervision::StaticGetCommandClassId();
m_buffer[7] = Internal::CC::Supervision::SupervisionCmd_Get;
m_buffer[8] = Internal::CC::Supervision::SupervisionMoreStatusUpdates_MoreReports | m_supervision_session_id;
m_buffer[9] = m_buffer[5];
m_buffer[5] += 4;
m_length += 4;

snprintf(str, sizeof(str), "Supervisioned: %s", m_logText.c_str());
m_logText = str;
}

//-----------------------------------------------------------------------------
// <Node::GetDriver>
Expand Down

0 comments on commit 04f3d7a

Please sign in to comment.