libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::DeviceDescription::Parameter Class Reference

#include <Parameter.h>

Inheritance diagram for BaseLib::DeviceDescription::Parameter:

Classes

class  Packet
 

Public Member Functions

 Parameter (BaseLib::SharedObjects *baseLib, const PParameterGroup &parent)
 
virtual ~Parameter ()
 
void parseXml (xml_node *node)
 
PVariable convertFromPacket (const std::vector< uint8_t > &data, const Role &role, bool isEvent)
 Converts binary data of a packet received by a physical interface to a RPC variable. More...
 
void convertToPacket (const PVariable &value, const Role &role, std::vector< uint8_t > &convertedValue)
 Converts a RPC variable to binary data to send it over a physical interface. More...
 
void convertToPacket (const std::string &value, const Role &role, std::vector< uint8_t > &convertedValue)
 Tries to convert a string value to a binary data to send it over a physical interface. More...
 
void adjustBitPosition (std::vector< uint8_t > &data)
 
PParameterGroup parent ()
 

Public Attributes

std::string id
 
bool readable = true
 
bool writeable = true
 
bool readOnInit = false
 
bool transmitted = true
 
bool addonWriteable = true
 Makes readonly variables writeable for addons (i. More...
 
bool password = false
 
bool visible = true
 
bool internal = false
 
bool parameterGroupSelector = false
 
bool service = false
 
bool serviceInverted = false
 
bool sticky = false
 
bool transform = false
 
bool isSignedSet = false
 
bool isSigned = false
 
std::string control
 UI control to use for displaying this parameter. More...
 
std::string unit
 The unit of the variable like "°C" or "km/h". More...
 
UnitCode unit_code = UnitCode::kUndefined
 The unit code (we use the BACnet codes) More...
 
bool mandatory = false
 
std::string formFieldType
 
int32_t formPosition = -1
 
std::string metadata
 
bool resetAfterRestart = false
 
int32_t priority = -1
 
bool ccu2Visible = true
 Deprecated. More...
 
std::string linkedParameter
 When parameters are linked together, logical changes of one parameter change the other to the same value. More...
 
Casts casts
 
ParameterRoles roles
 
std::shared_ptr< ILogicallogical
 
std::shared_ptr< IPhysicalphysical
 
std::vector< std::shared_ptr< Packet > > getPackets
 
std::vector< std::shared_ptr< Packet > > setPackets
 
std::vector< std::shared_ptr< Packet > > eventPackets
 
bool hasDelayedAutoResetParameters = false
 

Protected Member Functions

void reverseData (const std::vector< uint8_t > &data, std::vector< uint8_t > &reversedData)
 Reverses a binary array. More...
 

Protected Attributes

BaseLib::SharedObjects_bl = nullptr
 
std::weak_ptr< ParameterGroup_parent
 

Constructor & Destructor Documentation

§ Parameter()

BaseLib::DeviceDescription::Parameter::Parameter ( BaseLib::SharedObjects baseLib,
const PParameterGroup parent 
)
explicit

§ ~Parameter()

BaseLib::DeviceDescription::Parameter::~Parameter ( )
virtualdefault

Member Function Documentation

§ adjustBitPosition()

void BaseLib::DeviceDescription::Parameter::adjustBitPosition ( std::vector< uint8_t > &  data)

§ convertFromPacket()

PVariable BaseLib::DeviceDescription::Parameter::convertFromPacket ( const std::vector< uint8_t > &  data,
const Role role,
bool  isEvent 
)

Converts binary data of a packet received by a physical interface to a RPC variable.

Parameters
dataThe data to convert.
roleThe associated role of the value.
isEventSet to "true" if packet is an event packet. Necessary to set value of "Action" correctly.
Returns
Returns the RPC variable.

§ convertToPacket() [1/2]

void BaseLib::DeviceDescription::Parameter::convertToPacket ( const PVariable value,
const Role role,
std::vector< uint8_t > &  convertedValue 
)

Converts a RPC variable to binary data to send it over a physical interface.

Parameters
[in]valueThe value to convert.
[in]roleThe associated role of the value.
[out]convertedValueThe converted binary data.

§ convertToPacket() [2/2]

void BaseLib::DeviceDescription::Parameter::convertToPacket ( const std::string &  value,
const Role role,
std::vector< uint8_t > &  convertedValue 
)

Tries to convert a string value to a binary data to send it over a physical interface.

Parameters
[in]valueThe value to convert.
[in]roleThe associated role of the value.
[out]convertedValueThe converted binary data.

§ parent()

PParameterGroup BaseLib::DeviceDescription::Parameter::parent ( )

§ parseXml()

void BaseLib::DeviceDescription::Parameter::parseXml ( xml_node node)

§ reverseData()

void BaseLib::DeviceDescription::Parameter::reverseData ( const std::vector< uint8_t > &  data,
std::vector< uint8_t > &  reversedData 
)
protected

Reverses a binary array.

Parameters
[in]dataThe array to reverse.
[out]reversedDataThe reversed array.

Member Data Documentation

§ _bl

BaseLib::SharedObjects* BaseLib::DeviceDescription::Parameter::_bl = nullptr
protected

§ _parent

std::weak_ptr<ParameterGroup> BaseLib::DeviceDescription::Parameter::_parent
protected

§ addonWriteable

bool BaseLib::DeviceDescription::Parameter::addonWriteable = true

Makes readonly variables writeable for addons (i.

e. from device source code)

§ casts

Casts BaseLib::DeviceDescription::Parameter::casts

§ ccu2Visible

bool BaseLib::DeviceDescription::Parameter::ccu2Visible = true

Deprecated.

Remove beginning of 2021. Visible on the HomeMatic CCU2.

§ control

std::string BaseLib::DeviceDescription::Parameter::control

UI control to use for displaying this parameter.

§ eventPackets

std::vector<std::shared_ptr<Packet> > BaseLib::DeviceDescription::Parameter::eventPackets

§ formFieldType

std::string BaseLib::DeviceDescription::Parameter::formFieldType

§ formPosition

int32_t BaseLib::DeviceDescription::Parameter::formPosition = -1

§ getPackets

std::vector<std::shared_ptr<Packet> > BaseLib::DeviceDescription::Parameter::getPackets

§ hasDelayedAutoResetParameters

bool BaseLib::DeviceDescription::Parameter::hasDelayedAutoResetParameters = false

§ id

std::string BaseLib::DeviceDescription::Parameter::id

§ internal

bool BaseLib::DeviceDescription::Parameter::internal = false

§ isSigned

bool BaseLib::DeviceDescription::Parameter::isSigned = false

§ isSignedSet

bool BaseLib::DeviceDescription::Parameter::isSignedSet = false

§ linkedParameter

std::string BaseLib::DeviceDescription::Parameter::linkedParameter

When parameters are linked together, logical changes of one parameter change the other to the same value.

§ logical

std::shared_ptr<ILogical> BaseLib::DeviceDescription::Parameter::logical

§ mandatory

bool BaseLib::DeviceDescription::Parameter::mandatory = false

§ metadata

std::string BaseLib::DeviceDescription::Parameter::metadata

§ parameterGroupSelector

bool BaseLib::DeviceDescription::Parameter::parameterGroupSelector = false

§ password

bool BaseLib::DeviceDescription::Parameter::password = false

§ physical

std::shared_ptr<IPhysical> BaseLib::DeviceDescription::Parameter::physical

§ priority

int32_t BaseLib::DeviceDescription::Parameter::priority = -1

§ readable

bool BaseLib::DeviceDescription::Parameter::readable = true

§ readOnInit

bool BaseLib::DeviceDescription::Parameter::readOnInit = false

§ resetAfterRestart

bool BaseLib::DeviceDescription::Parameter::resetAfterRestart = false

§ roles

ParameterRoles BaseLib::DeviceDescription::Parameter::roles

§ service

bool BaseLib::DeviceDescription::Parameter::service = false

§ serviceInverted

bool BaseLib::DeviceDescription::Parameter::serviceInverted = false

§ setPackets

std::vector<std::shared_ptr<Packet> > BaseLib::DeviceDescription::Parameter::setPackets

§ sticky

bool BaseLib::DeviceDescription::Parameter::sticky = false

§ transform

bool BaseLib::DeviceDescription::Parameter::transform = false

§ transmitted

bool BaseLib::DeviceDescription::Parameter::transmitted = true

§ unit

std::string BaseLib::DeviceDescription::Parameter::unit

The unit of the variable like "°C" or "km/h".

§ unit_code

UnitCode BaseLib::DeviceDescription::Parameter::unit_code = UnitCode::kUndefined

The unit code (we use the BACnet codes)

§ visible

bool BaseLib::DeviceDescription::Parameter::visible = true

§ writeable

bool BaseLib::DeviceDescription::Parameter::writeable = true

The documentation for this class was generated from the following files: