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

Method SetByValue

cpp/src/value_classes/ValueList.cpp:255–271  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Set a new value in the device, selected by item index -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

253// Set a new value in the device, selected by item index
254//-----------------------------------------------------------------------------
255bool ValueList::SetByValue
256(
257 int32 const _value
258)
259{
260 // create a temporary copy of this value to be submitted to the Set() call and set its value to the function param
261 ValueList* tempValue = new ValueList( *this );
262 tempValue->m_valueIdx = _value;
263
264 // Set the value in the device.
265 bool ret = ((Value*)tempValue)->Set();
266
267 // clean up the temporary value
268 delete tempValue;
269
270 return ret;
271}
272
273//-----------------------------------------------------------------------------
274// <ValueList::SetByLabel>

Callers 1

SetConfigParamMethod · 0.80

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected