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

#include <Peer.h>

Public Member Functions

 RpcConfigurationParameter ()
 
 RpcConfigurationParameter (RpcConfigurationParameter const &rhs)
 
virtual ~RpcConfigurationParameter ()
 
RpcConfigurationParameteroperator= (const RpcConfigurationParameter &rhs)
 
void lock () noexcept
 Locks the internal binary data vector so one can work with a reference to it externally. More...
 
void unlock () noexcept
 Unlocks the internal binary data vector. More...
 
std::vector< uint8_t >::size_type getBinaryDataSize () noexcept
 Returns the size of the data vector. More...
 
std::vector< uint8_t > getBinaryData () noexcept
 Returns a copy of the data vector. More...
 
std::vector< uint8_t > & getBinaryDataReference () noexcept
 Returns a reference to the data vector. More...
 
void setBinaryData (std::vector< uint8_t > &value) noexcept
 Sets the internal binary data vector to "value". More...
 
std::vector< uint8_t > getPartialBinaryData () noexcept
 Returns a copy of the data vector. More...
 
std::vector< uint8_t > & getPartialBinaryDataReference () noexcept
 Returns a reference to the data vector. More...
 
void setPartialBinaryData (std::vector< uint8_t > &value) noexcept
 Sets the internal binary data vector to "value". More...
 
BaseLib::PVariable getLogicalData () noexcept
 Returns the logical data object. More...
 
void setLogicalData (PVariable value) noexcept
 Sets the logical data object. More...
 
bool equals (std::vector< uint8_t > &value) noexcept
 Compares the passed vector with the internal one. More...
 
bool hasCategory (uint64_t id)
 
void addCategory (uint64_t id)
 
void removeCategory (uint64_t id)
 
std::set< uint64_t > getCategories ()
 
std::string getCategoryString ()
 
bool hasCategories ()
 
bool hasRole (uint64_t id)
 
bool hasServiceRole ()
 
void addRole (const Role &role)
 
void addRole (uint64_t id, RoleDirection direction, bool invert, bool scale, RoleScaleInfo scaleInfo)
 
void removeRole (uint64_t id)
 
Role getRole (uint64_t id)
 
std::unordered_map< uint64_t, RolegetRoles ()
 
std::string getRoleString ()
 
bool hasRoles ()
 
bool invert ()
 
bool scale ()
 
Role mainRole ()
 
uint64_t getRoom ()
 
void setRoom (uint64_t id)
 
uint64_t getBuildingPart ()
 
void setBuildingPart (uint64_t id)
 

Public Attributes

uint64_t databaseId = 0
 The id of this parameter in the database. More...
 
int32_t specialType = 0
 The special type of the parameter (0 = none, 1 = roles). More...
 
DeviceDescription::PParameter rpcParameter
 The RPC parameter as defined in the XML file. More...
 

Constructor & Destructor Documentation

§ RpcConfigurationParameter() [1/2]

BaseLib::Systems::RpcConfigurationParameter::RpcConfigurationParameter ( )
inline

§ RpcConfigurationParameter() [2/2]

BaseLib::Systems::RpcConfigurationParameter::RpcConfigurationParameter ( RpcConfigurationParameter const &  rhs)

§ ~RpcConfigurationParameter()

virtual BaseLib::Systems::RpcConfigurationParameter::~RpcConfigurationParameter ( )
inlinevirtual

Member Function Documentation

§ addCategory()

void BaseLib::Systems::RpcConfigurationParameter::addCategory ( uint64_t  id)
inline

§ addRole() [1/2]

void BaseLib::Systems::RpcConfigurationParameter::addRole ( const Role role)

§ addRole() [2/2]

void BaseLib::Systems::RpcConfigurationParameter::addRole ( uint64_t  id,
RoleDirection  direction,
bool  invert,
bool  scale,
RoleScaleInfo  scaleInfo 
)

§ equals()

bool BaseLib::Systems::RpcConfigurationParameter::equals ( std::vector< uint8_t > &  value)
noexcept

Compares the passed vector with the internal one.

This method is thread safe.

Returns
Returns "true" if both vectors are equal. "false" otherwise.

§ getBinaryData()

std::vector< uint8_t > BaseLib::Systems::RpcConfigurationParameter::getBinaryData ( )
noexcept

Returns a copy of the data vector.

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Returns
Returns a copy of the internal binary data vector.

§ getBinaryDataReference()

std::vector< uint8_t > & BaseLib::Systems::RpcConfigurationParameter::getBinaryDataReference ( )
noexcept

Returns a reference to the data vector.

Call "lock()" before executing this method and "unlock()" when you're done working with the reference.

Returns
Returns a reference to the internal binary data vector.

§ getBinaryDataSize()

std::vector< uint8_t >::size_type BaseLib::Systems::RpcConfigurationParameter::getBinaryDataSize ( )
noexcept

