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

Method CreateValueButton

cpp/src/Node.cpp:2482–2502  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Helper to create a new trigger value and add it to the value store -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2480// Helper to create a new trigger value and add it to the value store
2481//-----------------------------------------------------------------------------
2482bool Node::CreateValueButton
2483(
2484 ValueID::ValueGenre const _genre,
2485 uint8 const _commandClassId,
2486 uint8 const _instance,
2487 uint16 const _valueIndex,
2488 string const& _label,
2489 uint8 const _pollIntensity
2490)
2491{
2492 ValueButton* value = new ValueButton( m_homeId, m_nodeId, _genre, _commandClassId, _instance, _valueIndex, _label, _pollIntensity );
2493 ValueStore* store = GetValueStore();
2494 if( store->AddValue( value ) )
2495 {
2496 value->Release();
2497 return true;
2498 }
2499
2500 value->Release();
2501 return false;
2502}
2503
2504//-----------------------------------------------------------------------------
2505// <Node::CreateValueByte>

Callers 7

HandleSupportedReportMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80

Calls 2

AddValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected