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

Method SetByLabel

cpp/src/value_classes/ValueList.cpp:277–291  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

275// Set a new value in the device, selected by item label
276//-----------------------------------------------------------------------------
277bool ValueList::SetByLabel
278(
279 string const& _label
280)
281{
282 // Ensure the value is one of the options
283 int index = GetItemIdxByLabel( _label );
284 if( index < 0 )
285 {
286 // Item not found
287 return false;
288 }
289
290 return SetByValue( index );
291}
292
293//-----------------------------------------------------------------------------
294// <ValueList::OnValueRefreshed>

Callers 2

SetValueListSelectionMethod · 0.80
SetValueMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected