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

Method IsValueReadOnly

cpp/src/Manager.cpp:1981–2000  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Test whether the value is read-only -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1979// Test whether the value is read-only
1980//-----------------------------------------------------------------------------
1981bool Manager::IsValueReadOnly
1982(
1983 ValueID const& _id
1984)
1985{
1986 bool res = false;
1987 if( Driver* driver = GetDriver( _id.GetHomeId() ) )
1988 {
1989 LockGuard LG(driver->m_nodeMutex);
1990 if( Value* value = driver->GetValue( _id ) )
1991 {
1992 res = value->IsReadOnly();
1993 value->Release();
1994 } else {
1995 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to IsValueReadOnly");
1996 }
1997 }
1998
1999 return res;
2000}
2001
2002//-----------------------------------------------------------------------------
2003// <Manager::IsValueWriteOnly>

Callers

nothing calls this directly

Calls 3

IsReadOnlyMethod · 0.80
GetValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected