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

Method CreateValueSchedule

cpp/src/Node.cpp:2660–2683  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2658// Helper to create a new schedule value and add it to the value store
2659//-----------------------------------------------------------------------------
2660bool Node::CreateValueSchedule
2661(
2662 ValueID::ValueGenre const _genre,
2663 uint8 const _commandClassId,
2664 uint8 const _instance,
2665 uint16 const _valueIndex,
2666 string const& _label,
2667 string const& _units,
2668 bool const _readOnly,
2669 bool const _writeOnly,
2670 uint8 const _pollIntensity
2671)
2672{
2673 ValueSchedule* value = new ValueSchedule( m_homeId, m_nodeId, _genre, _commandClassId, _instance, _valueIndex, _label, _units, _readOnly, _writeOnly, _pollIntensity );
2674 ValueStore* store = GetValueStore();
2675 if( store->AddValue( value ) )
2676 {
2677 value->Release();
2678 return true;
2679 }
2680
2681 value->Release();
2682 return false;
2683}
2684
2685//-----------------------------------------------------------------------------
2686// <Node::CreateValueShort>

Callers 1

CreateVarsMethod · 0.80

Calls 2

AddValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected