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

Method SetValueUnits

cpp/src/Manager.cpp:1837–1854  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Sets the units that the value is measured in -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1835// Sets the units that the value is measured in
1836//-----------------------------------------------------------------------------
1837void Manager::SetValueUnits
1838(
1839 ValueID const& _id,
1840 string const& _value
1841)
1842{
1843 if( Driver* driver = GetDriver( _id.GetHomeId() ) )
1844 {
1845 LockGuard LG(driver->m_nodeMutex);
1846 if( Value* value = driver->GetValue( _id ) )
1847 {
1848 value->SetUnits( _value );
1849 value->Release();
1850 } else {
1851 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to SetValueUnits");
1852 }
1853 }
1854}
1855
1856//-----------------------------------------------------------------------------
1857// <Manager::GetValueHelp>

Callers

nothing calls this directly

Calls 3

SetUnitsMethod · 0.80
GetValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected