| 281 | } |
| 282 | |
| 283 | uint8_t CompatOptionManager::GetFlagByte |
| 284 | ( |
| 285 | CompatOptionFlags flag |
| 286 | ) const |
| 287 | { |
| 288 | if (m_CompatVals.count(flag) == 0) { |
| 289 | Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "GetFlagByte: (%s) - Flag %s Not Enabled!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str()); |
| 290 | return 0; |
| 291 | } |
| 292 | if (m_CompatVals.at(flag).type != COMPAT_FLAG_TYPE_BYTE) |
| 293 | { |
| 294 | Log::Write(LogLevel_Warning, m_owner->GetNodeId(), "GetFlagByte: (%s) - Flag %s Not a Byte Value!", m_owner->GetCommandClassName().c_str(), GetFlagName(flag).c_str()); |
| 295 | return 0; |
| 296 | } |
| 297 | return m_CompatVals.at(flag).valByte; |
| 298 | } |
| 299 | |
| 300 | uint16_t CompatOptionManager::GetFlagShort |
| 301 | ( |
no test coverage detected