31 #ifndef DEVICEPARAMETER_H_ 32 #define DEVICEPARAMETER_H_ 37 #include "../Systems/Role.h" 49 namespace DeviceDescription {
60 class Parameter :
public std::enable_shared_from_this<Parameter> {
69 enum Enum { none = 0,
get = 1,
set = 2,
event = 3 };
78 int32_t conditionValue = -1;
82 virtual ~
Packet() =
default;
84 bool checkCondition(int32_t
value);
92 bool writeable =
true;
93 bool readOnInit =
false;
94 bool transmitted =
true;
99 bool addonWriteable =
true;
101 bool password =
false;
103 bool internal =
false;
104 bool parameterGroupSelector =
false;
105 bool service =
false;
106 bool serviceInverted =
false;
108 bool transform =
false;
109 bool isSignedSet =
false;
110 bool isSigned =
false;
125 bool mandatory =
false;
127 int32_t formPosition = -1;
129 bool resetAfterRestart =
false;
130 int32_t priority = -1;
136 bool ccu2Visible =
true;
153 bool hasDelayedAutoResetParameters =
false;
169 PVariable convertFromPacket(
const std::vector<uint8_t> &data,
const Role &role,
bool isEvent);
178 void convertToPacket(
const PVariable &
value,
const Role &role, std::vector<uint8_t> &convertedValue);
187 void convertToPacket(
const std::string &
value,
const Role &role, std::vector<uint8_t> &convertedValue);
189 void adjustBitPosition(std::vector<uint8_t> &data);
191 PParameterGroup parent();
204 void reverseData(
const std::vector<uint8_t> &data, std::vector<uint8_t> &reversedData);
Enum
Definition: Parameter.h:65
std::shared_ptr< IPhysical > physical
Definition: Parameter.h:147
std::string control
UI control to use for displaying this parameter.
Definition: Parameter.h:115
std::vector< std::shared_ptr< Packet > > getPackets
Definition: Parameter.h:148
std::unordered_map< uint64_t, Role > ParameterRoles
Definition: Parameter.h:58
This is the base library main class.
Definition: BaseLib.h:95
std::string id
Definition: Parameter.h:72
Definition: BaseLib.cpp:34
std::vector< std::shared_ptr< Packet > > eventPackets
Definition: Parameter.h:150
ParameterRoles roles
Definition: Parameter.h:143
std::pair< std::string, int32_t > delayedAutoReset
Definition: Parameter.h:75
std::string linkedParameter
When parameters are linked together, logical changes of one parameter change the other to the same va...
Definition: Parameter.h:141
Definition: Parameter.h:62
std::string unit
The unit of the variable like "°C" or "km/h".
Definition: Parameter.h:120
PVariable value
Definition: UiElements.h:217
UnitCode
Definition: UnitCode.h:35
std::shared_ptr< ParameterGroup > PParameterGroup
Definition: Parameter.h:52
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
Definition: Parameter.h:64
Definition: Parameter.h:68
Casts casts
Definition: Parameter.h:142
std::string formFieldType
Definition: Parameter.h:126
std::weak_ptr< ParameterGroup > _parent
Definition: Parameter.h:196
std::string id
Definition: Parameter.h:88
std::string ParameterRole
Definition: Parameter.h:57
Enum
Definition: Parameter.h:69
Definition: ParameterCast.cpp:39
Definition: ParameterGroup.h:58
Definition: Parameter.h:65
std::vector< std::string > autoReset
Definition: Parameter.h:74
Class representing a node of XML document.
Definition: rapidxml.h:539
Definition: BinaryPayload.h:38
Definition: Parameter.h:60
std::vector< PICast > Casts
Definition: ParameterCast.h:469
std::shared_ptr< Parameter > PParameter
Definition: Parameter.h:55
std::vector< std::shared_ptr< Packet > > setPackets
Definition: Parameter.h:149
std::map< std::string, PParameter > Parameters
Definition: Parameter.h:56
std::string metadata
Definition: Parameter.h:128
std::string responseId
Definition: Parameter.h:76
std::shared_ptr< ILogical > logical
Definition: Parameter.h:146