Returns the size of the data vector.

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Returns
Returns the size of the internal binary data vector.

§ getBuildingPart()

uint64_t BaseLib::Systems::RpcConfigurationParameter::getBuildingPart ( )
inline

§ getCategories()

std::set<uint64_t> BaseLib::Systems::RpcConfigurationParameter::getCategories ( )
inline

§ getCategoryString()

std::string BaseLib::Systems::RpcConfigurationParameter::getCategoryString ( )

§ getLogicalData()

PVariable BaseLib::Systems::RpcConfigurationParameter::getLogicalData ( )
noexcept

Returns the logical data object.

This method is thread safe.

Returns
Returns the logical data object.

§ getPartialBinaryData()

std::vector< uint8_t > BaseLib::Systems::RpcConfigurationParameter::getPartialBinaryData ( )
noexcept

Returns a copy of the data vector.

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Returns
Returns a copy of the internal binary data vector.

§ getPartialBinaryDataReference()

std::vector< uint8_t > & BaseLib::Systems::RpcConfigurationParameter::getPartialBinaryDataReference ( )
noexcept

Returns a reference to the data vector.

Call "lock()" before executing this method and "unlock()" when you're done working with the reference.

Returns
Returns a reference to the internal binary data vector.

§ getRole()

Role BaseLib::Systems::RpcConfigurationParameter::getRole ( uint64_t  id)
inline

§ getRoles()

std::unordered_map<uint64_t, Role> BaseLib::Systems::RpcConfigurationParameter::getRoles ( )
inline

§ getRoleString()

std::string BaseLib::Systems::RpcConfigurationParameter::getRoleString ( )

§ getRoom()

uint64_t BaseLib::Systems::RpcConfigurationParameter::getRoom ( )
inline

§ hasCategories()

bool BaseLib::Systems::RpcConfigurationParameter::hasCategories ( )
inline

§ hasCategory()

bool BaseLib::Systems::RpcConfigurationParameter::hasCategory ( uint64_t  id)
inline

§ hasRole()

bool BaseLib::Systems::RpcConfigurationParameter::hasRole ( uint64_t  id)
inline

§ hasRoles()

bool BaseLib::Systems::RpcConfigurationParameter::hasRoles ( )
inline

§ hasServiceRole()

bool BaseLib::Systems::RpcConfigurationParameter::hasServiceRole ( )
inline

§ invert()

bool BaseLib::Systems::RpcConfigurationParameter::invert ( )

§ lock()

void BaseLib::Systems::RpcConfigurationParameter::lock ( )
noexcept

Locks the internal binary data vector so one can work with a reference to it externally.

§ mainRole()

Role BaseLib::Systems::RpcConfigurationParameter::mainRole ( )

§ operator=()

RpcConfigurationParameter & BaseLib::Systems::RpcConfigurationParameter::operator= ( const RpcConfigurationParameter rhs)

§ removeCategory()

void BaseLib::Systems::RpcConfigurationParameter::removeCategory ( uint64_t  id)
inline

§ removeRole()

void BaseLib::Systems::RpcConfigurationParameter::removeRole ( uint64_t  id)

§ scale()

bool BaseLib::Systems::RpcConfigurationParameter::scale ( )

§ setBinaryData()

void BaseLib::Systems::RpcConfigurationParameter::setBinaryData ( std::vector< uint8_t > &  value)
noexcept

Sets the internal binary data vector to "value".

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Parameters
valueThe new data vector.

§ setBuildingPart()

void BaseLib::Systems::RpcConfigurationParameter::setBuildingPart ( uint64_t  id)
inline

§ setLogicalData()

void BaseLib::Systems::RpcConfigurationParameter::setLogicalData ( PVariable  value)
noexcept

Sets the logical data object.

This method is thread safe.

Parameters
valueThe new logical data object.

§ setPartialBinaryData()

void BaseLib::Systems::RpcConfigurationParameter::setPartialBinaryData ( std::vector< uint8_t > &  value)
noexcept

Sets the internal binary data vector to "value".

This method is thread safe. Make sure the vector is unlocked ("unlock()" was called after calling "lock()") before executing this method.

Parameters
valueThe new data vector.

§ setRoom()

void BaseLib::Systems::RpcConfigurationParameter::setRoom ( uint64_t  id)
inline

§ unlock()

void BaseLib::Systems::RpcConfigurationParameter::unlock ( )
noexcept

Unlocks the internal binary data vector.

Member Data Documentation

§ databaseId

uint64_t BaseLib::Systems::RpcConfigurationParameter::databaseId = 0

The id of this parameter in the database.

§ rpcParameter

DeviceDescription::PParameter BaseLib::Systems::RpcConfigurationParameter::rpcParameter

The RPC parameter as defined in the XML file.

§ specialType

int32_t BaseLib::Systems::RpcConfigurationParameter::specialType = 0

The special type of the parameter (0 = none, 1 = roles).


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