AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
isobus_virtual_terminal_objects.hpp
Go to the documentation of this file.
1//================================================================================================
8//================================================================================================
9#ifndef ISOBUS_VIRTUAL_TERMINAL_OBJECTS_HPP
10#define ISOBUS_VIRTUAL_TERMINAL_OBJECTS_HPP
11
13
14#include <array>
15#include <map>
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace isobus
21{
23 enum class VirtualTerminalObjectType : std::uint8_t
24 {
25 WorkingSet = 0,
26 DataMask = 1,
27 AlarmMask = 2,
28 Container = 3,
29 WindowMask = 34,
30 SoftKeyMask = 4,
31 Key = 5,
32 Button = 6,
33 KeyGroup = 35,
34 InputBoolean = 7,
35 InputString = 8,
36 InputNumber = 9,
37 InputList = 10,
38 OutputString = 11,
39 OutputNumber = 12,
40 OutputList = 37,
41 OutputLine = 13,
42 OutputRectangle = 14,
43 OutputEllipse = 15,
44 OutputPolygon = 16,
45 OutputMeter = 17,
48 GraphicsContext = 36,
49 Animation = 44,
50 PictureGraphic = 20,
51 GraphicData = 46,
52 ScaledGraphic = 48,
53 NumberVariable = 21,
54 StringVariable = 22,
55 FontAttributes = 23,
56 LineAttributes = 24,
57 FillAttributes = 25,
58 InputAttributes = 26,
60 ColourMap = 39,
62 ObjectPointer = 27,
66 Macro = 28,
87 Reserved = 255
88 };
89
92 enum class EventID : std::uint8_t
93 {
94 Reserved = 0,
95 OnActivate = 1,
96 OnDeactivate = 2,
97 OnShow = 3,
98 OnHide = 4,
99 // OnRefresh - An object that is already on display is redrawn (Macros cannot be associated with this event so no event ID is defined).
100 OnEnable = 5,
101 OnDisable = 6,
110 OnChangeSize = 15,
111 OnChangeValue = 16,
112 OnChangePriority = 17,
113 OnChangeEndpoint = 18,
116 OnESC = 21,
117 OnEntryOfAValue = 22,
118 OnEntryOfANewValue = 23,
119 OnKeyPress = 24,
120 OnKeyRelease = 25,
125 ProprietaryRangeEnd = 254,
127 };
128
131 {
133 std::uint16_t macroID;
134 };
135
138 {
139 public:
140 float r;
141 float g;
142 float b;
143
145 constexpr VTColourVector() :
146 r(0.0f), g(0.0f), b(0.0f) {}
147
152 constexpr VTColourVector(float red, float green, float blue) :
153 r(red), g(green), b(blue) {}
154 };
155
158 {
159 public:
162
168 VTColourVector get_colour(std::uint8_t colourIndex) const;
169
173 void set_colour(std::uint8_t colourIndex, VTColourVector newColour);
174
175 private:
176 static constexpr std::size_t VT_COLOUR_TABLE_SIZE = 256;
177
178 std::array<VTColourVector, VT_COLOUR_TABLE_SIZE> colourTable;
179 };
180
183 {
184 public:
186 enum class AttributeError : std::uint8_t
187 {
188 InvalidObjectID = 0,
189 InvalidAttributeID = 1,
190 InvalidValue = 2,
191 AnyOtherError = 4
192 };
193
195 VTObject() = default;
196
198 virtual ~VTObject() = default;
199
203
206 virtual std::uint32_t get_minumum_object_length() const = 0;
207
211 virtual bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const = 0;
212
221 virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) = 0;
222
229 virtual bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const = 0;
230
233 std::uint16_t get_id() const;
234
237 void set_id(std::uint16_t value);
238
241 std::uint16_t get_width() const;
242
245 void set_width(std::uint16_t value);
246
249 std::uint16_t get_height() const;
250
253 void set_height(std::uint16_t value);
254
257 std::uint8_t get_background_color() const;
258
261 void set_background_color(std::uint8_t value);
262
265 std::uint16_t get_number_children() const;
266
271 void add_child(std::uint16_t objectID, std::int16_t relativeXLocation, std::int16_t relativeYLocation);
272
277 std::uint16_t get_child_id(std::uint16_t index) const;
278
282 std::int16_t get_child_x(std::uint16_t index) const;
283
287 std::int16_t get_child_y(std::uint16_t index) const;
288
292 void set_child_x(std::uint16_t index, std::int16_t xOffset);
293
297 void set_child_y(std::uint16_t index, std::int16_t yOffset);
298
304 bool offset_all_children_with_id(std::uint16_t childObjectID, std::int8_t xOffset, std::int8_t yOffset);
305
312 void remove_child(std::uint16_t objectIDToRemove, std::int16_t relativeXLocation, std::int16_t relativeYLocation);
313
316 void pop_child();
317
320 std::uint8_t get_number_macros() const;
321
324 void add_macro(MacroMetadata macroToAdd);
325
329 MacroMetadata get_macro(std::uint8_t index) const;
330
335 static std::shared_ptr<VTObject> get_object_by_id(std::uint16_t objectID, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool);
336
337 protected:
340 {
341 public:
343 ChildObjectData() = default;
344
349 ChildObjectData(std::uint16_t objectId,
350 std::int16_t x,
351 std::int16_t y);
352 std::uint16_t id = NULL_OBJECT_ID;
353 std::int16_t xLocation = 0;
354 std::int16_t yLocation = 0;
355 };
356
357 std::vector<ChildObjectData> children;
358 std::vector<MacroMetadata> macros;
359 std::uint16_t objectID = NULL_OBJECT_ID;
360 std::uint16_t width = 0;
361 std::uint16_t height = 0;
362 std::uint8_t backgroundColor = 0;
363 };
364
367 class WorkingSet : public VTObject
368 {
369 public:
372 enum class AttributeName : std::uint8_t
373 {
374 Type = 0,
375 BackgroundColour = 1,
376 Selectable = 2,
377 ActiveMask = 3,
378
379 NumberOfAttributes = 4
380 };
381
383 WorkingSet() = default;
384
386 ~WorkingSet() override = default;
387
391
394 std::uint32_t get_minumum_object_length() const override;
395
399 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
400
409 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
410
417 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
418
421 bool get_selectable() const;
422
425 void set_selectable(bool value);
426
429 std::uint16_t get_active_mask() const;
430
433 void set_active_mask(std::uint16_t value);
434
435 private:
436 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 18;
437
438 std::vector<std::string> languageCodes;
439 std::uint16_t activeMask = NULL_OBJECT_ID;
440 bool selectable = false;
441 };
442
444 class DataMask : public VTObject
445 {
446 public:
449 enum class AttributeName : std::uint8_t
450 {
451 Type = 0,
452 BackgroundColour = 1,
453 SoftKeyMask = 2,
454
455 NumberOfAttributes = 3
456 };
457
459 DataMask() = default;
460
462 ~DataMask() override = default;
463
467
470 std::uint32_t get_minumum_object_length() const override;
471
475 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
476
485 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
486
493 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
494
500 bool change_soft_key_mask(std::uint16_t newMaskID, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool);
501
505 void set_soft_key_mask(std::uint16_t newMaskID);
506
509 std::uint16_t get_soft_key_mask() const;
510
511 private:
512 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 12;
514 };
515
517 class AlarmMask : public VTObject
518 {
519 public:
522 enum class AttributeName : std::uint8_t
523 {
524 Type = 0,
525 BackgroundColour = 1,
526 SoftKeyMask = 2,
527 Priority = 3,
528 AcousticSignal = 4,
529
530 NumberOfAttributes = 5
531 };
532
534 enum class Priority : std::uint8_t
535 {
536 High = 0,
537 Medium = 1,
538 Low = 2
539 };
540
543 enum class AcousticSignal : std::uint8_t
544 {
545 Highest = 0,
546 Medium = 1,
547 Lowest = 3,
548 None = 4
549 };
550
552 AlarmMask() = default;
553
555 ~AlarmMask() override = default;
556
560
563 std::uint32_t get_minumum_object_length() const override;
564
568 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
569
578 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
579
586 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
587
592
596 void set_mask_priority(Priority value);
597
602
607
613 bool change_soft_key_mask(std::uint16_t newMaskID, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool);
614
618 void set_soft_key_mask(std::uint16_t newMaskID);
619
622 std::uint16_t get_soft_key_mask() const;
623
624 private:
625 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 10;
626
627 std::uint16_t softKeyMask = NULL_OBJECT_ID;
630 };
631
635 class Container : public VTObject
636 {
637 public:
640 enum class AttributeName : std::uint8_t
641 {
642 Type = 0,
643 Width = 1,
644 Height = 2,
645 Hidden = 3,
646
647 NumberOfAttributes = 4
648 };
649
651 Container() = default;
652
654 ~Container() override = default;
655
659
662 std::uint32_t get_minumum_object_length() const override;
663
667 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
668
677 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
678
685 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
686
689 bool get_hidden() const;
690
693 void set_hidden(bool value);
694
695 private:
696 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 9;
697
698 bool hidden = false;
699 };
700
705 class SoftKeyMask : public VTObject
706 {
707 public:
710 enum class AttributeName : std::uint8_t
711 {
712 Type = 0,
713 BackgroundColour = 1,
714
715 NumberOfAttributes = 2
716 };
717
719 SoftKeyMask() = default;
720
722 ~SoftKeyMask() override = default;
723
727
730 std::uint32_t get_minumum_object_length() const override;
731
735 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
736
745 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
746
753 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
754
755 private:
756 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 6;
757 };
758
761 class Key : public VTObject
762 {
763 public:
766 enum class AttributeName : std::uint8_t
767 {
768 Type = 0,
769 BackgroundColour = 1,
770 KeyCode = 2,
771
772 NumberOfAttributes = 3
773 };
774
776 Key() = default;
777
779 ~Key() override = default;
780
784
787 std::uint32_t get_minumum_object_length() const override;
788
792 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
793
802 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
803
810 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
811
814 std::uint8_t get_key_code() const;
815
818 void set_key_code(std::uint8_t value);
819
820 private:
821 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7;
822
823 std::uint8_t keyCode = 0;
824 };
825
827 class KeyGroup : public VTObject
828 {
829 public:
832 enum class AttributeName : std::uint8_t
833 {
834 Type = 0,
835 Options = 1,
836 Name = 2,
837
838 NumberOfAttributes = 3
839 };
840
842 enum class Options : std::uint8_t
843 {
844 Available = 0,
845 Transparent = 1
846 };
847
849 KeyGroup() = default;
850
852 ~KeyGroup() override = default;
853
857
860 std::uint32_t get_minumum_object_length() const override;
861
865 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
866
875 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
876
883 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
884
887 std::uint16_t get_key_group_icon() const;
888
891 void set_key_group_icon(std::uint16_t value);
892
896 bool get_option(Options option) const;
897
900 void set_options(std::uint8_t value);
901
905 void set_option(Options option, bool value);
906
910 std::uint16_t get_name_object_id() const;
911
915 void set_name_object_id(std::uint16_t value);
916
917 static constexpr std::uint8_t MAX_CHILD_KEYS = 4;
918
919 private:
924 bool validate_name(std::uint16_t nameIDToValidate, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const;
925
926 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 10;
927
928 std::uint16_t keyGroupIcon = NULL_OBJECT_ID;
929 std::uint16_t nameID = NULL_OBJECT_ID;
930 std::uint8_t optionsBitfield = 0;
931 };
932
936 class Button : public VTObject
937 {
938 public:
941 enum class AttributeName : std::uint8_t
942 {
943 Type = 0,
944 Width = 1,
945 Height = 2,
946 BackgroundColour = 3,
947 BorderColour = 4,
948 KeyCode = 5,
949 Options = 6, // Version 4 and later
950
951 NumberOfAttributes = 7
952 };
953
955 enum class Options : std::uint8_t
956 {
957 Latchable = 0,
959 SuppressBorder = 2,
961 Disabled = 4,
962 NoBorder = 5,
963 Reserved1 = 6,
964 Reserved2 = 7
965 };
966
968 Button() = default;
969
971 ~Button() override = default;
972
976
979 std::uint32_t get_minumum_object_length() const override;
980
984 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
985
994 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
995
1002 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1003
1006 std::uint8_t get_key_code() const;
1007
1010 void set_key_code(std::uint8_t value);
1011
1014 std::uint8_t get_border_colour() const;
1015
1018 void set_border_colour(std::uint8_t value);
1019
1023 bool get_option(Options option) const;
1024
1027 void set_options(std::uint8_t value);
1028
1032 void set_option(Options option, bool value);
1033
1034 private:
1035 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13;
1036
1037 std::uint8_t borderColour = 0;
1038 std::uint8_t keyCode = 0;
1039 std::uint8_t optionsBitfield = 0;
1040 };
1041
1043 class InputBoolean : public VTObject
1044 {
1045 public:
1048 enum class AttributeName : std::uint8_t
1049 {
1050 Type = 0,
1051 BackgroundColour = 1,
1052 Width = 2,
1053 ForegroundColour = 3,
1054 VariableReference = 4,
1055 Value = 5,
1056 Enabled = 6, // Version 4 and later
1057
1058 NumberOfAttributes = 7
1059 };
1060
1062 InputBoolean() = default;
1063
1065 ~InputBoolean() override = default;
1066
1070
1073 std::uint32_t get_minumum_object_length() const override;
1074
1078 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1079
1088 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1089
1096 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1097
1101 std::uint8_t get_value() const;
1102
1106 void set_value(std::uint8_t inputValue);
1107
1110 bool get_enabled() const;
1111
1114 void set_enabled(bool isEnabled);
1115
1118 std::uint16_t get_foreground_colour_object_id() const;
1119
1123 void set_foreground_colour_object_id(std::uint16_t fontAttributeValue);
1124
1128 std::uint16_t get_variable_reference() const;
1129
1133 void set_variable_reference(std::uint16_t numberVariableValue);
1134
1135 private:
1136 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13;
1137
1140 std::uint8_t value = 0;
1141 bool enabled = false;
1142 };
1143
1145 class InputString : public VTObject
1146 {
1147 public:
1150 enum class AttributeName : std::uint8_t
1151 {
1152 Type = 0,
1153 Width = 1,
1154 Height = 2,
1155 BackgroundColour = 3,
1156 FontAttributes = 4,
1157 InputAttributes = 5,
1158 Options = 6,
1159 VariableReference = 7,
1160 Justification = 8,
1161 Enabled = 9, // Version 4 and later
1162
1163 NumberOfAttributes = 10
1164 };
1165
1167 enum class Options : std::uint8_t
1168 {
1169 Transparent = 0,
1170 AutoWrap = 1,
1171 WrapOnHyphen = 2
1172 };
1173
1175 enum class HorizontalJustification : std::uint8_t
1176 {
1177 PositionLeft = 0,
1178 PositionMiddle = 1,
1179 PositionRight = 2,
1180 Reserved = 3
1181 };
1182
1184 enum class VerticalJustification : std::uint8_t
1185 {
1186 PositionTop = 0,
1187 PositionMiddle = 1,
1188 PositionBottom = 2,
1189 Reserved = 3
1190 };
1191
1193 InputString() = default;
1194
1196 ~InputString() override = default;
1197
1201
1204 std::uint32_t get_minumum_object_length() const override;
1205
1209 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1210
1219 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1220
1227 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1228
1231 bool get_enabled() const;
1232
1235 void set_enabled(bool value);
1236
1240 bool get_option(Options option) const;
1241
1244 void set_options(std::uint8_t value);
1245
1249 void set_option(Options option, bool value);
1250
1254
1258
1261 void set_justification_bitfield(std::uint8_t value);
1262
1266 std::string get_value() const;
1267
1271 void set_value(const std::string &value);
1272
1275 std::uint16_t get_font_attributes() const;
1276
1280 void set_font_attributes(std::uint16_t fontAttributesValue);
1281
1284 std::uint16_t get_variable_reference() const;
1285
1289 void set_variable_reference(std::uint16_t variableReferenceValue);
1290
1293 std::uint16_t get_input_attributes() const;
1294
1298 void set_input_attributes(std::uint16_t inputAttributesValue);
1299
1300 private:
1301 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 19;
1302
1303 std::string stringValue;
1307 std::uint8_t optionsBitfield = 0;
1308 std::uint8_t justificationBitfield = 0;
1309 bool enabled = false;
1310 };
1311
1314 class InputNumber : public VTObject
1315 {
1316 public:
1319 enum class AttributeName : std::uint8_t
1320 {
1321 Type = 0,
1322 Width = 1,
1323 Height = 2,
1324 BackgroundColour = 3,
1325 FontAttributes = 4,
1326 Options = 5,
1327 VariableReference = 6,
1328 MinValue = 7,
1329 MaxValue = 8,
1330 Offset = 9,
1331 Scale = 10,
1332 NumberOfDecimals = 11,
1333 Format = 12,
1334 Justification = 13,
1335 Value = 14,
1336 Options2 = 15, // Version 4 and after
1337
1338 NumberOfAttributes = 16
1339 };
1340
1342 enum class Options : std::uint8_t
1343 {
1344 Transparent = 0,
1346 DisplayZeroAsBlank = 2,
1347 Truncate = 3
1348 };
1349
1351 enum class Options2 : std::uint8_t
1352 {
1353 Enabled = 0,
1354 RealTimeEditing = 1
1355 };
1356
1358 enum class HorizontalJustification : std::uint8_t
1359 {
1360 PositionLeft = 0,
1361 PositionMiddle = 1,
1362 PositionRight = 2,
1363 Reserved = 3
1364 };
1365
1367 enum class VerticalJustification : std::uint8_t
1368 {
1369 PositionTop = 0,
1370 PositionMiddle = 1,
1371 PositionBottom = 2,
1372 Reserved = 3
1373 };
1374
1376 InputNumber() = default;
1377
1379 ~InputNumber() override = default;
1380
1384
1387 std::uint32_t get_minumum_object_length() const override;
1388
1392 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1393
1402 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1403
1410 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1411
1415
1419
1422 void set_justification_bitfield(std::uint8_t newJustification);
1423
1426 float get_scale() const;
1427
1430 void set_scale(float newScale);
1431
1435 std::uint32_t get_maximum_value() const;
1436
1440 void set_maximum_value(std::uint32_t newMax);
1441
1445 std::uint32_t get_minimum_value() const;
1446
1450 void set_minimum_value(std::uint32_t newMin);
1451
1454 std::int32_t get_offset() const;
1455
1458 void set_offset(std::int32_t newOffset);
1459
1462 std::uint8_t get_number_of_decimals() const;
1463
1466 void set_number_of_decimals(std::uint8_t numDecimals);
1467
1472 bool get_format() const;
1473
1478 void set_format(bool newFormat);
1479
1483 bool get_option(Options option) const;
1484
1487 void set_options(std::uint8_t newOptions);
1488
1492 void set_option(Options option, bool optionValue);
1493
1497 bool get_option2(Options2 newOption) const;
1498
1501 void set_options2(std::uint8_t newOptions);
1502
1506 void set_option2(Options2 option, bool newOption);
1507
1510 std::uint32_t get_value() const;
1511
1514 void set_value(std::uint32_t inputValue);
1515
1518 std::uint16_t get_font_attributes() const;
1519
1523 void set_font_attributes(std::uint16_t fontAttributesValue);
1524
1527 std::uint16_t get_variable_reference() const;
1528
1532 void set_variable_reference(std::uint16_t variableReferenceValue);
1533
1534 private:
1535 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 38;
1536
1537 float scale = 0.0f;
1538 std::uint32_t maximumValue = 0;
1539 std::uint32_t minimumValue = 0;
1540 std::uint32_t value = 0;
1541 std::int32_t offset = 0;
1544 std::uint8_t numberOfDecimals = 0;
1545 std::uint8_t options = 0;
1546 std::uint8_t options2 = 0;
1547 std::uint8_t justificationBitfield = 0;
1548 bool format = false;
1549 };
1550
1553 class InputList : public VTObject
1554 {
1555 public:
1558 enum class AttributeName : std::uint8_t
1559 {
1560 Type = 0,
1561 Width = 1,
1562 Height = 2,
1563 VariableReference = 3,
1564 Value = 4,
1565 Options = 5, // Version 4 and after
1566
1567 NumberOfAttributes = 6
1568 };
1569
1571 enum class Options
1572 {
1573 Enabled = 0,
1574 RealTimeEditing = 1
1575 };
1576
1578 InputList() = default;
1579
1581 ~InputList() override = default;
1582
1586
1589 std::uint32_t get_minumum_object_length() const override;
1590
1594 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1595
1604 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1605
1612 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1613
1617 bool get_option(Options option) const;
1618
1621 void set_options(std::uint8_t options);
1622
1626 void set_option(Options option, bool optionValue);
1627
1630 std::uint8_t get_value() const;
1631
1634 void set_value(std::uint8_t inputValue);
1635
1640 void set_variable_reference(std::uint16_t referencedObjectID);
1641
1644 std::uint16_t get_variable_reference() const;
1645
1651 bool change_list_item(std::uint8_t index, std::uint16_t newListItem, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool);
1652
1657 std::uint8_t get_number_of_list_items() const;
1658
1663 void set_number_of_list_items(std::uint8_t value);
1664
1665 private:
1666 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13;
1667
1669 std::uint8_t numberOfListItems = 0;
1670 std::uint8_t optionsBitfield = 0;
1671 std::uint8_t value = 0;
1672 };
1673
1675 class OutputString : public VTObject
1676 {
1677 public:
1680 enum class AttributeName : std::uint8_t
1681 {
1682 Type = 0,
1683 Width = 1,
1684 Height = 2,
1685 BackgroundColour = 3,
1686 FontAttributes = 4,
1687 Options = 5,
1688 VariableReference = 6,
1689 Justification = 7,
1690
1691 NumberOfAttributes = 8
1692 };
1693
1695 enum class Options
1696 {
1697 Transparent = 0,
1698 AutoWrap = 1,
1699 WrapOnHyphen = 2
1700 };
1701
1703 enum class HorizontalJustification : std::uint8_t
1704 {
1705 PositionLeft = 0,
1706 PositionMiddle = 1,
1707 PositionRight = 2,
1708 Reserved = 3
1709 };
1710
1712 enum class VerticalJustification : std::uint8_t
1713 {
1714 PositionTop = 0,
1715 PositionMiddle = 1,
1716 PositionBottom = 2,
1717 Reserved = 3
1718 };
1719
1721 OutputString() = default;
1722
1724 ~OutputString() override = default;
1725
1729
1732 std::uint32_t get_minumum_object_length() const override;
1733
1737 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1738
1747 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1748
1755 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1756
1760 bool get_option(Options option) const;
1761
1764 void set_options(std::uint8_t value);
1765
1769 void set_option(Options option, bool value);
1770
1774
1778
1781 void set_justification_bitfield(std::uint8_t value);
1782
1785 std::string get_value() const;
1786
1789 void set_value(const std::string &value);
1790
1793 std::uint16_t get_font_attributes() const;
1794
1798 void set_font_attributes(std::uint16_t fontAttributesValue);
1799
1802 std::uint16_t get_variable_reference() const;
1803
1807 void set_variable_reference(std::uint16_t variableReferenceValue);
1808
1809 private:
1810 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 16;
1811
1812 std::string stringValue;
1815 std::uint8_t optionsBitfield = 0;
1816 std::uint8_t justificationBitfield = 0;
1817 };
1818
1820 class OutputNumber : public VTObject
1821 {
1822 public:
1825 enum class AttributeName : std::uint8_t
1826 {
1827 Type = 0,
1828 Width = 1,
1829 Height = 2,
1830 BackgroundColour = 3,
1831 FontAttributes = 4,
1832 Options = 5,
1833 VariableReference = 6,
1834 Offset = 7,
1835 Scale = 8,
1836 NumberOfDecimals = 9,
1837 Format = 10,
1838 Justification = 11,
1839
1840 NumberOfAttributes = 12
1841 };
1842
1844 enum class Options : std::uint8_t
1845 {
1846 Transparent = 0,
1848 DisplayZeroAsBlank = 2,
1849 Truncate = 3
1850 };
1851
1853 enum class HorizontalJustification : std::uint8_t
1854 {
1855 PositionLeft = 0,
1856 PositionMiddle = 1,
1857 PositionRight = 2,
1858 Reserved = 3
1859 };
1860
1862 enum class VerticalJustification : std::uint8_t
1863 {
1864 PositionTop = 0,
1865 PositionMiddle = 1,
1866 PositionBottom = 2,
1867 Reserved = 3
1868 };
1869
1871 OutputNumber() = default;
1872
1874 ~OutputNumber() override = default;
1875
1879
1882 std::uint32_t get_minumum_object_length() const override;
1883
1887 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
1888
1897 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
1898
1905 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
1906
1910 bool get_option(Options option) const;
1911
1914 void set_options(std::uint8_t value);
1915
1919 void set_option(Options option, bool value);
1920
1924
1928
1931 void set_justification_bitfield(std::uint8_t value);
1932
1935 float get_scale() const;
1936
1939 void set_scale(float scaleValue);
1940
1943 std::int32_t get_offset() const;
1944
1947 void set_offset(std::int32_t offsetValue);
1948
1951 std::uint8_t get_number_of_decimals() const;
1952
1955 void set_number_of_decimals(std::uint8_t decimalValue);
1956
1961 bool get_format() const;
1962
1967 void set_format(bool shouldFormatAsExponential);
1968
1971 std::uint32_t get_value() const;
1972
1975 void set_value(std::uint32_t inputValue);
1976
1981 void set_variable_reference(std::uint16_t referencedObjectID);
1982
1985 std::uint16_t get_variable_reference() const;
1986
1989 std::uint16_t get_font_attributes() const;
1990
1994 void set_font_attributes(std::uint16_t fontAttributesValue);
1995
1996 private:
1997 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 29;
1998
1999 float scale = 1.0f;
2000 std::int32_t offset = 0;
2001 std::uint32_t value = 0;
2004 std::uint8_t numberOfDecimals = 0;
2005 std::uint8_t optionsBitfield = 0;
2006 std::uint8_t justificationBitfield = 0;
2007 bool format = false;
2008 };
2009
2011 class OutputList : public VTObject
2012 {
2013 public:
2016 enum class AttributeName : std::uint8_t
2017 {
2018 Type = 0,
2019 Width = 1,
2020 Height = 2,
2021 VariableReference = 3,
2022 Value = 4,
2023
2024 NumberOfAttributes = 5
2025 };
2026
2028 OutputList() = default;
2029
2031 ~OutputList() override = default;
2032
2036
2039 std::uint32_t get_minumum_object_length() const override;
2040
2044 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2045
2054 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2055
2062 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2063
2068 std::uint8_t get_number_of_list_items() const;
2069
2074 void set_number_of_list_items(std::uint8_t value);
2075
2078 std::uint8_t get_value() const;
2079
2082 void set_value(std::uint8_t value);
2083
2088 void set_variable_reference(std::uint16_t referencedObjectID);
2089
2092 std::uint16_t get_variable_reference() const;
2093
2099 bool change_list_item(std::uint8_t index, std::uint16_t newListItem, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool);
2100
2101 private:
2102 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 12;
2103
2105 std::uint8_t numberOfListItems = 0;
2106 std::uint8_t value = 0;
2107 };
2108
2110 class OutputLine : public VTObject
2111 {
2112 public:
2115 enum class AttributeName : std::uint8_t
2116 {
2117 Type = 0,
2118 LineAttributes = 1,
2119 Width = 2,
2120 Height = 3,
2121 LineDirection = 4,
2122
2123 NumberOfAttributes = 5
2124 };
2125
2127 enum class LineDirection : std::uint8_t
2128 {
2129 TopLeftToBottomRight = 0,
2130 BottomLeftToTopRight = 1
2131 };
2132
2134 OutputLine() = default;
2135
2137 ~OutputLine() override = default;
2138
2142
2145 std::uint32_t get_minumum_object_length() const override;
2146
2150 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2151
2160 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2161
2168 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2169
2176
2183
2186 std::uint16_t get_line_attributes() const;
2187
2191 void set_line_attributes(std::uint16_t lineAttributesObject);
2192
2193 private:
2194 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 11;
2195
2197 std::uint8_t lineDirection = 0;
2198 };
2199
2202 {
2203 public:
2206 enum class AttributeName : std::uint8_t
2207 {
2208 Type = 0,
2209 LineAttributes = 1,
2210 Width = 2,
2211 Height = 3,
2212 LineSuppression = 4,
2213 FillAttributes = 5,
2214
2215 NumberOfAttributes = 6
2216 };
2219 {
2220 SuppressTopLine = 0,
2222 SuppressBottomLine = 2,
2224 };
2225
2227 OutputRectangle() = default;
2228
2230 ~OutputRectangle() override = default;
2231
2235
2238 std::uint32_t get_minumum_object_length() const override;
2239
2243 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2244
2253 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2254
2261 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2262
2266 std::uint8_t get_line_suppression_bitfield() const;
2267
2271 void set_line_suppression_bitfield(std::uint8_t value);
2272
2275 std::uint16_t get_line_attributes() const;
2276
2280 void set_line_attributes(std::uint16_t lineAttributesObject);
2281
2284 std::uint16_t get_fill_attributes() const;
2285
2289 void set_fill_attributes(std::uint16_t fillAttributesObject);
2290
2291 private:
2292 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13;
2293
2296 std::uint8_t lineSuppressionBitfield = 0;
2297 };
2298
2301 {
2302 public:
2305 enum class AttributeName : std::uint8_t
2306 {
2307 Type = 0,
2308 LineAttributes = 1,
2309 Width = 2,
2310 Height = 3,
2311 EllipseType = 4,
2312 StartAngle = 5,
2313 EndAngle = 6,
2314 FillAttributes = 7,
2315
2316 NumberOfAttributes = 8
2317 };
2318
2320 enum class EllipseType
2321 {
2322 Closed = 0,
2324 ClosedEllipseSegment = 2,
2325 ClosedEllipseSection = 3
2326 };
2327
2329 OutputEllipse() = default;
2330
2332 ~OutputEllipse() override = default;
2333
2337
2340 std::uint32_t get_minumum_object_length() const override;
2341
2345 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2346
2355 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2356
2363 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2364
2368
2371 void set_ellipse_type(EllipseType value);
2372
2378 std::uint8_t get_start_angle() const;
2379
2383 void set_start_angle(std::uint8_t value);
2384
2389 std::uint8_t get_end_angle() const;
2390
2394 void set_end_angle(std::uint8_t value);
2395
2398 std::uint16_t get_line_attributes() const;
2399
2403 void set_line_attributes(std::uint16_t lineAttributesObject);
2404
2407 std::uint16_t get_fill_attributes() const;
2408
2412 void set_fill_attributes(std::uint16_t fillAttributesObject);
2413
2414 private:
2415 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 15;
2416
2419 std::uint8_t ellipseType = 0;
2420 std::uint8_t startAngle = 0;
2421 std::uint8_t endAngle = 0;
2422 };
2423
2426 {
2427 public:
2430 enum class AttributeName : std::uint8_t
2431 {
2432 Type = 0,
2433 Width = 1,
2434 Height = 2,
2435 LineAttributes = 3,
2436 FillAttributes = 4,
2437 PolygonType = 5,
2438
2439 NumberOfAttributes = 6
2440 };
2441
2443 enum class PolygonType
2444 {
2445 Convex = 0,
2446 NonConvex = 1,
2447 Complex = 2,
2448 Open = 3
2449 };
2450
2453 {
2454 std::uint16_t xValue;
2455 std::uint16_t yValue;
2456 };
2457
2459 OutputPolygon() = default;
2460
2462 ~OutputPolygon() override = default;
2463
2467
2470 std::uint32_t get_minumum_object_length() const override;
2471
2475 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2476
2485 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2486
2493 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2494
2498 void add_point(std::uint16_t x, std::uint16_t y);
2499
2502 std::uint8_t get_number_of_points() const;
2503
2507 PolygonPoint get_point(std::uint8_t index);
2508
2511 PolygonType get_type() const;
2512
2515 void set_type(PolygonType value);
2516
2519 std::uint16_t get_line_attributes() const;
2520
2524 void set_line_attributes(std::uint16_t lineAttributesObject);
2525
2528 std::uint16_t get_fill_attributes() const;
2529
2533 void set_fill_attributes(std::uint16_t fillAttributesObject);
2534
2535 private:
2536 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 14;
2537
2538 std::vector<PolygonPoint> pointList;
2541 std::uint8_t polygonType = 0;
2542 };
2543
2545 class OutputMeter : public VTObject
2546 {
2547 public:
2550 enum class AttributeName : std::uint8_t
2551 {
2552 Type = 0,
2553 Width = 1,
2554 NeedleColour = 2,
2555 BorderColour = 3,
2556 ArcAndTickColour = 4,
2557 Options = 5,
2558 NumberOfTicks = 6,
2559 StartAngle = 7,
2560 EndAngle = 8,
2561 MinValue = 9,
2562 MaxValue = 10,
2563 VariableReference = 11,
2564 Value = 12,
2565
2566 NumberOfAttributes = 13
2567 };
2568
2570 enum class Options : std::uint8_t
2571 {
2572 DrawArc = 0,
2573 DrawBorder = 1,
2574 DrawTicks = 2,
2576 };
2577
2579 OutputMeter() = default;
2580
2582 ~OutputMeter() override = default;
2583
2587
2590 std::uint32_t get_minumum_object_length() const override;
2591
2595 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2596
2605 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2606
2613 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2614
2617 std::uint16_t get_min_value() const;
2618
2621 void set_min_value(std::uint16_t value);
2622
2625 std::uint16_t get_max_value() const;
2626
2629 void set_max_value(std::uint16_t value);
2630
2633 std::uint16_t get_value() const;
2634
2637 void set_value(std::uint16_t value);
2638
2641 std::uint8_t get_needle_colour() const;
2642
2645 void set_needle_colour(std::uint8_t colourIndex);
2646
2649 std::uint8_t get_border_colour() const;
2650
2653 void set_border_colour(std::uint8_t colourIndex);
2654
2657 std::uint8_t get_arc_and_tick_colour() const;
2658
2661 void set_arc_and_tick_colour(std::uint8_t colourIndex);
2662
2665 std::uint8_t get_number_of_ticks() const;
2666
2669 void set_number_of_ticks(std::uint8_t ticks);
2670
2674 bool get_option(Options option) const;
2675
2678 void set_options(std::uint8_t options);
2679
2683 void set_option(Options option, bool optionValue);
2684
2688 std::uint8_t get_start_angle() const;
2689
2693 void set_start_angle(std::uint8_t value);
2694
2698 std::uint8_t get_end_angle() const;
2699
2703 void set_end_angle(std::uint8_t value);
2704
2708 std::uint16_t get_variable_reference() const;
2709
2714 void set_variable_reference(std::uint16_t variableReferenceValue);
2715
2716 private:
2717 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 21;
2718
2719 std::uint16_t minValue = 0;
2720 std::uint16_t maxValue = 0;
2721 std::uint16_t value = 0;
2723 std::uint8_t needleColour = 0;
2724 std::uint8_t borderColour = 0;
2725 std::uint8_t arcAndTickColour = 0;
2726 std::uint8_t optionsBitfield = 0;
2727 std::uint8_t numberOfTicks = 0;
2728 std::uint8_t startAngle = 0;
2729 std::uint8_t endAngle = 0;
2730 };
2731
2734 {
2735 public:
2738 enum class AttributeName : std::uint8_t
2739 {
2740 Type = 0,
2741 Width = 1,
2742 Height = 2,
2743 Colour = 3,
2744 TargetLineColour = 4,
2745 Options = 5,
2746 NumberOfTicks = 6,
2747 MinValue = 7,
2748 MaxValue = 8,
2749 VariableReference = 9,
2750 TargetValueVariableReference = 10,
2751 TargetValue = 11,
2752 Value = 12,
2753
2754 NumberOfAttributes = 13
2755 };
2756
2758 enum class Options : std::uint8_t
2759 {
2760 DrawBorder = 0,
2761 DrawTargetLine = 1,
2762 DrawTicks = 2,
2763 BarGraphType = 3,
2764 AxisOrientation = 4,
2765 Direction = 5
2766 };
2767
2770
2772 ~OutputLinearBarGraph() override = default;
2773
2777
2780 std::uint32_t get_minumum_object_length() const override;
2781
2785 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2786
2795 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2796
2803 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2804
2807 std::uint16_t get_min_value() const;
2808
2812 void set_min_value(std::uint16_t value);
2813
2816 std::uint16_t get_max_value() const;
2817
2820 void set_max_value(std::uint16_t value);
2821
2824 std::uint16_t get_value() const;
2825
2828 void set_value(std::uint16_t value);
2829
2832 std::uint16_t get_target_value() const;
2833
2836 void set_target_value(std::uint16_t valueTarget);
2837
2842 std::uint16_t get_target_value_reference() const;
2843
2848 void set_target_value_reference(std::uint16_t valueReferenceObjectID);
2849
2852 std::uint8_t get_number_of_ticks() const;
2853
2856 void set_number_of_ticks(std::uint8_t value);
2857
2860 std::uint8_t get_colour() const;
2861
2864 void set_colour(std::uint8_t graphColour);
2865
2868 std::uint8_t get_target_line_colour() const;
2869
2872 void set_target_line_colour(std::uint8_t lineColour);
2873
2877 bool get_option(Options option) const;
2878
2881 void set_options(std::uint8_t options);
2882
2886 void set_option(Options option, bool optionValue);
2887
2891 std::uint16_t get_variable_reference() const;
2892
2897 void set_variable_reference(std::uint16_t variableReferenceValue);
2898
2899 private:
2900 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 24;
2901
2902 std::uint16_t minValue = 0;
2903 std::uint16_t maxValue = 0;
2904 std::uint16_t targetValue = 0;
2906 std::uint16_t value = 0;
2908 std::uint8_t numberOfTicks = 0;
2909 std::uint8_t colour = 0;
2910 std::uint8_t targetLineColour = 0;
2911 std::uint8_t optionsBitfield = 0;
2912 };
2913
2917 {
2918 public:
2921 enum class AttributeName : std::uint8_t
2922 {
2923 Type = 0,
2924 Width = 1,
2925 Height = 2,
2926 Colour = 3,
2927 TargetLineColour = 4,
2928 Options = 5,
2929 StartAngle = 6,
2930 EndAngle = 7,
2931 BarGraphWidth = 8,
2932 MinValue = 9,
2933 MaxValue = 10,
2934 VariableReference = 11,
2935 TargetValueVariableReference = 12,
2936 TargetValue = 13,
2937
2938 NumberOfAttributes = 14
2939 };
2940
2942 enum class Options : std::uint8_t
2943 {
2944 DrawBorder = 0,
2945 DrawTargetLine = 1,
2946 Undefined = 2,
2947 BarGraphType = 3,
2948 Deflection = 4
2949 };
2950
2953
2955 ~OutputArchedBarGraph() override = default;
2956
2960
2963 std::uint32_t get_minumum_object_length() const override;
2964
2968 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
2969
2978 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
2979
2986 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
2987
2990 std::uint16_t get_bar_graph_width() const;
2991
2994 void set_bar_graph_width(std::uint16_t width);
2995
2999 std::uint16_t get_min_value() const;
3000
3004 void set_min_value(std::uint16_t minimumValue);
3005
3009 std::uint16_t get_max_value() const;
3010
3014 void set_max_value(std::uint16_t maximumValue);
3015
3018 std::uint16_t get_value() const;
3019
3022 void set_value(std::uint16_t value);
3023
3026 std::uint8_t get_target_line_colour() const;
3027
3030 void set_target_line_colour(std::uint8_t value);
3031
3034 std::uint8_t get_colour() const;
3035
3038 void set_colour(std::uint8_t value);
3039
3043 bool get_option(Options option) const;
3044
3047 void set_options(std::uint8_t options);
3048
3052 void set_option(Options option, bool optionValue);
3053
3056 std::uint8_t get_start_angle() const;
3057
3060 void set_start_angle(std::uint8_t value);
3061
3064 std::uint8_t get_end_angle() const;
3065
3068 void set_end_angle(std::uint8_t value);
3069
3072 std::uint16_t get_target_value() const;
3073
3076 void set_target_value(std::uint16_t value);
3077
3082 std::uint16_t get_target_value_reference() const;
3083
3088 void set_target_value_reference(std::uint16_t value);
3089
3093 std::uint16_t get_variable_reference() const;
3094
3099 void set_variable_reference(std::uint16_t variableReferenceValue);
3100
3101 private:
3102 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 27;
3103
3104 std::uint16_t barGraphWidth = 0;
3105 std::uint16_t minValue = 0;
3106 std::uint16_t maxValue = 0;
3107 std::uint16_t value = 0;
3108 std::uint16_t targetValue = 0;
3111 std::uint8_t targetLineColour = 0;
3112 std::uint8_t colour = 0;
3113 std::uint8_t optionsBitfield = 0;
3114 std::uint8_t startAngle = 0;
3115 std::uint8_t endAngle = 0;
3116 };
3117
3120 {
3121 public:
3124 enum class AttributeName : std::uint8_t
3125 {
3126 Type = 0,
3127 Width = 1,
3128 Options = 2,
3129 TransparencyColour = 3,
3130 ActualWidth = 4,
3131 ActualHeight = 5,
3132 Format = 6,
3133
3134 NumberOfAttributes = 7
3135 };
3136
3138 enum class Format
3139 {
3140 Monochrome = 0,
3141 FourBitColour = 1,
3142 EightBitColour = 2
3143 };
3144
3146 enum class Options
3147 {
3148 Transparent = 0,
3149 Flashing = 1,
3150 RunLengthEncoded = 2
3151 };
3152
3154 PictureGraphic() = default;
3155
3157 ~PictureGraphic() override = default;
3158
3162
3165 std::uint32_t get_minumum_object_length() const override;
3166
3170 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3171
3180 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3181
3188 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3189
3192 std::vector<std::uint8_t> &get_raw_data();
3193
3197 void set_raw_data(const std::uint8_t *data, std::uint32_t size);
3198
3201 void add_raw_data(std::uint8_t dataByte);
3202
3205 std::uint32_t get_number_of_bytes_in_raw_data() const;
3206
3209 void set_number_of_bytes_in_raw_data(std::uint32_t value);
3210
3213 std::uint16_t get_actual_width() const;
3214
3217 void set_actual_width(std::uint16_t value);
3218
3221 std::uint16_t get_actual_height() const;
3222
3225 void set_actual_height(std::uint16_t value);
3226
3229 Format get_format() const;
3230
3233 void set_format(Format value);
3234
3238 bool get_option(Options option) const;
3239
3242 void set_options(std::uint8_t value);
3243
3247 void set_option(Options option, bool value);
3248
3251 std::uint8_t get_transparency_colour() const;
3252
3255 void set_transparency_colour(std::uint8_t value);
3256
3257 private:
3258 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 17;
3259
3260 std::vector<std::uint8_t> rawData;
3261 std::uint32_t numberOfBytesInRawData = 0;
3262 std::uint16_t actualWidth = 0;
3263 std::uint16_t actualHeight = 0;
3264 std::uint8_t formatByte = 0;
3265 std::uint8_t optionsBitfield = 0;
3266 std::uint8_t transparencyColour = 0;
3267 };
3268
3271 {
3272 public:
3275 enum class AttributeName : std::uint8_t
3276 {
3277 Type = 0,
3278 Value = 1,
3279
3280 NumberOfAttributes = 2
3281 };
3282
3284 NumberVariable() = default;
3285
3287 ~NumberVariable() override = default;
3288
3292
3295 std::uint32_t get_minumum_object_length() const override;
3296
3300 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3301
3310 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3311
3318 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3319
3322 std::uint32_t get_value() const;
3323
3326 void set_value(std::uint32_t value);
3327
3328 private:
3329 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7;
3330
3331 std::uint32_t value = 0;
3332 };
3333
3336 {
3337 public:
3340 enum class AttributeName : std::uint8_t
3341 {
3342 Type = 0,
3343
3344 NumberOfAttributes = 1
3345 };
3346
3348 StringVariable() = default;
3349
3351 ~StringVariable() override = default;
3352
3356
3359 std::uint32_t get_minumum_object_length() const override;
3360
3364 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3365
3374 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3375
3382 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3383
3386 std::string get_value() const;
3387
3390 void set_value(const std::string &value);
3391
3392 private:
3393 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
3394
3395 std::string value;
3396 };
3397
3400 {
3401 public:
3404 enum class AttributeName : std::uint8_t
3405 {
3406 Type = 0,
3407 FontColour = 1,
3408 FontSize = 2,
3409 FontType = 3,
3410 FontStyle = 4,
3411
3412 NumberOfAttributes = 5
3413 };
3414
3416 enum class FontSize : std::uint8_t
3417 {
3418 Size6x8 = 0,
3419 Size8x8 = 1,
3420 Size8x12 = 2,
3421 Size12x16 = 3,
3422 Size16x16 = 4,
3423 Size16x24 = 5,
3424 Size24x32 = 6,
3425 Size32x32 = 7,
3426 Size32x48 = 8,
3427 Size48x64 = 9,
3428 Size64x64 = 10,
3429 Size64x96 = 11,
3430 Size96x128 = 12,
3431 Size128x128 = 13,
3432 Size128x192 = 14
3433 };
3434
3436 enum class FontStyleBits : std::uint8_t
3437 {
3438 Bold = 0,
3439 CrossedOut = 1,
3440 Underlined = 2,
3441 Italic = 3,
3442 Inverted = 4,
3443 Flashing = 5,
3444 FlashingHidden = 6,
3446 };
3447
3449 enum class FontType : std::uint8_t
3450 {
3451 ISO8859_1 = 0,
3452 ISO8859_15 = 1,
3453 ISO8859_2 = 2,
3454 Reserved_1 = 3,
3455 ISO8859_4 = 4,
3456 ISO8859_5 = 5,
3457 Reserved_2 = 6,
3458 ISO8859_7 = 7,
3459 ReservedEnd = 239,
3460 ProprietaryBegin = 240,
3461 ProprietaryEnd = 255
3462 };
3463
3465 FontAttributes() = default;
3466
3468 ~FontAttributes() override = default;
3469
3473
3476 std::uint32_t get_minumum_object_length() const override;
3477
3481 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3482
3491 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3492
3499 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3500
3503 FontType get_type() const;
3504
3507 void set_type(FontType value);
3508
3511 std::uint8_t get_style() const;
3512
3516 bool get_style(FontStyleBits styleSetting) const;
3517
3521 void set_style(FontStyleBits bit, bool value);
3522
3525 void set_style(std::uint8_t value);
3526
3529 FontSize get_size() const;
3530
3533 void set_size(FontSize value);
3534
3537 std::uint8_t get_colour() const;
3538
3541 void set_colour(std::uint8_t value);
3542
3545 std::uint8_t get_font_width_pixels() const;
3546
3549 std::uint8_t get_font_height_pixels() const;
3550
3551 private:
3552 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8;
3553
3554 std::uint8_t colour = 0;
3555 std::uint8_t size = 0;
3556 std::uint8_t type = 0;
3557 std::uint8_t style = 0;
3558 };
3559
3562 {
3563 public:
3566 enum class AttributeName : std::uint8_t
3567 {
3568 Type = 0,
3569 LineColour = 1,
3570 LineWidth = 2,
3571 LineArt = 3,
3572
3573 NumberOfAttributes = 4
3574 };
3575
3577 LineAttributes() = default;
3578
3580 ~LineAttributes() override = default;
3581
3585
3588 std::uint32_t get_minumum_object_length() const override;
3589
3593 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3594
3603 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3604
3611 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3612
3615 std::uint16_t get_line_art_bit_pattern() const;
3616
3619 void set_line_art_bit_pattern(std::uint16_t value);
3620
3621 private:
3622 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8;
3623
3624 std::uint16_t lineArtBitpattern = 0;
3625 };
3626
3629 {
3630 public:
3633 enum class AttributeName : std::uint8_t
3634 {
3635 Type = 0,
3636 FillType = 1,
3637 FillColour = 2,
3638 FillPattern = 3,
3639
3640 NumberOfAttributes = 4
3641 };
3642
3644 enum class FillType : std::uint8_t
3645 {
3646 NoFill = 0,
3647 FillWithLineColor = 1,
3650 };
3651
3653 FillAttributes() = default;
3654
3656 ~FillAttributes() override = default;
3657
3661
3664 std::uint32_t get_minumum_object_length() const override;
3665
3669 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3670
3679 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3680
3687 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3688
3691 std::uint16_t get_fill_pattern() const;
3692
3695 void set_fill_pattern(std::uint16_t value);
3696
3699 FillType get_type() const;
3700
3703 void set_type(FillType value);
3704
3705 private:
3706 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8;
3707
3708 std::uint16_t fillPattern = NULL_OBJECT_ID;
3710 };
3711
3714 {
3715 public:
3718 enum class AttributeName : std::uint8_t
3719 {
3720 Type = 0,
3721 ValidationType = 1,
3722
3723 NumberOfAttributes = 2
3724 };
3725
3728 enum class ValidationType : std::uint8_t
3729 {
3730 ValidCharactersAreListed = 0,
3731 InvalidCharactersAreListed = 1
3732 };
3733
3735 InputAttributes() = default;
3736
3738 ~InputAttributes() override = default;
3739
3743
3746 std::uint32_t get_minumum_object_length() const override;
3747
3751 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3752
3761 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3762
3769 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3770
3773 std::string get_validation_string() const;
3774
3777 void set_validation_string(const std::string &value);
3778
3782
3785 void set_validation_type(ValidationType newValidationType);
3786
3787 private:
3788 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7;
3789
3790 std::string validationString;
3791 ValidationType validationType = ValidationType::ValidCharactersAreListed;
3792 };
3793
3797 {
3798 public:
3801 enum class AttributeName : std::uint8_t
3802 {
3803 Type = 0,
3804 ValidationType = 1,
3805
3806 NumberOfAttributes = 2
3807 };
3808
3811 enum class ValidationType : std::uint8_t
3812 {
3813 ValidCharactersAreListed = 0,
3814 InvalidCharactersAreListed = 1
3815 };
3816
3819
3821 ~ExtendedInputAttributes() override = default;
3822
3826
3829 std::uint32_t get_minumum_object_length() const override;
3830
3834 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3835
3844 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3845
3852 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3853
3856 std::uint8_t get_number_of_code_planes() const;
3857
3860 void set_number_of_code_planes(std::uint8_t value);
3861
3865
3869
3871
3872 private:
3875 {
3876 public:
3877 std::vector<std::vector<wchar_t>> characterRanges;
3879 };
3880 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
3881
3882 std::vector<CodePlane> codePlanes;
3883 ValidationType validationType = ValidationType::ValidCharactersAreListed;
3884 };
3885
3888 {
3889 public:
3892 enum class AttributeName : std::uint8_t
3893 {
3894 Type = 0,
3895 Value = 1,
3896
3897 NumberOfAttributes = 2
3898 };
3899
3901 ObjectPointer() = default;
3902
3904 ~ObjectPointer() override = default;
3905
3909
3912 std::uint32_t get_minumum_object_length() const override;
3913
3917 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3918
3927 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3928
3935 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
3936
3939 std::uint16_t get_value() const;
3940
3944 void set_value(std::uint16_t objectIDToPointTo);
3945
3946 private:
3947 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
3948 std::uint16_t value = NULL_OBJECT_ID;
3949 };
3950
3954 {
3955 public:
3958 enum class AttributeName : std::uint8_t
3959 {
3960 Type = 0,
3961 DefaultObjectID = 1,
3962 ExternalReferenceNAMEID = 2,
3963 ExternalObjectID = 3,
3964
3965 NumberOfAttributes = 4
3966 };
3967
3970
3972 ~ExternalObjectPointer() override = default;
3973
3977
3980 std::uint32_t get_minumum_object_length() const override;
3981
3985 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
3986
3995 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
3996
4003 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4004
4009 std::uint16_t get_default_object_id() const;
4010
4015 void set_default_object_id(std::uint16_t id);
4016
4019 std::uint16_t get_external_reference_name_id() const;
4020
4023 void set_external_reference_name_id(std::uint16_t id);
4024
4032 std::uint16_t get_external_object_id() const;
4033
4041 void set_external_object_id(std::uint16_t id);
4042
4043 private:
4044 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
4045
4049 };
4050
4052 class Macro : public VTObject
4053 {
4054 public:
4057 enum class AttributeName : std::uint8_t
4058 {
4059 Type = 0,
4060
4061 NumberOfAttributes = 1
4062 };
4063
4065 enum class Command
4066 {
4067 HideShowObject = 0xA0,
4068 EnableDisableObject = 0xA1,
4069 SelectInputObject = 0xA2,
4070 ControlAudioSignal = 0xA3,
4071 SetAudioVolume = 0xA4,
4072 ChangeChildLocation = 0xA5,
4073 ChangeSize = 0xA6,
4074 ChangeBackgroundColour = 0xA7,
4075 ChangeNumericValue = 0xA8,
4076 ChangeEndPoint = 0xA9,
4077 ChangeFontAttributes = 0xAA,
4078 ChangeLineAttributes = 0xAB,
4079 ChangeFillAttributes = 0xAC,
4080 ChangeActiveMask = 0xAD,
4081 ChangeSoftKeyMask = 0xAE,
4082 ChangeAttribute = 0xAF,
4083 ChangePriority = 0xB0,
4084 ChangeListItem = 0xB1,
4085 ChangeStringValue = 0xB3,
4086 ChangeChildPosition = 0xB4,
4087 ChangeObjectLabel = 0xB5,
4088 ChangePolygonPoint = 0xB6,
4089 LockUnlockMask = 0xBD,
4090 ExecuteMacro = 0xBE,
4091 ChangePolygonScale = 0xB7,
4092 GraphicsContextCommand = 0xB8,
4093 SelectColourMap = 0xBA,
4094 ExecuteExtendedMacro = 0xBC
4095 };
4096
4098 Macro() = default;
4099
4101 ~Macro() override = default;
4102
4106
4109 std::uint32_t get_minumum_object_length() const override;
4110
4114 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4115
4124 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4125
4132 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4133
4138 bool add_command_packet(const std::vector<std::uint8_t> &command);
4139
4142 std::uint8_t get_number_of_commands() const;
4143
4149 bool get_command_packet(std::uint8_t index, std::vector<std::uint8_t> &command);
4150
4154 bool remove_command_packet(std::uint8_t index);
4155
4158 bool get_are_command_packets_valid() const;
4159
4160 private:
4161 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
4162 static const std::array<std::uint8_t, 28> ALLOWED_COMMANDS_LOOKUP_TABLE;
4163 std::vector<std::vector<std::uint8_t>> commandPackets;
4164 };
4165
4169 class ColourMap : public VTObject
4170 {
4171 public:
4174 enum class AttributeName : std::uint8_t
4175 {
4176 Type = 0,
4177
4178 NumberOfAttributes = 1
4179 };
4180
4182 ColourMap() = default;
4183
4185 ~ColourMap() override = default;
4186
4190
4193 std::uint32_t get_minumum_object_length() const override;
4194
4198 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4199
4208 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4209
4216 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4217
4222 bool set_number_of_colour_indexes(std::uint16_t value);
4223
4226 std::uint16_t get_number_of_colour_indexes() const;
4227
4232 bool set_colour_map_index(std::uint8_t index, std::uint8_t value);
4233
4237 std::uint8_t get_colour_map_index(std::uint8_t index) const;
4238
4239 private:
4240 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5;
4241 std::vector<std::uint8_t> colourMapData;
4242 };
4243
4245 class WindowMask : public VTObject
4246 {
4247 public:
4250 enum class AttributeName : std::uint8_t
4251 {
4252 Type = 0,
4253 BackgroundColour = 1,
4254 Options = 2,
4255 Name = 3,
4256
4257 NumberOfAttributes = 4
4258 };
4259
4283
4285 enum class Options
4286 {
4287 Available = 0,
4288 Transparent = 1
4289 };
4290
4292 WindowMask() = default;
4293
4295 ~WindowMask() override = default;
4296
4300
4303 std::uint32_t get_minumum_object_length() const override;
4304
4308 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4309
4318 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4319
4326 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4327
4331 std::uint16_t get_name_object_id() const;
4332
4336 void set_name_object_id(std::uint16_t object);
4337
4342 std::uint16_t get_title_object_id() const;
4343
4348 void set_title_object_id(std::uint16_t object);
4349
4352 std::uint16_t get_icon_object_id() const;
4353
4356 void set_icon_object_id(std::uint16_t object);
4357
4361
4364 void set_window_type(WindowType type);
4365
4369 bool get_option(Options option) const;
4370
4373 void set_options(std::uint8_t value);
4374
4378 void set_option(Options option, bool value);
4379
4380 private:
4381 static constexpr std::uint32_t MIN_OBJECT_LENGTH = 17;
4382 std::uint16_t name = NULL_OBJECT_ID;
4383 std::uint16_t title = NULL_OBJECT_ID;
4384 std::uint16_t icon = NULL_OBJECT_ID;
4385 std::uint8_t optionsBitfield = 0;
4386 std::uint8_t windowType = 0;
4387 };
4388
4393 {
4394 public:
4397 enum class AttributeName : std::uint8_t
4398 {
4399 Type = 0,
4400
4401 NumberOfAttributes = 1
4402 };
4403
4405 enum class FunctionType : std::uint8_t
4406 {
4407 LatchingBoolean = 0,
4408 Analogue = 1,
4409 NonLatchingBoolean = 2
4410 };
4411
4414
4416 ~AuxiliaryFunctionType1() override = default;
4417
4421
4424 std::uint32_t get_minumum_object_length() const override;
4425
4429 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4430
4439 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4440
4447 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4448
4452
4456
4457 private:
4458 FunctionType functionType = FunctionType::LatchingBoolean;
4459 };
4460
4464 {
4465 public:
4468 enum class AttributeName : std::uint8_t
4469 {
4470 Type = 0,
4471 BackgroundColour = 1,
4472 FunctionAttributes = 2,
4473
4474 NumberOfAttributes = 3
4475 };
4476
4499
4507
4510
4512 ~AuxiliaryFunctionType2() override = default;
4513
4517
4520 std::uint32_t get_minumum_object_length() const override;
4521
4525 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4526
4535 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4536
4543 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4544
4548
4552
4556 bool get_function_attribute(FunctionAttribute attributeToCheck) const;
4557
4561 void set_function_attribute(FunctionAttribute attributeToSet, bool value);
4562
4563 private:
4565 };
4566
4572 {
4573 public:
4576 enum class AttributeName : std::uint8_t
4577 {
4578 Type = 0,
4579
4580 NumberOfAttributes = 1
4581 };
4582
4584 enum class FunctionType : std::uint8_t
4585 {
4586 LatchingBoolean = 0,
4587 Analogue = 1,
4588 NonLatchingBoolean = 2
4589 };
4590
4593
4595 ~AuxiliaryInputType1() override = default;
4596
4600
4603 std::uint32_t get_minumum_object_length() const override;
4604
4608 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4609
4618 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4619
4626 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4627
4631
4635
4640 std::uint8_t get_input_id() const;
4641
4647 bool set_input_id(std::uint8_t id);
4648
4649 private:
4650 FunctionType functionType = FunctionType::LatchingBoolean;
4651 std::uint8_t inputID = 0;
4652 };
4653
4656 {
4657 public:
4660 enum class AttributeName : std::uint8_t
4661 {
4662 Type = 0,
4663 BackgroundColour = 1,
4664 FunctionAttributes = 2,
4665
4666 NumberOfAttributes = 3
4667 };
4668
4676
4679
4681 ~AuxiliaryInputType2() override = default;
4682
4686
4689 std::uint32_t get_minumum_object_length() const override;
4690
4694 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4695
4704 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4705
4712 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4713
4717
4721
4725 bool get_function_attribute(FunctionAttribute attributeToCheck) const;
4726
4730 void set_function_attribute(FunctionAttribute attributeToSet, bool value);
4731
4732 private:
4734 };
4735
4740 {
4741 public:
4744 enum class AttributeName : std::uint8_t
4745 {
4746 Type = 0,
4747 PointerType = 1,
4748 AuxiliaryObjectID = 2,
4749
4750 NumberOfAttributes = 3
4751 };
4752
4755
4758
4762
4765 std::uint32_t get_minumum_object_length() const override;
4766
4770 bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const override;
4771
4780 bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override;
4781
4788 bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override;
4789
4793 std::uint16_t get_auxiliary_object_id() const;
4794
4798 void set_auxiliary_object_id(std::uint16_t id);
4799
4809 std::uint8_t get_pointer_type() const;
4810
4813 void set_pointer_type(std::uint8_t type);
4814
4815 private:
4817 std::uint8_t pointerType = 0;
4818 };
4819
4820} // namespace isobus
4821
4822#endif // ISOBUS_VIRTUAL_TERMINAL_OBJECTS_HPP
General constants used throughout this library.
Similar to a data mask, but takes priority and will be shown over data masks.
Priority
Enumerates the different mask priorities. Higher priority masks will be shown over lower priority one...
@ Low
Low, information only.
@ High
High, operator is in danger or urgent machine malfunction.
@ Medium
Medium, normal alarm, machine is malfunctioning.
AcousticSignal signalPriority
The acoustic signal priority for this mask.
Priority get_mask_priority() const
Returns the priority of the alarm mask.
void set_mask_priority(Priority value)
Sets the priority of the alarm mask.
bool change_soft_key_mask(std::uint16_t newMaskID, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool)
Changes the soft key mask associated to this alarm mask to a new object ID. Performs error checking o...
AcousticSignal get_signal_priority() const
Returns the acoustic signal priority for the alarm mask.
Priority maskPriority
The priority of this mask.
void set_soft_key_mask(std::uint16_t newMaskID)
Changes the soft key mask associated to this alarm mask to a new object ID, but does no checking on t...
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint16_t softKeyMask
Object ID of a soft key mask for this alarm mask, or the null ID.
AcousticSignal
Enumerates the acoustic signal values for the alarm mask. Works only if your VT has a way to make sou...
@ Highest
Most aggressive beeping.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
~AlarmMask() override=default
Virtual destructor for a alarm mask object.
AlarmMask()=default
Constructor for a alarm mask object.
std::uint16_t get_soft_key_mask() const
Returns the object ID of the soft key mask associated with this alarm mask.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_signal_priority(AcousticSignal value)
Sets the acoustic signal priority for the alarm mask.
Defines an auxiliary control designator type 2 object. Auxiliary Control Designator Type 2 Object Poi...
std::uint16_t get_auxiliary_object_id() const
Returns the object ID of the referenced auxiliary object or the null object ID. Used in conjunction w...
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
AuxiliaryControlDesignatorType2()=default
Constructor for a auxiliary control designator type 2 object.
~AuxiliaryControlDesignatorType2() override=default
Virtual destructor for a auxiliary control designator type 2 object.
std::uint16_t auxiliaryObjectID
Object ID of a referenced Auxiliary Function or Auxiliary Input object or NULL_OBJECT_ID.
std::uint8_t pointerType
The pointer type, defines how this should be rendered.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint8_t get_pointer_type() const
Returns the pointer type, which describes how this object should be rendered.
void set_auxiliary_object_id(std::uint16_t id)
Sets the object ID of the referenced auxiliary object Used in conjunction with the pointer type.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
void set_pointer_type(std::uint8_t type)
Sets the pointer type which describes how this object should be rendered.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
Defines an auxiliary function type 1 object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
~AuxiliaryFunctionType1() override=default
Virtual destructor for a auxiliary function type 1 object.
FunctionType
Enumerates the different kinds of auxiliary functions (type 1)
AuxiliaryFunctionType1()=default
Constructor for a auxiliary function type 1 object.
FunctionType get_function_type() const
Returns the function type.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_function_type(FunctionType type)
Sets the function type.
Defines an auxiliary function type 2 object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t functionAttributesBitfield
Bitfield of function attributes defined in FunctionAttribute enum plus the FunctionType
~AuxiliaryFunctionType2() override=default
Virtual destructor for a auxiliary function type 2 object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_function_attribute(FunctionAttribute attributeToSet, bool value)
Sets the value of a specified function attribute.
FunctionType get_function_type() const
Returns the function type.
AuxiliaryFunctionType2()=default
Constructor for a auxiliary function type 2 object.
FunctionAttribute
Enumerates bit offsets of attributes of auxiliary functions to be assigned to an input control.
@ CriticalControl
If this bit is 1, This function can only be controlled by a critical Auxiliary Input (see ISO 15077)
@ SingleAssignment
If 1, Function shall not be assigned with other Auxiliary Functions to same input....
@ AssignmentRestriction
If this bit is 1, This function, if assigned, can only be assigned as specified in the Preferred Assi...
void set_function_type(FunctionType type)
Sets the function type.
FunctionType
Aux inputs must be one of these types, and the input and function types must match.
@ ReservedRangeStart
Reserved for future use.
@ DualBooleanBothNonLatching
Three-Position Switch, (returning to centre position) (Momentary Single Pole, Three Position,...
@ BidirectionalEncoder
Count increases when turning in the encoders "increase" direction and count decreases when turning in...
@ CombinedAnalougeReturnTo50PercentWithDualBooleanLatching
Two way analogue (return to centre position) with latching Boolean at 0% and 100% positions.
@ DualBooleanLatchingUp
Three-Position Switch, latching in up position, momentary down (Single Pole, Three Position,...
@ Analouge
Maintains position setting.
@ BooleanNonLatchingIncreaseValue
Two-position switch (return to off) (Momentary Single Pole, Double Throw)
@ AnalougeReturnTo50Percent
Two way analogue (return to centre position)
@ ReservedRangeEnd
Used for Remove assignment command.
@ QuadratureBooleanNonLatching
Two quadrature mounted Three-Position Switches, (returning to centre position) (Momentary Single Pole...
@ DualBooleanBothLatching
Three-Position Switch (latching in all positions) (Single Pole, Three Position, Centre Off)
@ CombinedAnalougeMaintainsPositionWithDualBooleanLatching
Analogue maintains position setting with latching Boolean at 0% and 100% positions.
@ QuadratureAnalouge
Two quadrature mounted analogue maintain position setting. The centre position of each analogue axis ...
@ DualBooleanLatchingDown
Three-Position Switch, latching in down position, momentary up (Single Pole, Three Position,...
@ QuadratureAnalougeReturnTo50Percent
Two quadrature mounted analogue returns to centre position (The centre position of each analogue axis...
@ AnalougeReturnTo0PercentIncreaseValue
One way analogue input (returns to 0%)
@ BooleanLatchingOnOff
Two-position switch (maintains position) (Single Pole, Double Throw)
bool get_function_attribute(FunctionAttribute attributeToCheck) const
returns the value of a specified function attribute
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
Defines an auxiliary input type 1 object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
~AuxiliaryInputType1() override=default
Virtual destructor for a auxiliary input type 1 object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
AuxiliaryInputType1()=default
Constructor for a auxiliary input type 1 object.
FunctionType functionType
The function type.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
FunctionType
Enumerates the different kinds of auxiliary functions (type 1)
bool set_input_id(std::uint8_t id)
Sets the identification number of the input. Maximum value is 250.
FunctionType get_function_type() const
Returns the function type.
std::uint8_t get_input_id() const
Returns the identification number of the input. Maximum value is 250.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
void set_function_type(FunctionType type)
Sets the function type.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint8_t inputID
The identification number of the input. This number is used by the Auxiliary Input units to identify ...
Defines an auxiliary input type 2 object.
AuxiliaryFunctionType2::FunctionType get_function_type() const
Returns the type of input function that the input control performs when assigned.
void set_function_attribute(FunctionAttribute attributeToSet, bool value)
Sets the value of a specified function attribute.
std::uint8_t functionAttributesBitfield
Bitfield of function attributes defined in FunctionAttribute enum plus the FunctionType
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
AuxiliaryInputType2()=default
Constructor for a auxiliary input type 2 object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_function_attribute(FunctionAttribute attributeToCheck) const
returns the value of a specified function attribute
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
FunctionAttribute
Enumerates bit offsets of attributes of auxiliary inputs.
@ CriticalControl
If this bit is 1, This input can control a critical (auxiliary) function.
@ SingleAssignment
If 1, Input shall only be assigned to a single Auxiliary Function.
~AuxiliaryInputType2() override=default
Virtual destructor for a auxiliary input type 2 object.
void set_function_type(AuxiliaryFunctionType2::FunctionType type)
Sets the type of input function that the input control performs when assigned.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
The Button object defines a button control.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_border_colour(std::uint8_t value)
Sets the border colour.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t get_border_colour() const
Returns the colour of the button's border as an index into the VT colour table.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
Button()=default
Constructor for a button object.
void set_key_code(std::uint8_t value)
Sets the key code associated with this button's events.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint8_t keyCode
Key code assigned by ECU. VT reports this code in the Button Activation message.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
Options
Enumerates the options encoded into the options bitfield for a button.
@ TransparentBackground
If FALSE, the Button's interior background is filled using the background colour attribute....
@ SuppressBorder
If FALSE, VT draws the proprietary border. If TRUE, no border is ever drawn.
@ NoBorder
If FALSE, the Button Border area is used by the VT as described in Bit 2. If TRUE,...
@ CurrentButtonStateIfLatchable
For latchable Buttons. 0=released, 1=latched.
@ Latchable
If TRUE, the Button is latchable and remains pressed until the next activation. If FALSE,...
@ Disabled
If FALSE, the Button is enabled and can be selected and activated by the operator....
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t borderColour
Border colour.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
~Button() override=default
Virtual destructor for a button object.
std::uint8_t get_key_code() const
Returns the key code associated with this button's events.
Defines a colour map object. The Colour Map object, optionally available in VT version 4 and 5,...
std::vector< std::uint8_t > colourMapData
The actual colour map data, which remaps each index from the default table based on the size of this ...
bool set_number_of_colour_indexes(std::uint16_t value)
This is used to initialize the colour map data to either 2, 16, or 256 colour indexes....
bool set_colour_map_index(std::uint8_t index, std::uint8_t value)
Sets the colour map index to the specified value/colour.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t get_number_of_colour_indexes() const
Returns the number of colour indexes in this colour map.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t get_colour_map_index(std::uint8_t index) const
Returns the colour index into the VT colour table at the specified index in this colour map.
~ColourMap() override=default
Virtual destructor for a colour map object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
ColourMap()=default
Constructor for a colour map object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
The Container object is used to group objects for the purpose of moving, hiding or sharing the group.
Container()=default
Constructor for a container object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
~Container() override=default
Virtual destructor for a container object.
bool get_hidden() const
Returns the "hidden" attribute for this container.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool hidden
The hidden attribute state for this container object. True means it will be hidden when rendered.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_hidden(bool value)
Sets the "hidden" attribute for this container.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
The Data Mask describes the objects that will appear in the Data Mask area of the physical display.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t get_soft_key_mask() const
Returns the object ID of the soft key mask associated with this data mask.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_soft_key_mask(std::uint16_t newMaskID)
Changes the soft key mask associated to this data mask to a new object ID, but does no checking on th...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool change_soft_key_mask(std::uint16_t newMaskID, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool)
Changes the soft key mask associated to this data mask to a new object ID. Performs error checking on...
~DataMask() override=default
Virtual destructor for a data mask object.
DataMask()=default
Constructor for a data mask object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint16_t softKeyMaskObjectID
The object ID of the soft key mask associated with this data mask.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
Stores data for a code plane (for utf-16 strings)
std::uint8_t numberOfCharacterRanges
The number of expected character ranges for this code plane.
std::vector< std::vector< wchar_t > > characterRanges
A list of character ranges for this code plane.
The Extended Input Attributes object, available in VT version 4 and later, defines the valid or inval...
void set_number_of_code_planes(std::uint8_t value)
Sets the number of code planes in this extended input attributes object.
ExtendedInputAttributes()=default
Constructor for an extended input attributes object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
~ExtendedInputAttributes() override=default
Virtual destructor for an extended input attributes object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::vector< CodePlane > codePlanes
Code planes to which the character ranges belong.
ValidationType get_validation_type() const
Returns the validation type setting for this object.
ValidationType
Enumerates the different validation types for this object, which describe how to interpret the valida...
void set_validation_type(ValidationType value)
Sets the validation type setting for this object.
ValidationType validationType
Describes how to interpret the validation string.
std::uint8_t get_number_of_code_planes() const
Returns the number of code planes in this extended input attributes.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
The External Object Pointer object, available in VT version 5 and later, allows a Working Set to disp...
std::uint16_t get_external_object_id() const
Returns the external object ID. The referenced object is found in the object pool of the Working Set ...
std::uint16_t defaultObjectID
Object ID of an object which shall be displayed if the External Object ID is not valid,...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint16_t externalObjectID
Object ID of a referenced object or the NULL Object ID.
std::uint16_t get_default_object_id() const
Returns the default object id which is the object ID of an object which shall be displayed if the Ext...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
~ExternalObjectPointer() override=default
Virtual destructor for a object pointer object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
ExternalObjectPointer()=default
Constructor for a object pointer object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
void set_default_object_id(std::uint16_t id)
Sets the default object id which is the object ID of an object which shall be displayed if the Extern...
std::uint16_t get_external_reference_name_id() const
Returns the external reference NAME ID.
void set_external_reference_name_id(std::uint16_t id)
Sets the external reference NAME ID.
void set_external_object_id(std::uint16_t id)
Sets the external object ID. The referenced object is found in the object pool of the Working Set Mas...
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t externalReferenceNAMEID
Object id of an External Reference NAME object or the NULL Object ID.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
This object holds attributes related to filling output shape objects.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
~FillAttributes() override=default
Virtual destructor for a fill attributes object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
FillType type
The fill type/mode associated with this object.
FillType get_type() const
Returns the fill type/mode associated with this object.
std::uint16_t get_fill_pattern() const
Returns the fill pattern associated with this fill attributes object.
void set_fill_pattern(std::uint16_t value)
Sets the fill pattern for this fill attributes object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t fillPattern
Object id of a Picture Graphic object to use as a Fill pattern.
FillAttributes()=default
Constructor for a fill attributes object.
void set_type(FillType value)
Sets the fill type/mode associated with this object.
FillType
Enumerates the different fill types for an object.
@ FillWithSpecifiedColorInFillColorAttribute
Fill with the color specified by a fill attribute.
@ FillWithLineColor
Fill with the color of the outline of the shape.
@ FillWithPatternGivenByFillPatternAttribute
Fill with a patter provided by a fill pattern attribute.
@ NoFill
No fill will be applied.
This object holds attributes related to fonts.
FontAttributes()=default
Constructor for a font attributes object.
~FontAttributes() override=default
Virtual destructor for a font attributes object.
FontType
Enumerates the different font types.
@ ProprietaryBegin
The beginning of the proprietary range.
@ ReservedEnd
Reserved from ISO8859_7 to this value.
@ ProprietaryEnd
The end of the proprietary region.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
FontStyleBits
Enumerates the font style options that can be encoded in a font style bitfield.
@ CrossedOut
Crossed-out font style (strikethrough)
@ ProportionalFontRendering
Enables proportional font rendering if supported by the server.
@ Inverted
Inverted font style (upside down)
@ FlashingHidden
Flashing between hidden and shown font style.
@ Underlined
Underlined font style.
std::uint8_t get_font_width_pixels() const
Returns the width of the associated font size in pixels.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
void set_colour(std::uint8_t value)
Sets the colour of the font to a new VT colour.
void set_size(FontSize value)
Sets the font size to a new value.
void set_style(FontStyleBits bit, bool value)
Sets a specific font style bit to a new value.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
FontType get_type() const
Returns the font type associated to this font attributes object.
FontSize
Enumerates the different font sizes.
@ Size128x128
128x128 Font size
@ Size128x192
128x192 Font size
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t get_colour() const
Returns the font colour as an index into the VT colour table.
std::uint8_t get_font_height_pixels() const
Returns the height of the associated font size in pixels.
std::uint8_t get_style() const
Returns the font style bitfield.
FontSize get_size() const
Returns the font size.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
void set_type(FontType value)
Sets the font type.
This object defines the valid or invalid characters for an Input String object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
~InputAttributes() override=default
Virtual destructor for a input attributes object.
std::string get_validation_string() const
Returns the validation string associated to this input attributes object.
void set_validation_type(ValidationType newValidationType)
Sets the validation type setting for this object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
ValidationType validationType
Describes how to interpret the validation string.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
ValidationType
Enumerates the different validation types for this object, which describe how to interpret the valida...
InputAttributes()=default
Constructor for a input attributes object.
ValidationType get_validation_type() const
Returns the validation type setting for this object.
void set_validation_string(const std::string &value)
Sets the validation string for this object.
std::string validationString
String containing all valid or invalid character codes.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
The Input Boolean object is used to input a TRUE/FALSE type indication from the operator.
void set_foreground_colour_object_id(std::uint16_t fontAttributeValue)
Sets the object ID of the foreground colour object. Does not perform error checking on the type of th...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t get_foreground_colour_object_id() const
Returns the object ID of a font attributes object that defines the foreground colour,...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_variable_reference(std::uint16_t numberVariableValue)
Sets the object ID of the number variable object that contains the value of the Input Boolean object....
void set_enabled(bool isEnabled)
Sets the enabled attribute on this object to a new value.
std::uint8_t value
Used only if it has no number variable child object.
InputBoolean()=default
Constructor for an input boolean object.
bool enabled
If the bool is interactable.
std::uint16_t variableReference
Object ID of a number variable object that contains the value of the Input Boolean object.
std::uint16_t foregroundColourObjectID
Object ID of a font attributes that contains the foreground colour of the Input Boolean object.
std::uint16_t get_variable_reference() const
Returns the object ID of a number variable object that contains the value of the Input Boolean object...
~InputBoolean() override=default
Virtual destructor for an input boolean object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint8_t get_value() const
Returns the value of the boolean (only matters if a reference object is not present)
void set_value(std::uint8_t inputValue)
Sets the value of the boolean object (only matters if a reference object is not present)
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_enabled() const
Returns if this object is enabled based on the enabled attribute.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
The Input List object is used to show one object out of a set of objects, and to allow operator selec...
Options
Enumerates the bits in the options bitfield for an InputList.
@ Enabled
If true the object shall be enabled.
@ RealTimeEditing
If true the value shall be transmitted to the ECU as it is being changed.
std::uint16_t get_variable_reference() const
Returns the variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t numberOfListItems
Number of object references to follow. The size of the list can never exceed this number and this att...
std::uint8_t get_value() const
Returns the value of the selected list index (only matters if there is no child number variable)
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
void set_value(std::uint8_t inputValue)
Sets the selected list index (only matters when the object has no child number variable)
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool change_list_item(std::uint8_t index, std::uint16_t newListItem, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool)
Changes a list item to a new ID by index.
void set_options(std::uint8_t options)
Sets the options bitfield for this object to a new value.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
~InputList() override=default
Virtual destructor for an input list object.
InputList()=default
Constructor for an input list object.
std::uint8_t optionsBitfield
Options byte.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_variable_reference(std::uint16_t referencedObjectID)
A dedicated way to set the stored variable reference so we don't have to worry about the child object...
std::uint8_t get_number_of_list_items() const
Returns the number of items in the list.
void set_option(Options option, bool optionValue)
Sets a single option in the options bitfield to the specified value.
std::uint16_t variableReference
Stores the object ID of a number variable that will be used as the value, or the NULL_OBJECT_ID if no...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint8_t value
Selected list index of this object. Used only if variable reference attribute is NULL.
void set_number_of_list_items(std::uint8_t value)
Sets the number of items in the list.
This object is used to format, display and change a numeric value based on a supplied integer value.
std::uint32_t get_minimum_value() const
Returns the minimum value for this input number.
float scale
Scale to be applied to the input value and min/max values.
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the object ID of a number variable object that contains the value of the Input Number object....
VerticalJustification
The allowable vertical justification options.
@ PositionBottom
The input number is vertically justified to the bottom of its bounding box.
@ PositionTop
The input number is vertically justified to the top of its bounding box.
HorizontalJustification get_horizontal_justification() const
Returns the horizontal justification setting of the input number.
void set_option2(Options2 option, bool newOption)
Sets a single option in the second options bitfield to the specified value.
void set_font_attributes(std::uint16_t fontAttributesValue)
Sets the object ID of a font attributes object that defines the font attributes of the Input Number o...
std::uint16_t get_variable_reference() const
Returns the object ID of a number variable object that contains the value of the Input Number object.
float get_scale() const
Returns the scale factor that is applied to the value of the input number.
void set_offset(std::int32_t newOffset)
Sets the offset that will be applied to the number's value when it is displayed.
std::uint32_t get_maximum_value() const
Returns the maximum value for the input number.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
void set_value(std::uint32_t inputValue)
Sets the value of the input number (only matters if there's no child number variable object).
~InputNumber() override=default
Virtual destructor for an input number object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
void set_justification_bitfield(std::uint8_t newJustification)
Sets the justification bitfield of the input number.
std::uint8_t get_number_of_decimals() const
Returns the number of decimals to display when rendering this input number.
std::uint32_t get_value() const
Returns the value of the input number (only matters if there's no child number variable object).
void set_minimum_value(std::uint32_t newMin)
Sets the minimum value for the input number.
void set_maximum_value(std::uint32_t newMax)
Sets the maximum value for the input number.
void set_options(std::uint8_t newOptions)
Sets the options bitfield for this object to a new value.
Options
Options that can be applied to the input number.
@ Transparent
If TRUE, the input field is displayed with background showing through instead of using the background...
@ DisplayZeroAsBlank
When this option bit is set, a blank field is displayed if and only if the displayed value of the obj...
@ DisplayLeadingZeros
If TRUE, fill left to width of field with zeros; justification is applied after filling.
@ Truncate
If TRUE the value shall be truncated to the specified number of decimals. Otherwise it shall be round...
Options2
More options, for some reason they are different bytes.
@ Enabled
If TRUE the object shall be enabled.
@ RealTimeEditing
If TRUE the value shall be transmitted to the ECU as it is being changed.
void set_option(Options option, bool optionValue)
Sets a single option in the options bitfield to the specified value.
std::uint8_t options2
Options byte 2.
HorizontalJustification
The allowable horizontal justification options.
@ PositionLeft
The input number is horizontally justified to the left side of its bounding box.
@ PositionRight
The input number is horizontally justified to the right side of its bounding box.
@ PositionMiddle
The input number is horizontally justified to the center of its bounding box.
bool get_format() const
Returns if the format option is set for this input number.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_option2(Options2 newOption) const
Returns the state of a single option in the object's second option bitfield.
std::int32_t offset
Offset to be applied to the input value and min/max values.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint32_t value
The raw value of the object, used if no number variable child has been set.
std::uint8_t justificationBitfield
Indicates how the number is positioned in the field defined by height and width.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint16_t get_font_attributes() const
Returns the object ID of a font attributes object that defines the font attributes of the Input Numbe...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t options
Options byte 1.
std::uint16_t variableReference
Stores the object ID of a number variable object that will be used in place of the value attribute if...
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint32_t minimumValue
Raw minimum value for the input before scaling.
std::uint16_t fontAttributes
Stores the object ID of a font attributes object that will be used to display this object.
void set_scale(float newScale)
Sets the scale factor that is applied to the value of the input number.
VerticalJustification get_vertical_justification() const
Returns the vertical justification setting of the input number.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
bool format
0 = use fixed format decimal display (####.nn), 1 = use exponential format ([-]###....
void set_options2(std::uint8_t newOptions)
Sets the second options bitfield for this object to a new value.
std::uint32_t maximumValue
Raw maximum value for the input.
void set_format(bool newFormat)
Sets the format option.
void set_number_of_decimals(std::uint8_t numDecimals)
Sets the number of decimals to display when rendering this number.
std::uint8_t numberOfDecimals
Specifies number of decimals to display after the decimal point.
std::int32_t get_offset() const
Returns the offset that will be applied to the number's value when it is displayed.
InputNumber()=default
Constructor for an input number object.
This object is used to input a character string from the operator.
void set_font_attributes(std::uint16_t fontAttributesValue)
Sets the object ID of a font attributes object that defines the font attributes of the Input String o...
void set_enabled(bool value)
Sets the enable/disable state of the input string.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint16_t get_variable_reference() const
Returns the object ID of a string variable object that contains the value of the Input String object.
bool enabled
If the string is interactable.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t get_input_attributes() const
Returns the object ID of a input attributes object that defines what can be input into the Input Stri...
Options
Options that can be applied to the input string.
@ WrapOnHyphen
If TRUE, Auto-Wrapping can occur between a hyphen and the following character.
@ Transparent
If TRUE, the input field is displayed with background showing through instead of using the background...
@ AutoWrap
Auto-Wrapping rules apply.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t inputAttributes
Stores the object ID of a input attributes object that will be used to determine what can be input in...
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
void set_input_attributes(std::uint16_t inputAttributesValue)
Sets the object ID of a input attributes object that defines what can be input into the Input String ...
void set_justification_bitfield(std::uint8_t value)
Sets the justification bitfield of the string.
VerticalJustification get_vertical_justification() const
Returns the vertical justification setting of the string.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::uint16_t get_font_attributes() const
Returns the object ID of a font attributes object that defines the font attributes of the Input Strin...
VerticalJustification
The allowable vertical justification options.
@ PositionBottom
The input string is vertically justified to the bottom of its bounding box.
@ PositionTop
The input string is vertically justified to the top of its bounding box.
~InputString() override=default
Virtual destructor for a input string object.
std::string get_value() const
Returns a copy of the stored string value. Used only when no string variable objects are children of ...
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the object ID of a string variable object that contains the value of the Input String object....
void set_value(const std::string &value)
Changes the stored string value. Use only when no string variable objects are children of this object...
std::uint16_t variableReference
Stores the object ID of a string variable object that will be used in place of the string value attri...
InputString()=default
Constructor for a input string object.
std::uint16_t fontAttributes
Stores the object ID of a font attributes object that will be used to display this object.
bool get_enabled() const
Returns if the input string is enabled for text entry.
HorizontalJustification
The allowable horizontal justification options.
@ PositionLeft
The input string is horizontally justified to the left side of its bounding box.
@ PositionRight
The input string is horizontally justified to the right side of its bounding box.
@ PositionMiddle
The input string is horizontally justified to the center of its bounding box.
std::uint8_t justificationBitfield
Bitfield of justification options.
HorizontalJustification get_horizontal_justification() const
Returns the horizontal justification setting of the string.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
std::string stringValue
The actual string. Used only if variable reference attribute is NULL. Pad with spaces as necessary to...
The Key objects contained in this object shall be a grouping of Key objects, or Object Pointers to Ke...
void set_name_object_id(std::uint16_t value)
Sets the Object ID of an Output String object or an Object Pointer object that points to an Output St...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
Options
Enumerates the options bits in the options bitfield of a KeyGroup.
@ Transparent
If this bit is 1, the VT shall ignore the background colour attribute in all child Key objects.
@ Available
If 0 (FALSE) this object is not available for use at the present time, even though defined.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
KeyGroup()=default
Constructor for a key group object.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::uint16_t get_name_object_id() const
Sets the Object ID of an Output String object or an Object Pointer object that points to an Output St...
static constexpr std::uint8_t MAX_CHILD_KEYS
There shall be a max of 4 keys per group according to the standard.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_key_group_icon(std::uint16_t value)
Sets the object ID of the icon to use when representing this key group.
std::uint16_t nameID
Object ID of a string variable that contains the name of the key group.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
~KeyGroup() override=default
Virtual destructor for a key group object.
std::uint16_t keyGroupIcon
The VT may use this in the proprietary mapping screen to represent the key group.
bool validate_name(std::uint16_t nameIDToValidate, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const
Validates that the specified name ID is valid for this object.
std::uint16_t get_key_group_icon() const
Returns the key group icon that represents this key group.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
The Key object defines the designator and key code for a Soft Key. Any object located outside of a So...
std::uint8_t get_key_code() const
Returns the key code associated to this key object.
std::uint8_t keyCode
They key code associated with events from this key object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
Key()=default
Constructor for a key object.
void set_key_code(std::uint8_t value)
Sets the key code associated to this key object.
~Key() override=default
Virtual destructor for a key object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
Defines a line attributes object, which describes how lines should be displayed on the VT.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
~LineAttributes() override=default
Virtual destructor for a line attributes object.
LineAttributes()=default
Constructor for a line attributes object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint16_t lineArtBitpattern
Bit pattern art for line. Each bit represents a paintbrush spot.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_line_art_bit_pattern(std::uint16_t value)
Sets the line art bit patter for the line attribute.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t get_line_art_bit_pattern() const
Sets the line art bit pattern. Each bit represents 1 pixel's on/off state.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
Defines a macro object. Performs a list of commands based on a message or event.
bool remove_command_packet(std::uint8_t index)
Deletes a command packet from the macro by index.
std::vector< std::vector< std::uint8_t > > commandPackets
Macro command list.
Command
A subset of the VT command multiplexors that support use in macros.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint8_t get_number_of_commands() const
Returns the number of stored command packets inside this macro (max 255)
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool add_command_packet(const std::vector< std::uint8_t > &command)
Adds a macro command packet to this macro. Essentially these are CAN messages that represent normal E...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool get_command_packet(std::uint8_t index, std::vector< std::uint8_t > &command)
Returns a command packet by index.
~Macro() override=default
Virtual destructor for a macro object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
static const std::array< std::uint8_t, 28 > ALLOWED_COMMANDS_LOOKUP_TABLE
The list of all allowed commands in a table for easy lookup when validating macro content.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool get_are_command_packets_valid() const
Returns if the command packets in this macro are valid.
Macro()=default
Constructor for a macro object.
A number variable holds a 32-bit unsigned integer value.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint32_t get_value() const
Returns the number variable's value.
void set_value(std::uint32_t value)
Sets the number variable's value.
NumberVariable()=default
Constructor for a number variable object.
~NumberVariable() override=default
Virtual destructor for a number variable object.
std::uint32_t value
32-bit unsigned integer value
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
~ObjectPointer() override=default
Virtual destructor for a object pointer object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
void set_value(std::uint16_t objectIDToPointTo)
Sets the object id of the object this object points to. Does not do error checking on the type of obj...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint16_t value
Object ID of the object this object points to, or the NULL Object ID if the pointer should not be dra...
ObjectPointer()=default
Constructor for a object pointer object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint16_t get_value() const
Returns the object id of the object this object points to.
TThis object is similar in concept to a linear bar graph but appears arched. Arched bar graphs are dr...
void set_option(Options option, bool optionValue)
Sets a single option in the options bitfield to the specified value.
std::uint8_t get_target_line_colour() const
Returns the colour of the target line.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t get_target_value() const
Returns the target value of the graph (only matters when no target value reference is used)
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_target_line_colour(std::uint8_t value)
Sets the colour of the target line.
std::uint16_t get_max_value() const
Returns the maximum value of the bar graph.
std::uint16_t get_target_value_reference() const
Returns the target value reference object ID.
std::uint16_t maxValue
Maximum value. Represents when the needle is at the end of the arc.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
void set_max_value(std::uint16_t maximumValue)
Sets the max value of the bar graph.
void set_target_value(std::uint16_t value)
Sets the target value of the graph (only matters when no target value reference is used)
void set_value(std::uint16_t value)
Sets the value of the bar graph (only matters when no child number variable is used)
void set_bar_graph_width(std::uint16_t width)
Sets the width (px) of the bar graph.
void set_end_angle(std::uint8_t value)
Sets the end angle for the graph.
void set_colour(std::uint8_t value)
Sets the colour of the bar graph.
std::uint8_t startAngle
Start angle / 2 in degrees from positive X axis counterclockwise.
std::uint8_t colour
Bar graph fill and border colour.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint16_t targetValueReference
Object ID of a Number Variable object in which to retrieve the bar graph’s target value.
std::uint16_t get_min_value() const
Returns the minimum value of the bar graph.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint16_t barGraphWidth
Bar graph width in pixels. Bar graph width should be less than half the total width,...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
void set_target_value_reference(std::uint16_t value)
Sets the target value reference object ID.
Options
Options that can be applied to the input number.
@ BarGraphType
bar graph type. If this bit is FALSE (0), bar graph is filled
@ Deflection
0 = anticlockwise and 1 = clockwise
@ Undefined
Undefined, set to 0 recommended.
void set_start_angle(std::uint8_t value)
Sets the start angle for the graph.
std::uint16_t get_value() const
Returns the value of the bar graph (only matters when no child number variable is used)
std::uint16_t variableReference
Object ID of a Number Variable object in which to retrieve the bar graph’s value.
std::uint16_t targetValue
Current target value. Used only if Target value variable Reference attribute is NULL.
std::uint8_t endAngle
End angle / 2 in degrees from positive X axis counterclockwise.
std::uint16_t value
Current value. Needle position set to this value, used if variable ref is NULL.
std::uint8_t get_start_angle() const
Returns the start angle of the graph.
std::uint8_t get_end_angle() const
Returns the end angle of the graph.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
OutputArchedBarGraph()=default
Constructor for an output arched bar graph object.
std::uint16_t get_bar_graph_width() const
Returns the width (px) of the bar graph.
std::uint8_t get_colour() const
Returns the colour of the bar graph.
void set_min_value(std::uint16_t minimumValue)
Sets the minimum value for the bar graph.
std::uint8_t targetLineColour
Target line colour (if drawn)
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the value reference object ID, which is a number variable object that should be used to determin...
void set_options(std::uint8_t options)
Sets the options bitfield for this object to a new value.
std::uint16_t minValue
Minimum value. Represents value when needle is at the start of arc.
std::uint16_t get_variable_reference() const
Returns the value reference object ID, which is a number variable object that should be used to deter...
~OutputArchedBarGraph() override=default
Virtual destructor for an output arched bar graph object.
This object outputs an ellipse or circle shape.
std::uint16_t fillAttributes
Object ID of fill attributes used to display this ellipse.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
OutputEllipse()=default
Constructor for an output ellipse object.
void set_ellipse_type(EllipseType value)
Sets the ellipse type.
void set_line_attributes(std::uint16_t lineAttributesObject)
Sets the object ID of the line attributes used to display this ellipse's lines. Does not perform any ...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t endAngle
End angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up)
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_start_angle(std::uint8_t value)
Sets the start angle for the ellipse.
void set_end_angle(std::uint8_t value)
Sets the end angle for the ellipse.
std::uint8_t get_end_angle() const
Returns the end angle/2 (in degrees) from positive X axis counter clockwise(90° is straight up).
void set_fill_attributes(std::uint16_t fillAttributesObject)
Sets the object ID of the fill attributes used to display this ellipse's fill. Does not perform any e...
std::uint16_t get_line_attributes() const
Returns the object ID of the line attributes used to display this ellipse's lines.
EllipseType get_ellipse_type() const
Returns the type of the ellipse.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
~OutputEllipse() override=default
Virtual destructor for an output ellipse object.
std::uint16_t lineAttributes
Object ID of line attributes used to display this ellipse.
@ OpenDefinedByStartEndAngles
The ellipse is defined by start and end angles.
std::uint8_t ellipseType
The type of ellipse.
std::uint8_t get_start_angle() const
Returns the Start angle/2 (in degrees) from positive X axis counter clockwise(90° is straight up) for...
std::uint8_t startAngle
Start angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up).
std::uint16_t get_fill_attributes() const
Returns the object ID of the fill attributes used to display this ellipse's fill.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
This object outputs a line shape. The starting point for the line is found in the parent object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint8_t lineDirection
0 = Line is drawn from top left to bottom right of enclosing virtual rectangle, 1 = Line is drawn fro...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint16_t get_line_attributes() const
Returns the object ID of the line attributes used to display this line.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
LineDirection get_line_direction() const
Returns the line's direction.
OutputLine()=default
Constructor for an output line object.
LineDirection
Enumerates the different directions a line can be drawn.
std::uint16_t lineAttributes
Object ID of line attributes used to display this line.
void set_line_direction(LineDirection value)
Sets the line's direction.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
void set_line_attributes(std::uint16_t lineAttributesObject)
Sets the object ID of the line attributes used to display this line. Does not perform any error check...
~OutputLine() override=default
Virtual destructor for an output line object.
This is a linear bar graph or thermometer, defined by an enclosing rectangle.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint8_t get_number_of_ticks() const
Returns the number of ticks to render across the graph.
std::uint16_t get_min_value() const
Returns the minimum value on the graph. Used to scale the graph's range.
void set_option(Options option, bool optionValue)
Sets a single option in the options bitfield to the specified value.
void set_value(std::uint16_t value)
Sets the value of the graph (only matters if there's no child number variable object).
std::uint8_t get_target_line_colour() const
Returns the target line colour as an index into the VT colour table.
std::uint16_t get_target_value_reference() const
Returns the target value reference object ID.
void set_options(std::uint8_t options)
Sets the options bitfield for this object to a new value.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_number_of_ticks(std::uint8_t value)
Sets the number of ticks to render when drawing the graph.
std::uint8_t targetLineColour
Target line colour (if drawn).
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
OutputLinearBarGraph()=default
Constructor for an output linear bar graph object.
~OutputLinearBarGraph() override=default
Virtual destructor for an output linear bar graph object.
std::uint16_t get_target_value() const
Returns the graph's target value (only matters if there's no target value reference).
void set_target_line_colour(std::uint8_t lineColour)
Sets the target line colour.
void set_target_value_reference(std::uint16_t valueReferenceObjectID)
Sets the target value reference object ID.
std::uint8_t numberOfTicks
Number of ticks to draw along the bar graph.
std::uint16_t value
Current value. Needle position set to this value, used if variable ref is NULL.
std::uint16_t get_max_value() const
Returns the max value for the graph.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the value reference object ID, which is a number variable object that should be used to determin...
void set_colour(std::uint8_t graphColour)
Sets the colour of the graph.
void set_target_value(std::uint16_t valueTarget)
Sets the target value for the graph (only matters if there's no target value reference).
void set_max_value(std::uint16_t value)
Sets the max value for the graph.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t get_value() const
Returns the value of the graph (only matters if there's no child number variable object).
std::uint8_t colour
Bar graph fill and border colour.
void set_min_value(std::uint16_t value)
Sets the minimum value on the graph.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint8_t get_colour() const
Returns the colour of the graph.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t targetValueReference
Object ID of a Number Variable object in which to retrieve the bar graph’s target value.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::uint16_t get_variable_reference() const
Returns the value reference object ID, which is a number variable object that should be used to deter...
std::uint16_t targetValue
Current target value. Used only if Target value variable Reference attribute is NULL.
Options
Options that can be applied to the input number.
@ Direction
0 = Grows negative, 1 = Grows positive
@ BarGraphType
0 = Filled, 1 = not filled with value line
@ AxisOrientation
0 = vertical, 1 = horizontal
std::uint16_t variableReference
Object ID of a Number Variable object in which to retrieve the bar graph’s value.
Used to show one object out of a set of objects.
std::uint8_t get_number_of_list_items() const
Returns the number of items in the list.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t numberOfListItems
Number of object references to follow. The size of the list can never exceed this number and this att...
void set_value(std::uint8_t value)
Sets the value of the selected list index (only matters if no child number variable object is present...
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t value
Selected list index of this object. Used only if variable reference attribute is NULL.
~OutputList() override=default
Virtual destructor for an output list object.
std::uint16_t variableReference
The object ID of a number variable to use for the value/selected index, or NULL_OBJECT_ID.
std::uint8_t get_value() const
Returns the value of the selected list index (only matters if no child number variable object is pres...
bool change_list_item(std::uint8_t index, std::uint16_t newListItem, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool)
Changes a list item to a new ID by index.
void set_number_of_list_items(std::uint8_t value)
Sets the number of items in the list.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
OutputList()=default
Constructor for an output list object.
std::uint16_t get_variable_reference() const
Returns the variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_variable_reference(std::uint16_t referencedObjectID)
A dedicated way to set the stored variable reference so we don't have to worry about the child object...
This object is a meter. Meter is drawn about a circle enclosed within a defined square.
std::uint8_t get_number_of_ticks() const
Returns the number of ticks to render across the meter.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t numberOfTicks
Number of ticks to draw about meter arc.
std::uint8_t get_needle_colour() const
Returns the value of the needle colour.
void set_options(std::uint8_t options)
Sets the options bitfield for this object to a new value.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint8_t get_end_angle() const
Returns the end angle of the meter.
std::uint16_t get_variable_reference() const
Returns the value reference object ID, which is a number variable object that should be used to deter...
void set_option(Options option, bool optionValue)
Sets a single option in the options bitfield to the specified value.
std::uint8_t get_start_angle() const
Returns the start angle for the meter.
void set_needle_colour(std::uint8_t colourIndex)
Sets the value of the needle colour.
void set_border_colour(std::uint8_t colourIndex)
Sets the border colour of the meter.
void set_end_angle(std::uint8_t value)
Sets the end angle for this meter in degrees from the +x axis counter clockwise.
std::uint16_t get_min_value() const
Returns the minimum value of the output meter.
std::uint16_t get_value() const
Returns the value for the output meter (only matters if there's no child number variable object).
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
void set_min_value(std::uint16_t value)
Sets the minimum value of the output meter.
std::uint16_t minValue
Minimum value. Represents value when needle is at the start of arc.
void set_arc_and_tick_colour(std::uint8_t colourIndex)
Sets the arc and tick colour for the meter.
void set_value(std::uint16_t value)
Sets the value of the output meter (only matters if there's no child number variable object).
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the value reference object ID, which is a number variable object that should be used to determin...
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t variableReference
Object ID of a number variable to use for the value, or NULL_OBJECT_ID if not used.
std::uint16_t maxValue
Maximum value. Represents when the needle is at the end of the arc.
std::uint8_t startAngle
Start angle / 2 in degrees from positive X axis counterclockwise.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
void set_number_of_ticks(std::uint8_t ticks)
Sets the number of ticks to render when drawing the meter.
std::uint8_t arcAndTickColour
Meter arc and tick colour (if drawn)
void set_max_value(std::uint16_t value)
Sets the max value for the output meter.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_start_angle(std::uint8_t value)
Sets the start angle for the meter.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t get_max_value() const
Returns the max value for the output meter.
Options
Options that can be applied to the input number.
@ DeflectionDirection
0 = From min to max, counterclockwisee. 1 = from min to max, clockwise
~OutputMeter() override=default
Virtual destructor for an output meter object.
std::uint8_t get_arc_and_tick_colour() const
Returns the arc and tick colour for the meter.
std::uint8_t endAngle
End angle / 2 in degrees from positve X axis counterclockwise.
std::uint8_t needleColour
Needle (indicator) colour.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint8_t borderColour
Border colour (if drawn)
OutputMeter()=default
Constructor for an output meter object.
std::uint8_t get_border_colour() const
Returns the border colour of the meter.
std::uint16_t value
Current value. Needle position set to this value, used if variable ref is NULL.
This object is used to format and output a numeric value based on a supplied integer value.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::uint16_t get_font_attributes() const
Returns the object ID of a font attributes object that defines the font attributes of the Output Numb...
std::uint8_t get_number_of_decimals() const
Returns the number of decimals to render in the output number.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint8_t numberOfDecimals
Specifies number of decimals to display after the decimal point.
void set_number_of_decimals(std::uint8_t decimalValue)
Sets the number of decimals to render in the output number.
HorizontalJustification
The allowable horizontal justification options.
@ PositionLeft
The output number is horizontally justified to the left side of its bounding box.
@ PositionRight
The output number is horizontally justified to the right side of its bounding box.
@ PositionMiddle
The output number is horizontally justified to the center of its bounding box.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
void set_variable_reference(std::uint16_t referencedObjectID)
A dedicated way to set the stored variable reference so we don't have to worry about the child object...
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
float get_scale() const
Returns the scale factor of the output number.
void set_font_attributes(std::uint16_t fontAttributesValue)
Sets the object ID of a font attributes object that defines the font attributes of the Output Number ...
std::uint32_t get_value() const
Returns the value of the output number (only matters if there's no child number variable object).
std::int32_t offset
Offset to be applied to the input value and min/max values.
void set_scale(float scaleValue)
Sets the scale factor for the output number.
void set_format(bool shouldFormatAsExponential)
Sets the format option for this object.
VerticalJustification
The allowable vertical justification options.
@ PositionBottom
The output number is vertically justified to the bottom of its bounding box.
@ PositionTop
The output number is vertically justified to the top of its bounding box.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint8_t justificationBitfield
Bitfield of justification options.
void set_value(std::uint32_t inputValue)
Sets the value of the output number (only matters if there's no child number variable object).
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t variableReference
Stores the object ID of a number variable that will be used as the value, or the NULL_OBJECT_ID if no...
bool get_format() const
Returns if the "format" option is set for this object.
Options
Options that can be applied to the input number.
@ Transparent
If true, the input field is displayed with background showing through instead of using the background...
@ DisplayZeroAsBlank
When this option bit is set, a blank field is displayed if and only if the displayed value of the obj...
@ DisplayLeadingZeros
If true, fill left to width of field with zeros; justification is applied after filling.
@ Truncate
If true the value shall be truncated to the specified number of decimals. Otherwise it shall be round...
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::int32_t get_offset() const
Returns the offset that is applied to the output number.
VerticalJustification get_vertical_justification() const
Returns the vertical justification of the output number within its bounding box.
std::uint32_t value
Raw unsigned value of the output field before scaling (unsigned 32-bit integer). Used only if variabl...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_justification_bitfield(std::uint8_t value)
Sets the justification bitfield to a new value.
~OutputNumber() override=default
Virtual destructor for an output number object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t fontAttributes
Stores the object ID of a font attributes object that will be used to display this object.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
OutputNumber()=default
Constructor for an output number object.
std::uint16_t get_variable_reference() const
Returns the variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
float scale
Scale to be applied to the input value and min/max values.
bool format
0 = use fixed format decimal display (####.nn), 1 = use exponential format ([-]###....
void set_offset(std::int32_t offsetValue)
Sets the offset of the output number.
HorizontalJustification get_horizontal_justification() const
Returns the horizontal justification of the output number within its bounding box.
This object outputs a polygon.
void set_type(PolygonType value)
Sets the polygon type for this object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t get_line_attributes() const
Returns the object ID of the line attributes used to display this polygon's lines.
void set_fill_attributes(std::uint16_t fillAttributesObject)
Sets the object ID of the fill attributes used to display this polygon's fill. Does not perform any e...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
void add_point(std::uint16_t x, std::uint16_t y)
Adds a point to the polygon, defined by x and y coordinates.
void set_line_attributes(std::uint16_t lineAttributesObject)
Sets the object ID of the line attributes used to display this polygon's lines. Does not perform any ...
std::vector< PolygonPoint > pointList
List of points that make up the polygon. Must be at least 3 points!
std::uint16_t get_fill_attributes() const
Returns the object ID of the fill attributes used to display this polygon's fill.
std::uint8_t polygonType
The polygon type. Affects how the object gets drawn.
PolygonType
Polygon type. The first three types are useful only if the polygon is to be filled.
@ Complex
Similar to Non-convex but edges cross. Uses Complex Fill Algorithm.
@ Convex
On any given horizontal line, only two points on the polygon are encountered.
@ Open
This type cannot be filled.
@ NonConvex
On any given horizontal line, more than two points on the polygon edges can be encountered but the po...
std::uint8_t get_number_of_points() const
Returns the number of polygon points.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
PolygonType get_type() const
Returns the polygon type of this object.
PolygonPoint get_point(std::uint8_t index)
Returns a point from the polygon by index.
~OutputPolygon() override=default
Virtual destructor for an output polygon object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
OutputPolygon()=default
Constructor for an output polygon object.
std::uint16_t fillAttributes
Object ID of fill attributes used to display this polygon.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t lineAttributes
Object ID of line attributes used to display this polygon.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
This object outputs a rectangle shape.
std::uint8_t get_line_suppression_bitfield() const
Returns the line suppression bitfield.
~OutputRectangle() override=default
Virtual destructor for an output rectangle object.
std::uint16_t lineAttributes
Object ID of line attributes used to display this rectangle.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_line_suppression_bitfield(std::uint8_t value)
Sets the line suppression bitfield value.
void set_line_attributes(std::uint16_t lineAttributesObject)
Sets the object ID of the line attributes used to display this rectangle's lines. Does not perform an...
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint16_t fillAttributes
Object ID of fill attributes used to display this rectangle.
std::uint16_t get_line_attributes() const
Returns the object ID of the line attributes used to display this rectangle's lines.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
OutputRectangle()=default
Constructor for an output rectangle object.
std::uint16_t get_fill_attributes() const
Returns the object ID of the fill attributes used to display this rectangle's fill.
std::uint8_t lineSuppressionBitfield
Bitfield of line suppression options.
LineSuppressionOption
The different line suppression options.
@ SuppressLeftSideLine
Suppress the left line of the rectangle.
@ SuppressBottomLine
Suppress the bottom line of the rectangle.
@ SuppressTopLine
Suppress the top line of the rectangle.
@ SuppressRightSideLine
Suppress the right side of the rectangle.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
void set_fill_attributes(std::uint16_t fillAttributesObject)
Sets the object ID of the fill attributes used to display this rectangle's fill. Does not perform any...
This object is used to output a string of text.
VerticalJustification
The allowable vertical justification options.
@ PositionBottom
Output string is vertically aligned to the bottom of its bounding box.
@ PositionTop
Output string is vertically aligned to the top of its bounding box.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
OutputString()=default
Constructor for an output string object.
void set_font_attributes(std::uint16_t fontAttributesValue)
Sets the object ID of a font attributes object that defines the font attributes of the Output String ...
HorizontalJustification
The allowable horizontal justification options.
@ PositionLeft
Output string is horizontally aligned to the left of its bounding box.
@ PositionRight
Output string is horizontally aligned to the right of its bounding box.
@ PositionMiddle
Output string is horizontally aligned to the center of its bounding box.
std::string get_value() const
Returns the value of the string, used only if the variable reference (a child var string) is NULL_OBJ...
std::string stringValue
The actual string. Used only if variable reference attribute is NULL. Pad with spaces as necessary to...
void set_justification_bitfield(std::uint8_t value)
Sets the justification bitfield for the object to a new value.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
void set_variable_reference(std::uint16_t variableReferenceValue)
Sets the object ID of a string variable object that contains the value of the Output String object....
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::uint16_t get_variable_reference() const
Returns the object ID of a string variable object that contains the value of the Output String object...
HorizontalJustification get_horizontal_justification() const
Returns the horizontal justification of the output string within its bounding box.
std::uint16_t fontAttributes
Stores the object ID of a font attributes object that will be used to display this object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
Options
Enumerates the option bits in the options bitfield for an output string.
@ WrapOnHyphen
If TRUE, Auto-Wrapping can occur between a hyphen and the next character.
@ Transparent
If TRUE, the output field is displayed with background showing through instead of using the backgroun...
@ AutoWrap
Auto-Wrapping rules apply.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
void set_value(const std::string &value)
Sets the value of the string (only matters if it has no child string variable)
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint16_t get_font_attributes() const
Returns the object ID of a font attributes object that defines the font attributes of the Output Stri...
std::uint8_t justificationBitfield
Bitfield of justification options.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint16_t variableReference
Stores the object ID of a string variable object that will be used in place of the string value attri...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
VerticalJustification get_vertical_justification() const
Returns the vertical justification of the output string within its bounding box.
~OutputString() override=default
Virtual destructor for an output string object.
This object displays a picture graphic (bitmap)
void set_format(Format value)
Sets the picture's colour format.
std::uint32_t get_number_of_bytes_in_raw_data() const
Returns the number of bytes in the raw data that comprises the underlying bitmap.
std::uint16_t get_actual_height() const
Returns the actual height of the underlying bitmap.
void set_raw_data(const std::uint8_t *data, std::uint32_t size)
Sets a large chunk of data to the underlying bitmap.
std::uint16_t actualHeight
The actual height of the bitmap.
std::uint8_t optionsBitfield
Options bitfield, see the options enum.
std::uint8_t formatByte
The format option byte.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
Options
Enumerates the different options bits in the options bitfield.
@ RunLengthEncoded
Data is RLE See Clause B.12.2 Picture Graphic object raw data format and compression.
@ Transparent
0 = Opaque, 1 = Transparent
@ Flashing
0 = Normal, 1 = Flashing
void set_number_of_bytes_in_raw_data(std::uint32_t value)
Sets the number of bytes in the raw data that comprises the underlying bitmap.
void set_actual_height(std::uint16_t value)
Sets the actual height of the underlying bitmap.
std::vector< std::uint8_t > rawData
The raw picture data. Not a standard bitmap, but rather indicies into the VT colour table.
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
std::vector< std::uint8_t > & get_raw_data()
Returns a reference to the underlying bitmap data.
void set_actual_width(std::uint16_t value)
Sets the actual width of the underlying bitmap.
std::uint8_t transparencyColour
The colour to render as transparent if so set in the options.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
~PictureGraphic() override=default
Virtual destructor for a picture graphic (bitmap) object.
std::uint32_t numberOfBytesInRawData
Number of bytes of raw data.
void set_transparency_colour(std::uint8_t value)
Sets the transparency colour to use when rendering the object as an index into the VT colour table.
Format
Enumerates the different colour formats a picture graphic can have (mutually exclusive)
@ EightBitColour
colour pixel per byte. Each byte represents a colour palette index of 0 through 255
@ FourBitColour
2 colour pixels per byte. Each nibble(4 bits) represents a colour palette index of 0 through 15.
@ Monochrome
Monochrome; 8 pixels per byte. Each bit represents a colour palette index of 0 or 1.
std::uint16_t actualWidth
The actual width of the bitmap.
std::uint16_t get_actual_width() const
Returns the actual width of the underlying bitmap.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
Format get_format() const
Returns the picture's colour format.
PictureGraphic()=default
Constructor for a picture graphic (bitmap) object.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
void add_raw_data(std::uint8_t dataByte)
Sets one byte of raw data to the underlying bitmap.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint8_t get_transparency_colour() const
Returns the transparency colour to use when rendering the object as an index into the VT colour table...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
The Soft Key Mask is a Container object that contains Key objects, Object Pointer objects,...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
SoftKeyMask()=default
Constructor for a soft key mask object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
~SoftKeyMask() override=default
Virtual destructor for a soft key mask object.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
A String Variable holds a fixed length string.
~StringVariable() override=default
Virtual destructor for a string variable object.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::string get_value() const
Returns the actual string value stored in this object.
void set_value(const std::string &value)
Sets the actual string value stored in this object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
StringVariable()=default
Constructor for a string variable object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::string value
The actual value of the string, for non utf-16 strings.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
An object that represents the VT's active colour table.
static constexpr std::size_t VT_COLOUR_TABLE_SIZE
The size of the VT colour table as specified in ISO11783-6.
VTColourTable()
Constructor for a VT colour table.
std::array< VTColourVector, VT_COLOUR_TABLE_SIZE > colourTable
Colour table data. Associates VT colour index with RGB value.
VTColourVector get_colour(std::uint8_t colourIndex) const
Returns the colour vector associated to the specified VT colour index, which is what gets provided no...
void set_colour(std::uint8_t colourIndex, VTColourVector newColour)
Sets the specified VT colour index to a new RGB colour value.
float g
Green value for a pixel, range 0.0f to 1.0f.
constexpr VTColourVector()
Default constructor for a VT Colour, which produces the colour black.
constexpr VTColourVector(float red, float green, float blue)
Constructor for a VT Colour which initializes to an arbitrary colour.
float r
Red value for a pixel, range 0.0f to 1.0f.
float b
Blue value for a pixel, range 0.0f to 1.0f.
std::int16_t yLocation
Relative Y location of the top left corner of the object.
std::int16_t xLocation
Relative X location of the top left corner of the object.
ChildObjectData()=default
Default constructor for child object data with default values.
Generic VT object base class.
bool offset_all_children_with_id(std::uint16_t childObjectID, std::int8_t xOffset, std::int8_t yOffset)
Offsets all child objects with the specified ID by the amount specified relative to its parent.
std::uint16_t width
The width of the object. Not always applicable, but often used.
void set_child_x(std::uint16_t index, std::int16_t xOffset)
Sets the X offset of the child object associated with the specified index into the parent object.
MacroMetadata get_macro(std::uint8_t index) const
Returns the macro ID at the specified index.
virtual VirtualTerminalObjectType get_object_type() const =0
Returns the VT object type of the underlying derived object.
std::uint16_t get_id() const
Returns the object ID of this VT object.
AttributeError
Enumerates the bit indices of the error fields that can be set when changing an attribute.
std::uint16_t height
The height of the object. Not always applicable, but often used.
static std::shared_ptr< VTObject > get_object_by_id(std::uint16_t objectID, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool)
Returns a VT object from its member pool by ID, or the null id if it does not exist.
void pop_child()
Removes the last added child object. This is meant to be a faster way to deal with objects that only ...
void add_macro(MacroMetadata macroToAdd)
Adds a macro to the list of macros referenced by this object.
std::uint16_t get_child_id(std::uint16_t index) const
Returns the ID of the child by index, if one was added previously.
void add_child(std::uint16_t objectID, std::int16_t relativeXLocation, std::int16_t relativeYLocation)
Adds an object as a child to another object, which essentially creates a tree of object association.
void set_child_y(std::uint16_t index, std::int16_t yOffset)
Sets the Y offset of the child object associated with the specified index into the parent object.
std::uint16_t objectID
Object identifier. Shall be unique within the object pool.
std::uint16_t get_number_children() const
Returns the number of child objects within this object.
std::int16_t get_child_y(std::uint16_t index) const
Returns the Y offset of the child object associated with the specified index into the parent object.
void set_width(std::uint16_t value)
Sets the width of this object in px.
virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError)=0
Sets an attribute and optionally returns an error code in the last parameter.
VTObject()=default
Constructor for a generic VT object. Sets up default values and the pointer to the member object pool...
void remove_child(std::uint16_t objectIDToRemove, std::int16_t relativeXLocation, std::int16_t relativeYLocation)
Removes an object reference from another object. All fields must exactly match for the object to be r...
std::uint8_t backgroundColor
The background color (from the VT colour table)
virtual bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const =0
Gets an attribute and returns the raw data in the last parameter.
std::int16_t get_child_x(std::uint16_t index) const
Returns the X offset of the child object associated with the specified index into the parent object.
void set_background_color(std::uint8_t value)
Sets the background color attribute of this object.
std::uint16_t get_height() const
Returns the height of this object in px.
std::vector< MacroMetadata > macros
List of macros referenced by this object.
void set_id(std::uint16_t value)
Sets the object ID of this VT object.
std::vector< ChildObjectData > children
List of child objects.
void set_height(std::uint16_t value)
Sets the height of this object in px.
std::uint8_t get_number_macros() const
Returns the number of macros referenced by this object.
std::uint16_t get_width() const
Returns the width of this object in px.
std::uint8_t get_background_color() const
Returns the background color attribute of this object.
virtual std::uint32_t get_minumum_object_length() const =0
Returns the minimum binary serialized length of the associated object.
virtual ~VTObject()=default
Virtual destructor for a generic VT object.
virtual bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const =0
Performs basic error checking on the object and returns if the object is valid.
Defines a window mask object.
WindowMask()=default
Constructor for a window mask object.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
~WindowMask() override=default
Virtual destructor for a window mask object.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
std::uint16_t get_title_object_id() const
Returns Object ID of an Output String object or an Object Pointer object that points to an Output Str...
WindowType
Enumerates the different kinds of window masks which imply how they are displayed and what they conta...
@ NumericOutputValueNoUnits2x1
This window displays a single numeric output with no units of measure in two horizontal window cells.
@ NumericInputValueWithUnits1x1
This window displays a single numeric input with units of measure in a single window cell.
@ NumericOutputValueWithUnits2x1
This window displays a single numeric output with units of measure in two horizontal window cells.
@ NumericInputValueWithUnits2x1
This window displays a single numeric input with units of measure in two horizontal window cells.
@ StringInputValue1x1
This window displays a single string input in a single window cell.
@ Freeform
the Working Set supplies and positions all child objects contained inside the window....
@ NumericInputValueNoUnits2x1
This window displays a single numeric input with no units of measure in two horizontal window cells.
@ NumericInputValueNoUnits1x1
This window displays a single numeric input with no units of measure in a single window cell.
@ StringInputValue2x1
This window displays a single string input in two horizontal window cells.
@ HorizontalLinearBarGraphNoUnits1x1
This window displays a single horizontal linear bar graph in a single window cell.
@ SingleButton2x1
This window displays a single Button object in two horizontal window cells.
@ SingleButton1x1
This window displays a single Button object in a single window cell.
@ HorizontalLinearBarGraphNoUnits2x1
This window displays a single horizontal linear bar graph in two horizontal window cells.
@ NumericOutputValueWithUnits1x1
This window displays a single numeric output with units of measure in a single window cell.
@ DoubleButton1x1
This window displays two Button objects in a single window cell.
@ StringOutputValue2x1
This window displays a single string output in two horizontal window cells.
@ StringOutputValue1x1
This window displays a single string output in a single window cell.
@ NumericOutputValueNoUnits1x1
This window displays a single numeric output with no units of measure in a single window cell.
@ DoubleButton2x1
This window displays two Button objects in two horizontal window cells.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint16_t name
Object ID of an Output String object or an Object Pointer object that points to an Output String obje...
bool get_option(Options option) const
Returns the state of a single option in the object's option bitfield.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
void set_window_type(WindowType type)
Sets the window type for this object.
WindowType get_window_type() const
Returns the window type for this object.
std::uint8_t windowType
The window type, which implies its size.
void set_icon_object_id(std::uint16_t object)
Sets the object ID of an output object that contains an icon for the window.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
std::uint8_t optionsBitfield
Bitfield of options defined in Options enum.
std::uint16_t icon
Object ID of an Output object or an Object Pointer object that points to an Output object that contai...
std::uint16_t title
Object ID of an Output String object or an Object Pointer object that points to an Output String obje...
void set_title_object_id(std::uint16_t object)
Sets the Object ID of an Output String object or an Object Pointer object that points to an Output St...
void set_name_object_id(std::uint16_t object)
Sets the object ID of an Output String object or an Object Pointer object that points to an Output St...
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
std::uint16_t get_name_object_id() const
Returns object ID of an Output String object or an Object Pointer object that points to an Output Str...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
std::uint16_t get_icon_object_id() const
Returns the object ID of an output object that contains an icon for the window.
Options
Enumerates the bit indexes of options encoded in the object's options bitfield.
@ Transparent
Transparent. If this bit is 1, the background colour attribute shall not be used and the Window shall...
@ Available
If 0 (FALSE) this window is not available for use at the present time, even though defined.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
This object shall include one or more objects that fit inside a Soft Key designator for use as an ide...
std::vector< std::string > languageCodes
A list of 2 character language codes, like "en".
std::uint16_t activeMask
The currently active mask for this working set.
std::uint16_t get_active_mask() const
Returns tha currently active mask for this working set.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
bool selectable
If this working set is selectable right now.
void set_active_mask(std::uint16_t value)
Sets the object id of the active mask for this working set.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
bool get_is_valid(const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool) const override
Performs basic error checking on the object and returns if the object is valid.
void set_selectable(bool value)
Sets if the working set is selectable.
static constexpr std::uint32_t MIN_OBJECT_LENGTH
The fewest bytes of IOP data that can represent this object.
bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const override
Gets an attribute and returns the raw data in the last parameter.
~WorkingSet() override=default
Virtual destructor for a working set object.
bool get_selectable() const
Returns if the working set is currently selectable.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map< std::uint16_t, std::shared_ptr< VTObject > > &objectPool, AttributeError &returnedError) override
Sets an attribute and optionally returns an error code in the last parameter.
WorkingSet()=default
Constructor for a working set object.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...
constexpr std::uint16_t NULL_OBJECT_ID
Special ID used to indicate no object.
EventID
Enumerates VT events. Events can be uniquely associated with a Macro object to execute when the event...
@ OnChangeSize
Change Size command.
@ OnShow
For Container objects, triggered by the hide/show command, with "show" indicated; For mask objects,...
@ OnEntryOfANewValue
Operator completes entry by activating the ENTER means - value has changed.
@ OnChangeAttribute
Change Attribute command.
@ OnHide
For Container objects, triggered by the hide/show command, with "hide" indicated; for mask objects,...
@ OnChangeValue
Change numeric value or change string value command.
@ OnChangePriority
Change Priority command.
@ OnESC
Input aborted on an input field either by the operator or the Working Set.
@ OnKeyPress
A Soft Key or Button is pressed.
@ OnDisable
Input object is disabled (only enabled input objects can be navigated to). An Animation object is dis...
@ OnChangeEndpoint
Change Endpoint command.
@ OnPointingEventRelease
Operator touch/click is released.
@ OnChangeSoftKeyMask
Change Soft Key mask command.
@ OnChangeBackgroundColour
Change Background Colour command.
@ OnInputFieldDeselection
The input field, Key or Button has lost focus, operator has navigated off of the input field or Butto...
@ OnActivate
Working set is made active.
@ ChangeLineAttributes
Change Line Attributes command.
@ OnEnable
Input object is enabled (only enabled input objects can be navigated to). An Animation object is enab...
@ ProprietaryRangeBegin
Proprietary range begin.
@ OnDeactivate
Working set is made inactive.
@ OnEntryOfAValue
Operator completes entry by activating the ENTER means - value does not have to change.
@ OnPointingEventPress
Operator touches/clicks an area that causes a pointing event.
@ ProprietaryRangeEnd
Proprietary range end.
@ OnInputFieldSelection
The input field, Key or Button has received focus, operator has navigated onto the input field or But...
@ ChangeFontAttributes
Change Font Attributes command.
@ ChangeFillAttributes
Change Fill Attributes command.
@ UseExtendedMacroReference
This is not an event. When value is found in the event list of an object, it indicates that a 16 bit ...
@ OnKeyRelease
A Soft Key or Button is released.
@ ChangeChildLocation
Change Child Location command.
@ OnChangeActiveMask
Change Active mask command.
@ OnChangeChildPosition
Change Child Position command.
VirtualTerminalObjectType
The types of objects in an object pool by object type byte value.
@ ManufacturerDefined9
Manufacturer defined objects should not be sent to any other Vendors VT.
@ GraphicData
Used to define the data for a graphic image.
@ ExternalReferenceNAME
Used to identify the WS Master of a Working Set that can be referenced.
@ ManufacturerDefined3
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined14
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ObjectLabelRefrenceList
Used to specify an object label.
@ ManufacturerDefined4
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined5
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined10
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined8
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined6
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined7
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined11
Manufacturer defined objects should not be sent to any other Vendors VT.
@ GraphicsContext
Used to output a graphics context.
@ ManufacturerDefined2
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined13
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined15
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ScaledGraphic
Used to display a scaled representation of a graphic object.
@ ExternalObjectDefinition
Used to list the objects that may be referenced from another Working Set.
@ Animation
The Animation object is used to display simple animations.
@ ManufacturerDefined1
Manufacturer defined objects should not be sent to any other Vendors VT.
@ ManufacturerDefined12
Manufacturer defined objects should not be sent to any other Vendors VT.
A helper structure to group a macro ID with an event ID.
EventID event
The event that triggers this macro.
std::uint16_t macroID
The ID of the macro to execute.
std::uint16_t yValue
Y value of a point relative to the top left corner of the polygon.
std::uint16_t xValue
X value of a point relative to the top left corner of the polygon.