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

Method CreateValueRaw

cpp/src/Node.cpp:2629–2654  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2627// Helper to create a new raw value and add it to the value store
2628//-----------------------------------------------------------------------------
2629bool Node::CreateValueRaw
2630(
2631 ValueID::ValueGenre const _genre,
2632 uint8 const _commandClassId,
2633 uint8 const _instance,
2634 uint16 const _valueIndex,
2635 string const& _label,
2636 string const& _units,
2637 bool const _readOnly,
2638 bool const _writeOnly,
2639 uint8 const* _default,
2640 uint8 const _length,
2641 uint8 const _pollIntensity
2642)
2643{
2644 ValueRaw* value = new ValueRaw( m_homeId, m_nodeId, _genre, _commandClassId, _instance, _valueIndex, _label, _units, _readOnly, _writeOnly, _default, _length, _pollIntensity );
2645 ValueStore* store = GetValueStore();
2646 if( store->AddValue( value ) )
2647 {
2648 value->Release();
2649 return true;
2650 }
2651
2652 value->Release();
2653 return false;
2654}
2655
2656//-----------------------------------------------------------------------------
2657// <Node::CreateValueSchedule>

Callers 1

HandleMsgMethod · 0.80

Calls 2

AddValueMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected