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

Method GetValueListValues

cpp/src/Manager.cpp:2661–2691  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Gets the list of values from a list value -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2659// Gets the list of values from a list value
2660//-----------------------------------------------------------------------------
2661bool Manager::GetValueListValues
2662(
2663 ValueID const& _id,
2664 vector<int32>* o_value
2665)
2666{
2667 bool res = false;
2668
2669 if( o_value )
2670 {
2671 if( ValueID::ValueType_List == _id.GetType() )
2672 {
2673 if( Driver* driver = GetDriver( _id.GetHomeId() ) )
2674 {
2675 LockGuard LG(driver->m_nodeMutex);
2676 if( ValueList* value = static_cast<ValueList*>( driver->GetValue( _id ) ) )
2677 {
2678 o_value->clear();
2679 res = value->GetItemValues( o_value );
2680 value->Release();
2681 } else {
2682 OZW_ERROR(OZWException::OZWEXCEPTION_INVALID_VALUEID, "Invalid ValueID passed to GetValueListValues");
2683 }
2684 }
2685 } else {
2686 OZW_ERROR(OZWException::OZWEXCEPTION_CANNOT_CONVERT_VALUEID, "ValueID passed to GetValueListValues is not a List Value");
2687 }
2688 }
2689
2690 return res;
2691}
2692
2693
2694//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

clearMethod · 0.80
GetItemValuesMethod · 0.80
GetValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected