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

Method GetFlagShort

cpp/src/CompatOptionManager.cpp:300–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300uint16_t CompatOptionManager::GetFlagShort
301(
302 CompatOptionFlags flag
303) const
304{
305 if (m_CompatVals.count(flag) == 0) {
306 Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "GetFlagShort: (%s) - Flag %s Not Enabled!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str());
307 return 0;
308 }
309 if (m_CompatVals.at(flag).type != COMPAT_FLAG_TYPE_SHORT)
310 {
311 Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "GetFlagShort: (%s) - Flag %s Not a Short Value!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str());
312 return 0;
313 }
314 return m_CompatVals.at(flag).valShort;
315}
316
317uint32_t CompatOptionManager::GetFlagInt
318(

Callers 5

RequestStateMethod · 0.80
HandleMsgMethod · 0.80
SetValueMethod · 0.80
CreateVarsMethod · 0.80

Calls 4

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

Tested by

no test coverage detected