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

Method IsValueWriteOnly

cpp/src/Manager.cpp:2006–2025  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Test whether the value is write-only -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2004// Test whether the value is write-only
2005//-----------------------------------------------------------------------------
2006bool Manager::IsValueWriteOnly
2007(
2008 ValueID const& _id
2009)
2010{
2011 bool res = false;
2012 if( Driver* driver = GetDriver( _id.GetHomeId() ) )
2013 {
2014 LockGuard LG(driver->m_nodeMutex);
2015 if( Value* value = driver->GetValue( _id ) )
2016 {
2017 res = value->IsWriteOnly();
2018 value->Release();
2019 } else {
2020 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to IsValueWriteOnly");
2021 }
2022 }
2023
2024 return res;
2025}
2026
2027//-----------------------------------------------------------------------------
2028// <Manager::IsValueSet>

Callers

nothing calls this directly

Calls 3

IsWriteOnlyMethod · 0.80
GetValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected