----------------------------------------------------------------------------- Made out-of-line to allow overriding -----------------------------------------------------------------------------
| 842 | // Made out-of-line to allow overriding |
| 843 | //----------------------------------------------------------------------------- |
| 844 | void CommandClass::SetVersion |
| 845 | ( |
| 846 | uint8 const _version |
| 847 | ) |
| 848 | { |
| 849 | if( m_com.GetFlagByte(COMPAT_FLAG_FORCEVERSION) == 0 ) |
| 850 | { |
| 851 | if( _version >= m_dom.GetFlagByte(STATE_FLAG_CCVERSION) ) |
| 852 | { |
| 853 | m_dom.SetFlagByte(STATE_FLAG_CCVERSION, _version); |
| 854 | } |
| 855 | else { |
| 856 | Log::Write( LogLevel_Warning, GetNodeId(), "Trying to Downgrade Command Class %s version from %d to %d. Ignored", GetCommandClassName().c_str(), m_dom.GetFlagByte(STATE_FLAG_CCVERSION), _version); |
| 857 | } |
| 858 | } |
| 859 | else |
| 860 | { |
| 861 | m_dom.SetFlagByte(STATE_FLAG_CCVERSION, m_com.GetFlagByte(COMPAT_FLAG_FORCEVERSION)); |
| 862 | Log::Write( LogLevel_Warning, GetNodeId(), "Attempt to update Command Class %s version from %d to %d. Ignored", GetCommandClassName().c_str(), m_dom.GetFlagByte(STATE_FLAG_CCVERSION), _version); |
| 863 | } |
| 864 | |
| 865 | } |
| 866 | |
| 867 | //----------------------------------------------------------------------------- |
| 868 | // <CommandClass::refreshValuesOnWakeup> |
nothing calls this directly
no test coverage detected