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

Method SetFlagInt

cpp/src/CompatOptionManager.cpp:394–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394bool CompatOptionManager::SetFlagInt
395(
396 CompatOptionFlags flag,
397 uint32_t value
398)
399{
400 if (m_CompatVals.count(flag) == 0) {
401 Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "SetFlagInt: (%s) - Flag %s Not Enabled!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str());
402 return false;
403 }
404 if (m_CompatVals.at(flag).type != COMPAT_FLAG_TYPE_INT)
405 {
406 Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "SetFlagInt: (%s) - Flag %s Not a Int Value!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str());
407 return false;
408 }
409 m_CompatVals.at(flag).valInt = value;
410 m_CompatVals.at(flag).changed = true;
411 return true;
412}
413
414string CompatOptionManager::GetFlagName
415(

Callers 1

SetValueMethod · 0.80

Calls 4

WriteFunction · 0.85
GetNodeIdMethod · 0.80
c_strMethod · 0.45
GetCommandClassNameMethod · 0.45

Tested by

no test coverage detected