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

Method CreateValueShort

cpp/src/Node.cpp:2689–2713  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2687// Helper to create a new short value and add it to the value store
2688//-----------------------------------------------------------------------------
2689bool Node::CreateValueShort
2690(
2691 ValueID::ValueGenre const _genre,
2692 uint8 const _commandClassId,
2693 uint8 const _instance,
2694 uint16 const _valueIndex,
2695 string const& _label,
2696 string const& _units,
2697 bool const _readOnly,
2698 bool const _writeOnly,
2699 int16 const _default,
2700 uint8 const _pollIntensity
2701)
2702{
2703 ValueShort* value = new ValueShort( m_homeId, m_nodeId, _genre, _commandClassId, _instance, _valueIndex, _label, _units, _readOnly, _writeOnly, _default, _pollIntensity );
2704 ValueStore* store = GetValueStore();
2705 if( store->AddValue( value ) )
2706 {
2707 value->Release();
2708 return true;
2709 }
2710
2711 value->Release();
2712 return false;
2713}
2714
2715//-----------------------------------------------------------------------------
2716// <Node::CreateValueString>

Callers 6

CreateVarsMethod · 0.80
HandleMsgMethod · 0.80
CreateVarsMethod · 0.80
CreateVarsMethod · 0.80
HandleMsgMethod · 0.80
CreateVarsMethod · 0.80

Calls 2

AddValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected