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

Method GetValueMax

cpp/src/Manager.cpp:1956–1975  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Gets the maximum for a value -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1954// Gets the maximum for a value
1955//-----------------------------------------------------------------------------
1956int32 Manager::GetValueMax
1957(
1958 ValueID const& _id
1959)
1960{
1961 int32 limit = 0;
1962 if( Driver* driver = GetDriver( _id.GetHomeId() ) )
1963 {
1964 LockGuard LG(driver->m_nodeMutex);
1965 if( Value* value = driver->GetValue( _id ) )
1966 {
1967 limit = value->GetMax();
1968 value->Release();
1969 } else {
1970 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to GetValueMax");
1971 }
1972 }
1973
1974 return limit;
1975}
1976
1977//-----------------------------------------------------------------------------
1978// <Manager::IsValueReadOnly>

Callers 1

mainFunction · 0.80

Calls 3

GetMaxMethod · 0.80
GetValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected