34 for (std::uint8_t i = 16; i <= 231; i++)
36 std::uint8_t index = i - 16;
38 std::uint32_t redCounter = (index / 36);
39 std::uint32_t greenCounter = ((index / 6) % 6);
40 std::uint32_t blueCounter = (index % 6);
42 colourTable[i] =
VTColourVector((51.0f * (redCounter) / 255.0f), ((51.0f * (greenCounter)) / 255.0f), ((51.0f * blueCounter) / 255.0f));
104 return static_cast<std::uint16_t
>(
children.size());
107 void VTObject::add_child(std::uint16_t objectID, std::int16_t relativeXLocation, std::int16_t relativeYLocation)
125 std::int16_t retVal = 0;
136 std::int16_t retVal = 0;
149 children.at(index).xLocation = xOffset;
157 children.at(index).yLocation = yOffset;
167 if (child.id == childObjectID)
169 child.xLocation += xOffset;
170 child.yLocation += yOffset;
176 void VTObject::remove_child(std::uint16_t objectIDToRemove, std::int16_t relativeXLocation, std::int16_t relativeYLocation)
180 if ((child->id == objectIDToRemove) && (child->xLocation == relativeXLocation) && (child->yLocation == relativeYLocation))
198 return static_cast<std::uint8_t
>(
macros.size());
203 macros.push_back(macroToAdd);
208 if (index <
macros.size())
218 std::shared_ptr<VTObject>
VTObject::get_object_by_id(std::uint16_t objectID,
const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool)
220 std::shared_ptr<VTObject> retVal =
nullptr;
224 auto object = objectPool.at(
objectID);
225 if (
nullptr !=
object)
249 return MIN_OBJECT_LENGTH;
254 bool anyWrongChildType =
false;
259 if (
nullptr != childObject)
261 switch (childObject->get_object_type())
284 anyWrongChildType =
true;
290 return ((!anyWrongChildType) &&
298 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
302 case AttributeName::BackgroundColour:
309 case AttributeName::Selectable:
311 set_selectable(0 != rawAttributeData);
316 case AttributeName::ActiveMask:
318 set_active_mask(
static_cast<std::uint16_t
>(rawAttributeData));
325 returnedError = AttributeError::InvalidAttributeID;
332 returnedError = AttributeError::InvalidAttributeID;
341 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
345 case static_cast<std::uint8_t
>(AttributeName::Type):
352 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
359 case static_cast<std::uint8_t
>(AttributeName::Selectable):
361 returnedAttributeData = get_selectable();
366 case static_cast<std::uint8_t
>(AttributeName::ActiveMask):
368 returnedAttributeData = get_active_mask();
410 return MIN_OBJECT_LENGTH;
415 bool anyWrongChildType =
false;
416 std::uint8_t numberOfSoftKeyMasks = 0;
421 if (
nullptr != childObject)
423 switch (childObject->get_object_type())
458 numberOfSoftKeyMasks++;
464 anyWrongChildType =
true;
469 if (numberOfSoftKeyMasks > 1)
471 anyWrongChildType =
true;
476 return ((!anyWrongChildType) &&
484 if (attributeID <
static_cast<std::uint8_t
>(DataMask::AttributeName::NumberOfAttributes))
488 case DataMask::AttributeName::BackgroundColour:
495 case DataMask::AttributeName::SoftKeyMask:
497 returnedError = AttributeError::InvalidAttributeID;
498 retVal = change_soft_key_mask(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
504 returnedError = AttributeError::InvalidAttributeID;
511 returnedError = AttributeError::InvalidAttributeID;
520 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
524 case static_cast<std::uint8_t
>(AttributeName::Type):
531 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
538 case static_cast<std::uint8_t
>(AttributeName::SoftKeyMask):
540 returnedAttributeData = get_soft_key_mask();
561 set_soft_key_mask(newMaskID);
564 else if ((objectPool.end() != objectPool.find(newMaskID)) &&
565 (
nullptr != objectPool.at(newMaskID)) &&
568 set_soft_key_mask(newMaskID);
576 softKeyMaskObjectID = newMaskID;
581 return softKeyMaskObjectID;
591 return MIN_OBJECT_LENGTH;
596 bool anyWrongChildType =
false;
601 if (
nullptr != childObject)
603 switch (childObject->get_object_type())
638 anyWrongChildType =
true;
644 return ((!anyWrongChildType) &&
652 if (attributeID <
static_cast<std::uint8_t
>(AlarmMask::AttributeName::NumberOfAttributes))
656 case AlarmMask::AttributeName::BackgroundColour:
663 case AlarmMask::AttributeName::SoftKeyMask:
665 returnedError = AttributeError::AnyOtherError;
666 retVal = change_soft_key_mask(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
670 case AlarmMask::AttributeName::Priority:
679 returnedError = AttributeError::AnyOtherError;
684 case AlarmMask::AttributeName::AcousticSignal:
693 returnedError = AttributeError::AnyOtherError;
700 returnedError = AttributeError::InvalidAttributeID;
707 returnedError = AttributeError::InvalidAttributeID;
716 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
720 case static_cast<std::uint8_t
>(AttributeName::Type):
727 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
734 case static_cast<std::uint8_t
>(AttributeName::SoftKeyMask):
736 returnedAttributeData = get_soft_key_mask();
741 case static_cast<std::uint8_t
>(AttributeName::Priority):
743 returnedAttributeData =
static_cast<std::uint8_t
>(get_mask_priority());
748 case static_cast<std::uint8_t
>(AttributeName::AcousticSignal):
750 returnedAttributeData =
static_cast<std::uint8_t
>(get_signal_priority());
772 maskPriority = value;
777 return signalPriority;
782 signalPriority = value;
791 set_soft_key_mask(newMaskID);
794 else if ((
nullptr != objectPool.at(newMaskID)) &&
797 set_soft_key_mask(newMaskID);
805 softKeyMask = newMaskID;
820 return MIN_OBJECT_LENGTH;
825 bool anyWrongChildType =
false;
830 if (
nullptr != childObject)
832 switch (childObject->get_object_type())
867 anyWrongChildType =
true;
873 return ((!anyWrongChildType) &&
880 returnedError = AttributeError::InvalidAttributeID;
888 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
892 case static_cast<std::uint8_t
>(AttributeName::Type):
899 case static_cast<std::uint8_t
>(AttributeName::Width):
906 case static_cast<std::uint8_t
>(AttributeName::Height):
913 case static_cast<std::uint8_t
>(AttributeName::Hidden):
915 returnedAttributeData = get_hidden();
947 return MIN_OBJECT_LENGTH;
952 bool anyWrongChildType =
false;
957 if (
nullptr != childObject)
959 switch (childObject->get_object_type())
972 anyWrongChildType =
true;
978 return ((!anyWrongChildType) &&
986 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
990 case AttributeName::BackgroundColour:
999 returnedError = AttributeError::InvalidAttributeID;
1006 returnedError = AttributeError::InvalidAttributeID;
1013 bool retVal =
false;
1015 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1017 switch (attributeID)
1019 case static_cast<std::uint8_t
>(AttributeName::Type):
1026 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
1050 return MIN_OBJECT_LENGTH;
1055 bool anyWrongChildType =
false;
1060 if (
nullptr != childObject)
1062 switch (childObject->get_object_type())
1089 anyWrongChildType =
true;
1095 return ((!anyWrongChildType) &&
1101 bool retVal =
false;
1103 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1107 case AttributeName::BackgroundColour:
1114 case AttributeName::KeyCode:
1116 set_key_code(
static_cast<std::uint8_t
>(rawAttributeData));
1123 returnedError = AttributeError::InvalidAttributeID;
1130 returnedError = AttributeError::InvalidAttributeID;
1137 bool retVal =
false;
1139 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1141 switch (attributeID)
1143 case static_cast<std::uint8_t
>(AttributeName::Type):
1150 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
1157 case static_cast<std::uint8_t
>(AttributeName::KeyCode):
1159 returnedAttributeData = get_key_code();
1191 return MIN_OBJECT_LENGTH;
1196 bool anyWrongChildType =
false;
1203 if (
nullptr != childObject)
1205 switch (childObject->get_object_type())
1216 auto objectPointer = std::static_pointer_cast<ObjectPointer>(childObject);
1220 if ((
nullptr !=
get_object_by_id(objectPointer->get_value(), objectPool)) &&
1227 anyWrongChildType =
true;
1239 anyWrongChildType =
true;
1246 if (!validate_name(nameID, objectPool))
1248 anyWrongChildType =
true;
1253 anyWrongChildType =
true;
1255 return ((!anyWrongChildType) &&
1261 bool retVal =
false;
1263 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1267 case AttributeName::Options:
1269 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
1274 case AttributeName::Name:
1276 returnedError = AttributeError::InvalidValue;
1278 if (objectPool.find(
objectID) != objectPool.end())
1280 auto newName =
static_cast<std::uint16_t
>(rawAttributeData);
1281 auto newNameObject = objectPool.at(newName);
1283 if (validate_name(newName, objectPool))
1294 returnedError = AttributeError::InvalidAttributeID;
1301 returnedError = AttributeError::InvalidAttributeID;
1308 bool retVal =
false;
1310 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1312 switch (attributeID)
1314 case static_cast<std::uint8_t
>(AttributeName::Type):
1321 case static_cast<std::uint8_t
>(AttributeName::Options):
1323 returnedAttributeData = optionsBitfield;
1328 case static_cast<std::uint8_t
>(AttributeName::Name):
1330 returnedAttributeData = get_name_object_id();
1347 return keyGroupIcon;
1352 keyGroupIcon = value;
1357 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
1362 optionsBitfield = value;
1369 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
1373 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
1391 bool KeyGroup::validate_name(std::uint16_t nameIDToValidate,
const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool)
const
1393 auto newNameObject = objectPool.at(nameIDToValidate);
1394 bool retVal =
false;
1397 (
nullptr != newNameObject) &&
1403 if (newNameObject->get_number_children() > 0)
1405 auto label = objectPool.at(std::static_pointer_cast<ObjectPointer>(newNameObject)->
get_child_id(0));
1407 if ((
nullptr != label) &&
1429 return MIN_OBJECT_LENGTH;
1434 bool anyWrongChildType =
false;
1439 if (
nullptr != childObject)
1441 switch (childObject->get_object_type())
1467 anyWrongChildType =
true;
1473 return ((!anyWrongChildType) &&
1479 bool retVal =
false;
1481 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1485 case AttributeName::Width:
1487 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
1492 case AttributeName::Height:
1494 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
1499 case AttributeName::BackgroundColour:
1506 case AttributeName::BorderColour:
1508 set_border_colour(
static_cast<std::uint8_t
>(rawAttributeData));
1513 case AttributeName::KeyCode:
1515 set_key_code(
static_cast<std::uint8_t
>(rawAttributeData));
1520 case AttributeName::Options:
1522 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
1529 returnedError = AttributeError::InvalidAttributeID;
1536 returnedError = AttributeError::InvalidAttributeID;
1543 bool retVal =
false;
1545 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1547 switch (attributeID)
1549 case static_cast<std::uint8_t
>(AttributeName::Type):
1556 case static_cast<std::uint8_t
>(AttributeName::Width):
1563 case static_cast<std::uint8_t
>(AttributeName::Height):
1570 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
1577 case static_cast<std::uint8_t
>(AttributeName::BorderColour):
1579 returnedAttributeData = get_border_colour();
1584 case static_cast<std::uint8_t
>(AttributeName::KeyCode):
1586 returnedAttributeData = get_key_code();
1591 case static_cast<std::uint8_t
>(AttributeName::Options):
1593 returnedAttributeData = optionsBitfield;
1620 return borderColour;
1625 borderColour = value;
1630 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
1635 optionsBitfield = value;
1642 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
1646 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
1657 return MIN_OBJECT_LENGTH;
1662 bool anyWrongChildType =
false;
1667 auto variableReference =
get_object_by_id(get_variable_reference(), objectPool);
1669 if (
nullptr != variableReference)
1673 anyWrongChildType =
true;
1678 anyWrongChildType =
true;
1685 auto foregroundColour =
get_object_by_id(get_foreground_colour_object_id(), objectPool);
1687 if (
nullptr != foregroundColour)
1691 anyWrongChildType =
true;
1696 anyWrongChildType =
true;
1704 if ((
nullptr == childObject) ||
1707 anyWrongChildType =
true;
1711 return (!anyWrongChildType);
1716 bool retVal =
false;
1718 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1722 case AttributeName::BackgroundColour:
1729 case AttributeName::Width:
1731 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
1736 case AttributeName::ForegroundColour:
1738 returnedError = AttributeError::AnyOtherError;
1742 set_foreground_colour_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
1745 else if (objectPool.find(
static_cast<std::uint16_t
>(rawAttributeData)) != objectPool.end())
1747 if (
nullptr != objectPool.at(
static_cast<std::uint16_t
>(rawAttributeData)) &&
1750 set_foreground_colour_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
1755 returnedError = AttributeError::InvalidValue;
1761 case AttributeName::VariableReference:
1763 returnedError = AttributeError::AnyOtherError;
1767 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
1770 else if (objectPool.find(
static_cast<std::uint16_t
>(rawAttributeData)) != objectPool.end())
1772 if (
nullptr != objectPool.at(
static_cast<std::uint16_t
>(rawAttributeData)) &&
1775 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
1780 returnedError = AttributeError::InvalidValue;
1786 case AttributeName::Value:
1788 set_value(
static_cast<std::uint8_t
>(rawAttributeData));
1793 case AttributeName::Enabled:
1795 set_enabled(0 != rawAttributeData);
1802 returnedError = AttributeError::InvalidAttributeID;
1809 returnedError = AttributeError::InvalidAttributeID;
1816 bool retVal =
false;
1818 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
1820 switch (attributeID)
1822 case static_cast<std::uint8_t
>(AttributeName::Type):
1829 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
1836 case static_cast<std::uint8_t
>(AttributeName::Width):
1843 case static_cast<std::uint8_t
>(AttributeName::ForegroundColour):
1845 returnedAttributeData = get_foreground_colour_object_id();
1850 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
1852 returnedAttributeData = get_variable_reference();
1857 case static_cast<std::uint8_t
>(AttributeName::Value):
1859 returnedAttributeData = get_value();
1864 case static_cast<std::uint8_t
>(AttributeName::Enabled):
1866 returnedAttributeData = get_enabled();
1898 enabled = isEnabled;
1903 return foregroundColourObjectID;
1908 foregroundColourObjectID = fontAttributeValue;
1913 return variableReference;
1918 variableReference = numberVariableValue;
1928 return MIN_OBJECT_LENGTH;
1933 bool anyWrongChildType =
false;
1937 auto objectToCheck =
get_object_by_id(get_variable_reference(), objectPool);
1939 if (
nullptr != objectToCheck)
1943 anyWrongChildType =
true;
1948 anyWrongChildType =
true;
1956 if (
nullptr != objectToCheck)
1960 anyWrongChildType =
true;
1965 anyWrongChildType =
true;
1973 if (
nullptr != objectToCheck)
1977 anyWrongChildType =
true;
1982 anyWrongChildType =
true;
1990 if ((
nullptr == childObject) ||
1993 anyWrongChildType =
true;
1997 return (!anyWrongChildType);
2002 bool retVal =
false;
2004 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2008 case AttributeName::Width:
2010 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
2015 case AttributeName::Height:
2017 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
2022 case AttributeName::BackgroundColour:
2029 case AttributeName::FontAttributes:
2031 auto fontAttributesObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2034 ((
nullptr != fontAttributesObject) &&
2037 set_font_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
2042 returnedError = AttributeError::InvalidValue;
2047 case AttributeName::InputAttributes:
2049 auto inputAttributesObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2052 ((
nullptr != inputAttributesObject) &&
2055 set_input_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
2060 returnedError = AttributeError::InvalidValue;
2065 case AttributeName::Options:
2067 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
2072 case AttributeName::VariableReference:
2074 auto variableReferenceObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2077 ((
nullptr != variableReferenceObject) &&
2080 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
2085 returnedError = AttributeError::InvalidValue;
2090 case AttributeName::Justification:
2092 set_justification_bitfield(
static_cast<std::uint8_t
>(rawAttributeData));
2097 case AttributeName::Enabled:
2099 set_enabled(0 != rawAttributeData);
2106 returnedError = AttributeError::InvalidAttributeID;
2113 returnedError = AttributeError::InvalidAttributeID;
2120 bool retVal =
false;
2122 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2124 switch (attributeID)
2126 case static_cast<std::uint8_t
>(AttributeName::Type):
2133 case static_cast<std::uint8_t
>(AttributeName::Width):
2140 case static_cast<std::uint8_t
>(AttributeName::Height):
2147 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
2154 case static_cast<std::uint8_t
>(AttributeName::FontAttributes):
2156 returnedAttributeData = get_font_attributes();
2161 case static_cast<std::uint8_t
>(AttributeName::InputAttributes):
2163 returnedAttributeData = get_input_attributes();
2168 case static_cast<std::uint8_t
>(AttributeName::Options):
2170 returnedAttributeData = optionsBitfield;
2175 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
2177 returnedAttributeData = get_variable_reference();
2182 case static_cast<std::uint8_t
>(AttributeName::Justification):
2184 returnedAttributeData = justificationBitfield;
2189 case static_cast<std::uint8_t
>(AttributeName::Enabled):
2191 returnedAttributeData = get_enabled();
2218 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
2223 optionsBitfield = value;
2230 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
2234 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
2250 justificationBitfield = value;
2260 stringValue = value;
2265 return fontAttributes;
2270 fontAttributes = fontAttributesValue;
2275 return variableReference;
2280 variableReference = variableReferenceValue;
2285 return inputAttributes;
2290 inputAttributes = inputAttributesValue;
2300 return MIN_OBJECT_LENGTH;
2305 bool anyWrongChildType =
false;
2310 auto variableReference =
get_object_by_id(get_variable_reference(), objectPool);
2312 if (
nullptr != variableReference)
2316 anyWrongChildType =
true;
2321 anyWrongChildType =
true;
2330 if (
nullptr != fontAttributes)
2334 anyWrongChildType =
true;
2339 anyWrongChildType =
true;
2347 if ((
nullptr == childObject) ||
2350 anyWrongChildType =
true;
2354 return (!anyWrongChildType);
2359 bool retVal =
false;
2361 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2365 case AttributeName::Width:
2367 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
2372 case AttributeName::Height:
2374 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
2379 case AttributeName::BackgroundColour:
2386 case AttributeName::FontAttributes:
2388 auto fontAttributesObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2391 ((
nullptr != fontAttributesObject) &&
2394 set_font_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
2399 returnedError = AttributeError::InvalidValue;
2404 case AttributeName::Options:
2406 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
2411 case AttributeName::VariableReference:
2413 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2416 ((
nullptr != variableObject) &&
2419 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
2424 returnedError = AttributeError::InvalidValue;
2429 case AttributeName::MinValue:
2431 set_minimum_value(rawAttributeData);
2436 case AttributeName::MaxValue:
2438 set_maximum_value(rawAttributeData);
2443 case AttributeName::Offset:
2445 auto temp =
reinterpret_cast<std::int32_t *
>(&rawAttributeData);
2451 case AttributeName::Scale:
2453 auto temp =
reinterpret_cast<float *
>(&rawAttributeData);
2459 case AttributeName::NumberOfDecimals:
2461 set_number_of_decimals(
static_cast<std::uint8_t
>(rawAttributeData));
2466 case AttributeName::Format:
2468 set_format(0 != rawAttributeData);
2473 case AttributeName::Justification:
2475 set_justification_bitfield(
static_cast<std::uint8_t
>(rawAttributeData));
2482 returnedError = AttributeError::InvalidAttributeID;
2489 returnedError = AttributeError::InvalidAttributeID;
2496 bool retVal =
false;
2498 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2500 switch (attributeID)
2502 case static_cast<std::uint8_t
>(AttributeName::Type):
2509 case static_cast<std::uint8_t
>(AttributeName::Width):
2516 case static_cast<std::uint8_t
>(AttributeName::Height):
2523 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
2530 case static_cast<std::uint8_t
>(AttributeName::FontAttributes):
2532 returnedAttributeData = get_font_attributes();
2537 case static_cast<std::uint8_t
>(AttributeName::Options):
2539 returnedAttributeData = options;
2544 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
2546 returnedAttributeData = get_variable_reference();
2551 case static_cast<std::uint8_t
>(AttributeName::MinValue):
2553 returnedAttributeData = get_minimum_value();
2558 case static_cast<std::uint8_t
>(AttributeName::MaxValue):
2560 returnedAttributeData = get_maximum_value();
2565 case static_cast<std::uint8_t
>(AttributeName::Offset):
2567 auto temp =
reinterpret_cast<const std::uint32_t *
>(&offset);
2568 returnedAttributeData = *temp;
2573 case static_cast<std::uint8_t
>(AttributeName::Scale):
2575 auto temp =
reinterpret_cast<const std::uint32_t *
>(&scale);
2576 returnedAttributeData = *temp;
2581 case static_cast<std::uint8_t
>(AttributeName::NumberOfDecimals):
2583 returnedAttributeData = get_number_of_decimals();
2588 case static_cast<std::uint8_t
>(AttributeName::Format):
2590 returnedAttributeData = get_format();
2595 case static_cast<std::uint8_t
>(AttributeName::Justification):
2597 returnedAttributeData = justificationBitfield;
2602 case static_cast<std::uint8_t
>(AttributeName::Value):
2604 returnedAttributeData = value;
2609 case static_cast<std::uint8_t
>(AttributeName::Options2):
2611 returnedAttributeData = options2;
2638 justificationBitfield = newJustification;
2653 return maximumValue;
2658 maximumValue = newMax;
2663 return minimumValue;
2668 minimumValue = newMin;
2683 return numberOfDecimals;
2688 numberOfDecimals = numDecimals;
2703 return (0 != ((1 <<
static_cast<std::uint8_t
>(newOption)) & options));
2708 options = newOptions;
2715 options |= (1 <<
static_cast<std::uint8_t
>(option));
2719 options &= ~(1 <<
static_cast<std::uint8_t
>(option));
2725 return (0 != ((1 <<
static_cast<std::uint8_t
>(newOption)) & options2));
2730 options2 = newOptions;
2737 options2 |= (1 <<
static_cast<std::uint8_t
>(option));
2741 options2 &= ~(1 <<
static_cast<std::uint8_t
>(option));
2757 return fontAttributes;
2762 fontAttributes = fontAttributesValue;
2767 return variableReference;
2772 variableReference = variableReferenceValue;
2782 return MIN_OBJECT_LENGTH;
2787 bool anyWrongChildType =
false;
2792 if (
nullptr != childObject)
2794 switch (childObject->get_object_type())
2820 anyWrongChildType =
true;
2826 return ((!anyWrongChildType) &&
2832 bool retVal =
false;
2834 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2838 case AttributeName::Width:
2840 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
2845 case AttributeName::Height:
2847 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
2852 case AttributeName::VariableReference:
2854 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
2857 ((
nullptr != variableObject) &&
2860 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
2865 returnedError = AttributeError::InvalidValue;
2870 case AttributeName::Value:
2872 set_value(rawAttributeData);
2877 case AttributeName::Options:
2879 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
2886 returnedError = AttributeError::InvalidAttributeID;
2893 returnedError = AttributeError::InvalidAttributeID;
2900 bool retVal =
false;
2902 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
2904 switch (attributeID)
2906 case static_cast<std::uint8_t
>(AttributeName::Type):
2913 case static_cast<std::uint8_t
>(AttributeName::Width):
2920 case static_cast<std::uint8_t
>(AttributeName::Height):
2927 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
2929 returnedAttributeData = get_variable_reference();
2934 case static_cast<std::uint8_t
>(AttributeName::Value):
2936 returnedAttributeData = get_value();
2941 case static_cast<std::uint8_t
>(AttributeName::Options):
2943 returnedAttributeData = optionsBitfield;
2960 return (0 != (optionsBitfield & (1 <<
static_cast<std::uint8_t
>(option))));
2965 optionsBitfield = options;
2972 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
2976 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
2992 bool retVal =
false;
3020 children.at(index).id = newListItem;
3034 children.at(index).id = newListItem;
3043 variableReference = referencedObjectID;
3048 return variableReference;
3053 return numberOfListItems;
3058 numberOfListItems = value;
3068 return MIN_OBJECT_LENGTH;
3073 bool anyWrongChildType =
false;
3078 auto variableReference =
get_object_by_id(get_variable_reference(), objectPool);
3080 if (
nullptr != variableReference)
3084 anyWrongChildType =
true;
3089 anyWrongChildType =
true;
3098 if (
nullptr != fontAttributes)
3102 anyWrongChildType =
true;
3107 anyWrongChildType =
true;
3115 if ((
nullptr == childObject) ||
3118 anyWrongChildType =
true;
3122 return (!anyWrongChildType);
3127 bool retVal =
false;
3129 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3133 case AttributeName::Width:
3135 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
3140 case AttributeName::Height:
3142 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
3147 case AttributeName::BackgroundColour:
3154 case AttributeName::FontAttributes:
3156 auto fontAttributesObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
3159 ((
nullptr != fontAttributesObject) &&
3162 set_font_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
3167 returnedError = AttributeError::InvalidValue;
3172 case AttributeName::Options:
3174 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
3179 case AttributeName::VariableReference:
3181 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
3184 ((
nullptr != variableObject) &&
3187 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
3192 returnedError = AttributeError::InvalidValue;
3197 case AttributeName::Justification:
3199 set_justification_bitfield(
static_cast<std::uint8_t
>(rawAttributeData));
3206 returnedError = AttributeError::InvalidAttributeID;
3213 returnedError = AttributeError::InvalidAttributeID;
3220 bool retVal =
false;
3222 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3224 switch (attributeID)
3226 case static_cast<std::uint8_t
>(AttributeName::Type):
3233 case static_cast<std::uint8_t
>(AttributeName::Width):
3240 case static_cast<std::uint8_t
>(AttributeName::Height):
3247 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
3254 case static_cast<std::uint8_t
>(AttributeName::FontAttributes):
3256 returnedAttributeData = get_font_attributes();
3261 case static_cast<std::uint8_t
>(AttributeName::Options):
3263 returnedAttributeData = optionsBitfield;
3268 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
3270 returnedAttributeData = get_variable_reference();
3275 case static_cast<std::uint8_t
>(AttributeName::Justification):
3277 returnedAttributeData = justificationBitfield;
3294 return (0 != (optionsBitfield & (1 <<
static_cast<std::uint8_t
>(option))));
3299 optionsBitfield = value;
3306 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
3310 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
3326 justificationBitfield = value;
3336 stringValue = value;
3341 return fontAttributes;
3346 fontAttributes = fontAttributesValue;
3351 return variableReference;
3356 variableReference = variableReferenceValue;
3366 return MIN_OBJECT_LENGTH;
3371 bool anyWrongChildType =
false;
3376 auto variableReference =
get_object_by_id(get_variable_reference(), objectPool);
3378 if (
nullptr != variableReference)
3382 anyWrongChildType =
true;
3387 anyWrongChildType =
true;
3396 if (
nullptr != fontAttributes)
3400 anyWrongChildType =
true;
3405 anyWrongChildType =
true;
3413 if ((
nullptr == childObject) ||
3416 anyWrongChildType =
true;
3420 return (!anyWrongChildType);
3425 bool retVal =
false;
3427 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3431 case AttributeName::Width:
3433 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
3438 case AttributeName::Height:
3440 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
3445 case AttributeName::BackgroundColour:
3452 case AttributeName::FontAttributes:
3454 auto fontAttributesObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
3457 ((
nullptr != fontAttributesObject) &&
3460 set_font_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
3465 returnedError = AttributeError::InvalidValue;
3470 case AttributeName::Options:
3472 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
3477 case AttributeName::VariableReference:
3479 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
3482 ((
nullptr != variableObject) &&
3485 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
3490 returnedError = AttributeError::InvalidValue;
3495 case AttributeName::Offset:
3497 auto temp =
reinterpret_cast<std::int32_t *
>(&rawAttributeData);
3503 case AttributeName::Scale:
3505 auto temp =
reinterpret_cast<float *
>(&rawAttributeData);
3511 case AttributeName::NumberOfDecimals:
3513 set_number_of_decimals(
static_cast<std::uint8_t
>(rawAttributeData));
3518 case AttributeName::Format:
3520 set_format(0 != rawAttributeData);
3525 case AttributeName::Justification:
3527 set_justification_bitfield(
static_cast<std::uint8_t
>(rawAttributeData));
3534 returnedError = AttributeError::InvalidAttributeID;
3541 returnedError = AttributeError::InvalidAttributeID;
3548 bool retVal =
false;
3550 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3552 switch (attributeID)
3554 case static_cast<std::uint8_t
>(AttributeName::Type):
3561 case static_cast<std::uint8_t
>(AttributeName::Width):
3568 case static_cast<std::uint8_t
>(AttributeName::Height):
3575 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
3582 case static_cast<std::uint8_t
>(AttributeName::FontAttributes):
3584 returnedAttributeData = get_font_attributes();
3589 case static_cast<std::uint8_t
>(AttributeName::Options):
3591 returnedAttributeData = optionsBitfield;
3596 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
3598 returnedAttributeData = get_variable_reference();
3603 case static_cast<std::uint8_t
>(AttributeName::Offset):
3605 auto temp =
reinterpret_cast<const std::uint32_t *
>(&offset);
3606 returnedAttributeData = *temp;
3611 case static_cast<std::uint8_t
>(AttributeName::Scale):
3613 auto temp =
reinterpret_cast<const std::uint32_t *
>(&scale);
3614 returnedAttributeData = *temp;
3619 case static_cast<std::uint8_t
>(AttributeName::NumberOfDecimals):
3621 returnedAttributeData = get_number_of_decimals();
3626 case static_cast<std::uint8_t
>(AttributeName::Format):
3628 returnedAttributeData = get_format();
3633 case static_cast<std::uint8_t
>(AttributeName::Justification):
3635 returnedAttributeData = justificationBitfield;
3652 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
3657 optionsBitfield = value;
3664 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
3668 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
3684 justificationBitfield = value;
3704 offset = offsetValue;
3709 return numberOfDecimals;
3714 numberOfDecimals = decimalValue;
3724 format = shouldFormatAsExponential;
3739 variableReference = referencedObjectID;
3744 return variableReference;
3749 return fontAttributes;
3754 fontAttributes = fontAttributesValue;
3764 return MIN_OBJECT_LENGTH;
3769 bool anyWrongChildType =
false;
3774 auto variableReference =
get_object_by_id(get_variable_reference(), objectPool);
3776 if (
nullptr != variableReference)
3780 anyWrongChildType =
true;
3785 anyWrongChildType =
true;
3792 if (
nullptr != childObject)
3794 switch (childObject->get_object_type())
3828 anyWrongChildType =
true;
3834 return ((!anyWrongChildType) &&
3840 bool retVal =
false;
3842 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3846 case AttributeName::Width:
3848 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
3853 case AttributeName::Height:
3855 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
3860 case AttributeName::VariableReference:
3862 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
3865 ((
nullptr != variableObject) &&
3868 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
3873 returnedError = AttributeError::InvalidValue;
3878 case AttributeName::Value:
3880 set_value(
static_cast<std::uint8_t
>(rawAttributeData));
3887 returnedError = AttributeError::InvalidAttributeID;
3894 returnedError = AttributeError::InvalidAttributeID;
3901 bool retVal =
false;
3903 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
3905 switch (attributeID)
3907 case static_cast<std::uint8_t
>(AttributeName::Type):
3914 case static_cast<std::uint8_t
>(AttributeName::Width):
3921 case static_cast<std::uint8_t
>(AttributeName::Height):
3928 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
3930 returnedAttributeData = get_variable_reference();
3935 case static_cast<std::uint8_t
>(AttributeName::Value):
3937 returnedAttributeData = get_value();
3954 return numberOfListItems;
3959 numberOfListItems = value;
3974 bool retVal =
false;
3981 children.at(index).id = newListItem;
3989 variableReference = referencedObjectID;
3994 return variableReference;
4004 bool anyWrongChildType =
false;
4009 auto lineAttributesObject =
get_object_by_id(get_line_attributes(), objectPool);
4011 if (
nullptr != lineAttributesObject)
4015 anyWrongChildType =
true;
4020 anyWrongChildType =
true;
4028 if ((
nullptr == childObject) ||
4031 anyWrongChildType =
true;
4035 return (!anyWrongChildType);
4040 bool retVal =
false;
4042 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4046 case AttributeName::LineAttributes:
4048 auto lineAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4051 ((
nullptr != lineAttributeObject) &&
4054 set_line_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4059 returnedError = AttributeError::InvalidValue;
4064 case AttributeName::Width:
4066 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
4071 case AttributeName::Height:
4073 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
4078 case AttributeName::LineDirection:
4080 if (rawAttributeData <=
static_cast<std::uint8_t
>(LineDirection::BottomLeftToTopRight))
4082 set_line_direction(
static_cast<LineDirection>(rawAttributeData));
4087 returnedError = AttributeError::AnyOtherError;
4094 returnedError = AttributeError::InvalidAttributeID;
4101 returnedError = AttributeError::InvalidAttributeID;
4108 bool retVal =
false;
4110 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4112 switch (attributeID)
4114 case static_cast<std::uint8_t
>(AttributeName::Type):
4121 case static_cast<std::uint8_t
>(AttributeName::Width):
4128 case static_cast<std::uint8_t
>(AttributeName::Height):
4135 case static_cast<std::uint8_t
>(AttributeName::LineAttributes):
4137 returnedAttributeData = get_line_attributes();
4142 case static_cast<std::uint8_t
>(AttributeName::LineDirection):
4144 returnedAttributeData = lineDirection;
4161 return MIN_OBJECT_LENGTH;
4171 lineDirection =
static_cast<std::uint8_t
>(value);
4176 return lineAttributes;
4181 lineAttributes = lineAttributesObject;
4191 return MIN_OBJECT_LENGTH;
4196 bool anyWrongChildType =
false;
4201 auto lineAttributesObject =
get_object_by_id(get_line_attributes(), objectPool);
4203 if (
nullptr != lineAttributesObject)
4207 anyWrongChildType =
true;
4212 anyWrongChildType =
true;
4219 auto fillAttributesObject =
get_object_by_id(get_fill_attributes(), objectPool);
4221 if (
nullptr != fillAttributesObject)
4225 anyWrongChildType =
true;
4230 anyWrongChildType =
true;
4238 if ((
nullptr == childObject) ||
4241 anyWrongChildType =
true;
4245 return (!anyWrongChildType);
4250 bool retVal =
false;
4252 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4256 case AttributeName::LineAttributes:
4258 auto lineAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4261 ((
nullptr != lineAttributeObject) &&
4264 set_line_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4269 returnedError = AttributeError::InvalidValue;
4274 case AttributeName::Width:
4276 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
4281 case AttributeName::Height:
4283 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
4288 case AttributeName::LineSuppression:
4290 set_line_suppression_bitfield(
static_cast<std::uint8_t
>(rawAttributeData));
4295 case AttributeName::FillAttributes:
4297 auto fillAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4300 ((
nullptr != fillAttributeObject) &&
4303 set_fill_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4308 returnedError = AttributeError::InvalidValue;
4315 returnedError = AttributeError::InvalidAttributeID;
4322 returnedError = AttributeError::InvalidAttributeID;
4329 bool retVal =
false;
4331 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4333 switch (attributeID)
4335 case static_cast<std::uint8_t
>(AttributeName::Type):
4342 case static_cast<std::uint8_t
>(AttributeName::Width):
4349 case static_cast<std::uint8_t
>(AttributeName::Height):
4356 case static_cast<std::uint8_t
>(AttributeName::LineAttributes):
4358 returnedAttributeData = get_line_attributes();
4363 case static_cast<std::uint8_t
>(AttributeName::LineSuppression):
4365 returnedAttributeData = lineSuppressionBitfield;
4370 case static_cast<std::uint8_t
>(AttributeName::FillAttributes):
4372 returnedAttributeData = get_fill_attributes();
4389 return lineSuppressionBitfield;
4394 lineSuppressionBitfield = value;
4399 return lineAttributes;
4404 lineAttributes = lineAttributesObject;
4409 return fillAttributes;
4414 fillAttributes = fillAttributesObject;
4424 return MIN_OBJECT_LENGTH;
4429 bool anyWrongChildType =
false;
4434 auto lineAttributesObject =
get_object_by_id(get_line_attributes(), objectPool);
4436 if (
nullptr != lineAttributesObject)
4440 anyWrongChildType =
true;
4445 anyWrongChildType =
true;
4452 auto fillAttributesObject =
get_object_by_id(get_fill_attributes(), objectPool);
4454 if (
nullptr != fillAttributesObject)
4458 anyWrongChildType =
true;
4463 anyWrongChildType =
true;
4471 if ((
nullptr == childObject) ||
4474 anyWrongChildType =
true;
4478 return (!anyWrongChildType);
4483 bool retVal =
false;
4485 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4489 case AttributeName::LineAttributes:
4491 auto lineAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4494 ((
nullptr != lineAttributeObject) &&
4497 set_line_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4502 returnedError = AttributeError::InvalidValue;
4507 case AttributeName::Width:
4509 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
4514 case AttributeName::Height:
4516 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
4521 case AttributeName::EllipseType:
4523 if (rawAttributeData <=
static_cast<std::uint8_t
>(EllipseType::ClosedEllipseSection))
4525 set_ellipse_type(
static_cast<EllipseType>(rawAttributeData));
4530 returnedError = AttributeError::AnyOtherError;
4535 case AttributeName::StartAngle:
4537 set_start_angle(
static_cast<std::uint8_t
>(rawAttributeData));
4542 case AttributeName::EndAngle:
4544 set_end_angle(
static_cast<std::uint8_t
>(rawAttributeData));
4549 case AttributeName::FillAttributes:
4551 auto fillAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4554 ((
nullptr != fillAttributeObject) &&
4557 set_fill_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4562 returnedError = AttributeError::InvalidValue;
4569 returnedError = AttributeError::InvalidAttributeID;
4576 returnedError = AttributeError::InvalidAttributeID;
4583 bool retVal =
false;
4585 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4587 switch (attributeID)
4589 case static_cast<std::uint8_t
>(AttributeName::Type):
4596 case static_cast<std::uint8_t
>(AttributeName::Width):
4603 case static_cast<std::uint8_t
>(AttributeName::Height):
4610 case static_cast<std::uint8_t
>(AttributeName::LineAttributes):
4612 returnedAttributeData = get_line_attributes();
4617 case static_cast<std::uint8_t
>(AttributeName::EllipseType):
4619 returnedAttributeData = ellipseType;
4624 case static_cast<std::uint8_t
>(AttributeName::StartAngle):
4626 returnedAttributeData = startAngle;
4631 case static_cast<std::uint8_t
>(AttributeName::EndAngle):
4633 returnedAttributeData = endAngle;
4638 case static_cast<std::uint8_t
>(AttributeName::FillAttributes):
4640 returnedAttributeData = get_fill_attributes();
4662 ellipseType =
static_cast<std::uint8_t
>(value);
4687 return lineAttributes;
4692 lineAttributes = lineAttributesObject;
4697 return fillAttributes;
4702 fillAttributes = fillAttributesObject;
4712 return MIN_OBJECT_LENGTH;
4717 bool anyWrongChildType =
false;
4722 auto lineAttributesObject =
get_object_by_id(get_line_attributes(), objectPool);
4724 if (
nullptr != lineAttributesObject)
4728 anyWrongChildType =
true;
4733 anyWrongChildType =
true;
4740 auto fillAttributesObject =
get_object_by_id(get_fill_attributes(), objectPool);
4742 if (
nullptr != fillAttributesObject)
4746 anyWrongChildType =
true;
4751 anyWrongChildType =
true;
4759 if ((
nullptr == childObject) ||
4762 anyWrongChildType =
true;
4766 return (!anyWrongChildType);
4771 bool retVal =
false;
4773 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4777 case AttributeName::Width:
4779 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
4784 case AttributeName::Height:
4786 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
4791 case AttributeName::LineAttributes:
4793 auto lineAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4796 ((
nullptr != lineAttributeObject) &&
4799 set_line_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4804 returnedError = AttributeError::InvalidValue;
4809 case AttributeName::FillAttributes:
4811 auto fillAttributeObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
4814 ((
nullptr != fillAttributeObject) &&
4817 set_fill_attributes(
static_cast<std::uint16_t
>(rawAttributeData));
4822 returnedError = AttributeError::InvalidValue;
4827 case AttributeName::PolygonType:
4829 if (rawAttributeData <=
static_cast<std::uint8_t
>(PolygonType::Open))
4831 set_type(
static_cast<PolygonType>(rawAttributeData));
4836 returnedError = AttributeError::AnyOtherError;
4843 returnedError = AttributeError::InvalidAttributeID;
4850 returnedError = AttributeError::InvalidAttributeID;
4857 bool retVal =
false;
4859 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
4861 switch (attributeID)
4863 case static_cast<std::uint8_t
>(AttributeName::Type):
4870 case static_cast<std::uint8_t
>(AttributeName::Width):
4877 case static_cast<std::uint8_t
>(AttributeName::Height):
4884 case static_cast<std::uint8_t
>(AttributeName::LineAttributes):
4886 returnedAttributeData = get_line_attributes();
4891 case static_cast<std::uint8_t
>(AttributeName::FillAttributes):
4893 returnedAttributeData = get_fill_attributes();
4898 case static_cast<std::uint8_t
>(AttributeName::PolygonType):
4900 returnedAttributeData = polygonType;
4917 pointList.push_back({ x, y });
4922 return static_cast<std::uint8_t
>(pointList.size());
4929 if (index < pointList.size())
4931 retVal = pointList[index];
4943 polygonType =
static_cast<std::uint8_t
>(value);
4948 return lineAttributes;
4953 lineAttributes = lineAttributesObject;
4958 return fillAttributes;
4963 fillAttributes = fillAttributesObject;
4973 return MIN_OBJECT_LENGTH;
4978 bool anyWrongChildType =
false;
4983 auto variableObject =
get_object_by_id(get_variable_reference(), objectPool);
4985 if (
nullptr != variableObject)
4989 anyWrongChildType =
true;
4994 anyWrongChildType =
true;
5002 if ((
nullptr == childObject) ||
5005 anyWrongChildType =
true;
5009 return (!anyWrongChildType);
5014 bool retVal =
false;
5016 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5020 case AttributeName::Width:
5022 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
5027 case AttributeName::NeedleColour:
5029 set_needle_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5034 case AttributeName::BorderColour:
5036 set_border_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5041 case AttributeName::ArcAndTickColour:
5043 set_arc_and_tick_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5048 case AttributeName::Options:
5050 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
5055 case AttributeName::NumberOfTicks:
5057 set_number_of_ticks(
static_cast<std::uint8_t
>(rawAttributeData));
5062 case AttributeName::StartAngle:
5064 set_start_angle(
static_cast<std::uint8_t
>(rawAttributeData));
5069 case AttributeName::EndAngle:
5071 set_end_angle(
static_cast<std::uint8_t
>(rawAttributeData));
5076 case AttributeName::MinValue:
5078 set_min_value(
static_cast<std::uint16_t
>(rawAttributeData));
5083 case AttributeName::MaxValue:
5085 set_max_value(
static_cast<std::uint16_t
>(rawAttributeData));
5090 case AttributeName::VariableReference:
5092 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
5095 ((
nullptr != variableObject) &&
5098 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
5103 returnedError = AttributeError::InvalidValue;
5108 case AttributeName::Value:
5110 set_value(
static_cast<std::uint16_t
>(rawAttributeData));
5117 returnedError = AttributeError::InvalidAttributeID;
5124 returnedError = AttributeError::InvalidAttributeID;
5131 bool retVal =
false;
5133 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5135 switch (attributeID)
5137 case static_cast<std::uint8_t
>(AttributeName::Type):
5144 case static_cast<std::uint8_t
>(AttributeName::Width):
5151 case static_cast<std::uint8_t
>(AttributeName::NeedleColour):
5153 returnedAttributeData = get_needle_colour();
5158 case static_cast<std::uint8_t
>(AttributeName::BorderColour):
5160 returnedAttributeData = get_border_colour();
5165 case static_cast<std::uint8_t
>(AttributeName::ArcAndTickColour):
5167 returnedAttributeData = get_arc_and_tick_colour();
5172 case static_cast<std::uint8_t
>(AttributeName::Options):
5174 returnedAttributeData = optionsBitfield;
5179 case static_cast<std::uint8_t
>(AttributeName::NumberOfTicks):
5181 returnedAttributeData = get_number_of_ticks();
5186 case static_cast<std::uint8_t
>(AttributeName::StartAngle):
5188 returnedAttributeData = get_start_angle();
5193 case static_cast<std::uint8_t
>(AttributeName::EndAngle):
5195 returnedAttributeData = get_end_angle();
5200 case static_cast<std::uint8_t
>(AttributeName::MinValue):
5202 returnedAttributeData = get_min_value();
5207 case static_cast<std::uint8_t
>(AttributeName::MaxValue):
5209 returnedAttributeData = get_max_value();
5214 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
5216 returnedAttributeData = get_variable_reference();
5221 case static_cast<std::uint8_t
>(AttributeName::Value):
5223 returnedAttributeData = get_value();
5270 return needleColour;
5275 needleColour = colourIndex;
5280 return borderColour;
5285 borderColour = colourIndex;
5290 return arcAndTickColour;
5295 arcAndTickColour = colourIndex;
5300 return numberOfTicks;
5305 numberOfTicks = ticks;
5310 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
5315 optionsBitfield = options;
5322 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
5326 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
5352 return variableReference;
5357 variableReference = variableReferenceValue;
5367 return MIN_OBJECT_LENGTH;
5372 bool anyWrongChildType =
false;
5377 auto variableObject =
get_object_by_id(get_variable_reference(), objectPool);
5379 if (
nullptr != variableObject)
5383 anyWrongChildType =
true;
5388 anyWrongChildType =
true;
5395 auto variableObject =
get_object_by_id(get_target_value_reference(), objectPool);
5397 if (
nullptr != variableObject)
5401 anyWrongChildType =
true;
5406 anyWrongChildType =
true;
5414 if ((
nullptr == childObject) ||
5417 anyWrongChildType =
true;
5421 return (!anyWrongChildType);
5426 bool retVal =
false;
5428 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5432 case AttributeName::Width:
5434 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
5439 case AttributeName::Height:
5441 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
5446 case AttributeName::Colour:
5448 set_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5453 case AttributeName::TargetLineColour:
5455 set_target_line_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5460 case AttributeName::Options:
5462 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
5467 case AttributeName::NumberOfTicks:
5469 set_number_of_ticks(
static_cast<std::uint8_t
>(rawAttributeData));
5474 case AttributeName::MinValue:
5476 set_min_value(
static_cast<std::uint16_t
>(rawAttributeData));
5481 case AttributeName::MaxValue:
5483 set_max_value(
static_cast<std::uint16_t
>(rawAttributeData));
5488 case AttributeName::VariableReference:
5490 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
5493 ((
nullptr != variableObject) &&
5496 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
5501 returnedError = AttributeError::InvalidValue;
5506 case AttributeName::TargetValueVariableReference:
5508 set_target_value_reference(
static_cast<std::uint16_t
>(rawAttributeData));
5513 case AttributeName::TargetValue:
5515 set_target_value(
static_cast<std::uint16_t
>(rawAttributeData));
5520 case AttributeName::Value:
5522 set_value(
static_cast<std::uint16_t
>(rawAttributeData));
5529 returnedError = AttributeError::InvalidAttributeID;
5536 returnedError = AttributeError::InvalidAttributeID;
5543 bool retVal =
false;
5545 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5547 switch (attributeID)
5549 case static_cast<std::uint8_t
>(AttributeName::Type):
5556 case static_cast<std::uint8_t
>(AttributeName::Width):
5563 case static_cast<std::uint8_t
>(AttributeName::Height):
5570 case static_cast<std::uint8_t
>(AttributeName::Colour):
5572 returnedAttributeData = get_colour();
5577 case static_cast<std::uint8_t
>(AttributeName::TargetLineColour):
5579 returnedAttributeData = get_target_line_colour();
5584 case static_cast<std::uint8_t
>(AttributeName::Options):
5586 returnedAttributeData = optionsBitfield;
5591 case static_cast<std::uint8_t
>(AttributeName::NumberOfTicks):
5593 returnedAttributeData = get_number_of_ticks();
5598 case static_cast<std::uint8_t
>(AttributeName::MinValue):
5600 returnedAttributeData = get_min_value();
5605 case static_cast<std::uint8_t
>(AttributeName::MaxValue):
5607 returnedAttributeData = get_max_value();
5612 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
5614 returnedAttributeData = get_variable_reference();
5619 case static_cast<std::uint8_t
>(AttributeName::TargetValueVariableReference):
5621 returnedAttributeData = get_target_value_reference();
5626 case static_cast<std::uint8_t
>(AttributeName::TargetValue):
5628 returnedAttributeData = get_target_value();
5633 case static_cast<std::uint8_t
>(AttributeName::Value):
5635 returnedAttributeData = get_value();
5687 targetValue = valueTarget;
5692 return targetValueReference;
5697 targetValueReference = valueReferenceObjectID;
5702 return numberOfTicks;
5707 numberOfTicks = value;
5717 colour = graphColour;
5722 return targetLineColour;
5727 targetLineColour = lineColour;
5732 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
5737 optionsBitfield = options;
5744 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
5748 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
5754 return variableReference;
5759 variableReference = variableReferenceValue;
5769 return MIN_OBJECT_LENGTH;
5774 bool anyWrongChildType =
false;
5779 auto variableObject =
get_object_by_id(get_variable_reference(), objectPool);
5781 if (
nullptr != variableObject)
5785 anyWrongChildType =
true;
5790 anyWrongChildType =
true;
5797 auto variableObject =
get_object_by_id(get_target_value_reference(), objectPool);
5799 if (
nullptr != variableObject)
5803 anyWrongChildType =
true;
5808 anyWrongChildType =
true;
5816 if ((
nullptr == childObject) ||
5819 anyWrongChildType =
true;
5823 return (!anyWrongChildType);
5828 bool retVal =
false;
5830 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5834 case AttributeName::Width:
5836 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
5841 case AttributeName::Height:
5843 set_height(
static_cast<std::uint16_t
>(rawAttributeData));
5848 case AttributeName::Colour:
5850 set_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5855 case AttributeName::TargetLineColour:
5857 set_target_line_colour(
static_cast<std::uint8_t
>(rawAttributeData));
5862 case AttributeName::Options:
5864 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
5869 case AttributeName::StartAngle:
5871 set_start_angle(
static_cast<std::uint8_t
>(rawAttributeData));
5876 case AttributeName::EndAngle:
5878 set_end_angle(
static_cast<std::uint8_t
>(rawAttributeData));
5883 case AttributeName::BarGraphWidth:
5885 set_bar_graph_width(
static_cast<std::uint16_t
>(rawAttributeData));
5890 case AttributeName::MinValue:
5892 set_min_value(
static_cast<std::uint16_t
>(rawAttributeData));
5897 case AttributeName::MaxValue:
5899 set_max_value(
static_cast<std::uint16_t
>(rawAttributeData));
5904 case AttributeName::VariableReference:
5906 auto variableObject =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
5909 ((
nullptr != variableObject) &&
5912 set_variable_reference(
static_cast<std::uint16_t
>(rawAttributeData));
5917 returnedError = AttributeError::InvalidValue;
5922 case AttributeName::TargetValueVariableReference:
5924 set_target_value_reference(
static_cast<std::uint16_t
>(rawAttributeData));
5929 case AttributeName::TargetValue:
5931 set_target_value(
static_cast<std::uint16_t
>(rawAttributeData));
5938 returnedError = AttributeError::InvalidAttributeID;
5945 returnedError = AttributeError::InvalidAttributeID;
5952 bool retVal =
false;
5954 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
5956 switch (attributeID)
5958 case static_cast<std::uint8_t
>(AttributeName::Type):
5965 case static_cast<std::uint8_t
>(AttributeName::Width):
5972 case static_cast<std::uint8_t
>(AttributeName::Height):
5979 case static_cast<std::uint8_t
>(AttributeName::Colour):
5981 returnedAttributeData = get_colour();
5986 case static_cast<std::uint8_t
>(AttributeName::TargetLineColour):
5988 returnedAttributeData = get_target_line_colour();
5993 case static_cast<std::uint8_t
>(AttributeName::Options):
5995 returnedAttributeData = optionsBitfield;
6000 case static_cast<std::uint8_t
>(AttributeName::StartAngle):
6002 returnedAttributeData = get_start_angle();
6007 case static_cast<std::uint8_t
>(AttributeName::EndAngle):
6009 returnedAttributeData = get_end_angle();
6014 case static_cast<std::uint8_t
>(AttributeName::BarGraphWidth):
6016 returnedAttributeData = get_bar_graph_width();
6021 case static_cast<std::uint8_t
>(AttributeName::MinValue):
6023 returnedAttributeData = get_min_value();
6028 case static_cast<std::uint8_t
>(AttributeName::MaxValue):
6030 returnedAttributeData = get_max_value();
6035 case static_cast<std::uint8_t
>(AttributeName::VariableReference):
6037 returnedAttributeData = get_variable_reference();
6042 case static_cast<std::uint8_t
>(AttributeName::TargetValueVariableReference):
6044 returnedAttributeData = get_target_value_reference();
6049 case static_cast<std::uint8_t
>(AttributeName::TargetValue):
6051 returnedAttributeData = get_target_value();
6068 return barGraphWidth;
6073 barGraphWidth =
width;
6083 minValue = minimumValue;
6093 maxValue = maximumValue;
6108 return targetLineColour;
6113 targetLineColour = value;
6128 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
6133 optionsBitfield = options;
6140 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
6144 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
6175 targetValue = value;
6180 return targetValueReference;
6185 targetValueReference = value;
6190 return variableReference;
6195 variableReference = variableReferenceValue;
6205 return MIN_OBJECT_LENGTH;
6215 bool retVal =
false;
6217 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6221 case AttributeName::Width:
6223 set_width(
static_cast<std::uint16_t
>(rawAttributeData));
6228 case AttributeName::Options:
6230 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
6235 case AttributeName::TransparencyColour:
6237 set_transparency_colour(
static_cast<std::uint8_t
>(rawAttributeData));
6244 returnedError = AttributeError::InvalidAttributeID;
6251 returnedError = AttributeError::InvalidAttributeID;
6258 bool retVal =
false;
6260 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6262 switch (attributeID)
6264 case static_cast<std::uint8_t
>(AttributeName::Type):
6271 case static_cast<std::uint8_t
>(AttributeName::Width):
6278 case static_cast<std::uint8_t
>(AttributeName::ActualWidth):
6280 returnedAttributeData = get_actual_width();
6285 case static_cast<std::uint8_t
>(AttributeName::ActualHeight):
6287 returnedAttributeData = get_actual_height();
6292 case static_cast<std::uint8_t
>(AttributeName::Options):
6294 returnedAttributeData = optionsBitfield;
6299 case static_cast<std::uint8_t
>(AttributeName::TransparencyColour):
6301 returnedAttributeData = get_transparency_colour();
6306 case static_cast<std::uint8_t
>(AttributeName::Format):
6308 returnedAttributeData =
static_cast<std::uint8_t
>(get_format());
6331 rawData.resize(size);
6333 for (std::uint32_t i = 0; i < size; i++)
6335 rawData[i] = data[i];
6341 rawData.push_back(dataByte);
6346 return numberOfBytesInRawData;
6351 numberOfBytesInRawData = value;
6352 rawData.reserve(value);
6362 actualWidth = value;
6367 return actualHeight;
6372 actualHeight = value;
6377 return static_cast<Format>(formatByte);
6382 formatByte =
static_cast<std::uint8_t
>(value);
6387 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
6392 optionsBitfield = value;
6399 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
6403 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
6409 return transparencyColour;
6414 transparencyColour = value;
6424 return MIN_OBJECT_LENGTH;
6434 returnedError = AttributeError::InvalidAttributeID;
6440 bool retVal =
false;
6442 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6444 switch (attributeID)
6446 case static_cast<std::uint8_t
>(AttributeName::Type):
6453 case static_cast<std::uint8_t
>(AttributeName::Value):
6455 returnedAttributeData = get_value();
6487 return MIN_OBJECT_LENGTH;
6497 returnedError = AttributeError::InvalidAttributeID;
6503 bool retVal =
false;
6505 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6507 switch (attributeID)
6509 case static_cast<std::uint8_t
>(AttributeName::Type):
6543 return MIN_OBJECT_LENGTH;
6553 bool retVal =
false;
6555 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6559 case AttributeName::FontColour:
6561 set_colour(
static_cast<std::uint8_t
>(rawAttributeData));
6566 case AttributeName::FontSize:
6575 returnedError = AttributeError::AnyOtherError;
6580 case AttributeName::FontType:
6587 case AttributeName::FontStyle:
6589 set_style(
static_cast<std::uint8_t
>(rawAttributeData));
6596 returnedError = AttributeError::InvalidAttributeID;
6603 returnedError = AttributeError::InvalidAttributeID;
6610 bool retVal =
false;
6612 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6614 switch (attributeID)
6616 case static_cast<std::uint8_t
>(AttributeName::Type):
6623 case static_cast<std::uint8_t
>(AttributeName::FontColour):
6625 returnedAttributeData = get_colour();
6630 case static_cast<std::uint8_t
>(AttributeName::FontSize):
6632 returnedAttributeData =
static_cast<std::uint8_t
>(get_size());
6637 case static_cast<std::uint8_t
>(AttributeName::FontType):
6639 returnedAttributeData =
static_cast<std::uint8_t
>(get_type());
6644 case static_cast<std::uint8_t
>(AttributeName::FontStyle):
6646 returnedAttributeData = get_style();
6663 return static_cast<FontType>(type);
6668 type =
static_cast<std::uint8_t
>(value);
6678 return (style >>
static_cast<std::uint8_t
>(styleSetting)) & 0x01;
6683 style = (
static_cast<std::uint8_t
>(value) <<
static_cast<std::uint8_t
>(bit));
6693 return static_cast<FontSize>(size);
6698 size =
static_cast<std::uint8_t
>(value);
6713 std::uint8_t retVal = 0;
6715 switch (
static_cast<FontSize>(size))
6717 case FontSize::Size6x8:
6723 case FontSize::Size8x8:
6724 case FontSize::Size8x12:
6730 case FontSize::Size12x16:
6736 case FontSize::Size16x16:
6737 case FontSize::Size16x24:
6743 case FontSize::Size24x32:
6749 case FontSize::Size32x32:
6750 case FontSize::Size32x48:
6756 case FontSize::Size48x64:
6762 case FontSize::Size64x64:
6763 case FontSize::Size64x96:
6769 case FontSize::Size96x128:
6775 case FontSize::Size128x128:
6776 case FontSize::Size128x192:
6790 std::uint8_t retVal = 0;
6792 switch (
static_cast<FontSize>(size))
6794 case FontSize::Size6x8:
6795 case FontSize::Size8x8:
6801 case FontSize::Size8x12:
6807 case FontSize::Size12x16:
6808 case FontSize::Size16x16:
6814 case FontSize::Size16x24:
6820 case FontSize::Size24x32:
6821 case FontSize::Size32x32:
6827 case FontSize::Size32x48:
6833 case FontSize::Size48x64:
6834 case FontSize::Size64x64:
6840 case FontSize::Size64x96:
6846 case FontSize::Size96x128:
6847 case FontSize::Size128x128:
6853 case FontSize::Size128x192:
6872 return MIN_OBJECT_LENGTH;
6882 bool retVal =
false;
6884 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6888 case AttributeName::LineColour:
6895 case AttributeName::LineWidth:
6897 set_width(
static_cast<std::uint16_t
>(rawAttributeData & 0xFF));
6902 case AttributeName::LineArt:
6904 set_line_art_bit_pattern(
static_cast<std::uint16_t
>(rawAttributeData));
6911 returnedError = AttributeError::InvalidAttributeID;
6918 returnedError = AttributeError::InvalidAttributeID;
6925 bool retVal =
false;
6927 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
6929 switch (attributeID)
6931 case static_cast<std::uint8_t
>(AttributeName::Type):
6938 case static_cast<std::uint8_t
>(AttributeName::LineColour):
6945 case static_cast<std::uint8_t
>(AttributeName::LineWidth):
6947 returnedAttributeData =
static_cast<std::uint32_t
>(
get_width());
6952 case static_cast<std::uint8_t
>(AttributeName::LineArt):
6954 returnedAttributeData =
static_cast<std::uint32_t
>(get_line_art_bit_pattern());
6971 return lineArtBitpattern;
6976 lineArtBitpattern = value;
6986 return MIN_OBJECT_LENGTH;
6998 bool retVal =
false;
7000 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7004 case AttributeName::FillType:
7006 if (rawAttributeData <=
static_cast<std::uint8_t
>(FillType::FillWithPatternGivenByFillPatternAttribute))
7008 set_type(
static_cast<FillType>(rawAttributeData));
7013 returnedError = AttributeError::AnyOtherError;
7018 case AttributeName::FillColour:
7025 case AttributeName::FillPattern:
7027 auto fillPictureGraphic =
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool);
7031 set_fill_pattern(
static_cast<std::uint16_t
>(rawAttributeData));
7034 else if ((
nullptr != fillPictureGraphic) &&
7037 set_fill_pattern(
static_cast<std::uint16_t
>(rawAttributeData));
7042 returnedError = AttributeError::InvalidValue;
7049 returnedError = AttributeError::InvalidAttributeID;
7056 returnedError = AttributeError::InvalidAttributeID;
7063 bool retVal =
false;
7065 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7069 case AttributeName::Type:
7071 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7076 case AttributeName::FillType:
7078 returnedAttributeData =
static_cast<std::uint32_t
>(get_type());
7083 case AttributeName::FillColour:
7090 case AttributeName::FillPattern:
7092 returnedAttributeData =
static_cast<std::uint32_t
>(get_fill_pattern());
7114 fillPattern = value;
7134 return MIN_OBJECT_LENGTH;
7144 returnedError = AttributeError::InvalidAttributeID;
7150 bool retVal =
false;
7152 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7156 case AttributeName::Type:
7158 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7163 case AttributeName::ValidationType:
7165 returnedAttributeData =
static_cast<std::uint32_t
>(get_validation_type());
7182 return validationString;
7187 validationString = value;
7192 return validationType;
7197 validationType = newValidationType;
7207 return MIN_OBJECT_LENGTH;
7217 returnedError = AttributeError::InvalidAttributeID;
7223 bool retVal =
false;
7225 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7229 case AttributeName::Type:
7231 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7236 case AttributeName::ValidationType:
7238 returnedAttributeData =
static_cast<std::uint32_t
>(get_validation_type());
7255 return static_cast<std::uint8_t
>(codePlanes.size());
7260 codePlanes.resize(value);
7265 return validationType;
7270 validationType = value;
7280 return MIN_OBJECT_LENGTH;
7290 returnedError = AttributeError::InvalidAttributeID;
7301 value = objectIDToPointTo;
7306 bool retVal =
false;
7307 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7311 case AttributeName::Type:
7313 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7318 case AttributeName::Value:
7354 bool isDefaultObjectValid = (
NULL_OBJECT_ID == get_default_object_id()) ||
7355 (
nullptr != objectPool.at(get_default_object_id()));
7356 bool isExternalNAMEIDValid = (
NULL_OBJECT_ID == get_external_reference_name_id()) ||
7357 (
nullptr != objectPool.at(get_external_reference_name_id()));
7358 return (isDefaultObjectValid && isExternalNAMEIDValid);
7363 bool retVal =
false;
7365 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7369 case AttributeName::DefaultObjectID:
7372 (
nullptr !=
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool)))
7374 set_default_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
7379 returnedError = AttributeError::InvalidValue;
7384 case AttributeName::ExternalReferenceNAMEID:
7387 (
nullptr !=
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool)))
7389 set_external_reference_name_id(
static_cast<std::uint16_t
>(rawAttributeData));
7394 returnedError = AttributeError::InvalidValue;
7399 case AttributeName::ExternalObjectID:
7401 set_external_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
7408 returnedError = AttributeError::InvalidAttributeID;
7415 returnedError = AttributeError::InvalidAttributeID;
7422 bool retVal =
false;
7423 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7427 case AttributeName::Type:
7429 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7434 case AttributeName::DefaultObjectID:
7436 returnedAttributeData =
static_cast<std::uint32_t
>(get_default_object_id());
7441 case AttributeName::ExternalReferenceNAMEID:
7443 returnedAttributeData =
static_cast<std::uint32_t
>(get_external_reference_name_id());
7448 case AttributeName::ExternalObjectID:
7450 returnedAttributeData =
static_cast<std::uint32_t
>(get_external_object_id());
7467 return defaultObjectID;
7472 defaultObjectID = id;
7477 return externalReferenceNAMEID;
7482 externalReferenceNAMEID = id;
7487 return externalObjectID;
7492 externalObjectID = id;
7496 static_cast<std::uint8_t
>(Command::HideShowObject),
7497 static_cast<std::uint8_t
>(Command::EnableDisableObject),
7498 static_cast<std::uint8_t
>(Command::SelectInputObject),
7499 static_cast<std::uint8_t
>(Command::ControlAudioSignal),
7500 static_cast<std::uint8_t
>(Command::SetAudioVolume),
7501 static_cast<std::uint8_t
>(Command::ChangeChildLocation),
7502 static_cast<std::uint8_t
>(Command::ChangeSize),
7503 static_cast<std::uint8_t
>(Command::ChangeBackgroundColour),
7504 static_cast<std::uint8_t
>(Command::ChangeNumericValue),
7505 static_cast<std::uint8_t
>(Command::ChangeEndPoint),
7506 static_cast<std::uint8_t
>(Command::ChangeFontAttributes),
7507 static_cast<std::uint8_t
>(Command::ChangeLineAttributes),
7508 static_cast<std::uint8_t
>(Command::ChangeFillAttributes),
7509 static_cast<std::uint8_t
>(Command::ChangeActiveMask),
7510 static_cast<std::uint8_t
>(Command::ChangeSoftKeyMask),
7511 static_cast<std::uint8_t
>(Command::ChangeAttribute),
7512 static_cast<std::uint8_t
>(Command::ChangePriority),
7513 static_cast<std::uint8_t
>(Command::ChangeListItem),
7514 static_cast<std::uint8_t
>(Command::ChangeStringValue),
7515 static_cast<std::uint8_t
>(Command::ChangeChildPosition),
7516 static_cast<std::uint8_t
>(Command::ChangeObjectLabel),
7517 static_cast<std::uint8_t
>(Command::ChangePolygonPoint),
7518 static_cast<std::uint8_t
>(Command::LockUnlockMask),
7519 static_cast<std::uint8_t
>(Command::ExecuteMacro),
7520 static_cast<std::uint8_t
>(Command::ChangePolygonScale),
7521 static_cast<std::uint8_t
>(Command::GraphicsContextCommand),
7522 static_cast<std::uint8_t
>(Command::SelectColourMap),
7523 static_cast<std::uint8_t
>(Command::ExecuteExtendedMacro)
7533 return MIN_OBJECT_LENGTH;
7538 return get_are_command_packets_valid();
7543 returnedError = AttributeError::InvalidAttributeID;
7549 bool retVal =
false;
7550 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7554 case AttributeName::Type:
7556 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7573 bool retVal =
false;
7575 if (commandPackets.size() < 255)
7577 commandPackets.push_back(command);
7585 return static_cast<std::uint8_t
>(commandPackets.size());
7590 bool retVal =
false;
7592 if (index < commandPackets.size())
7594 command = commandPackets.at(index);
7602 bool retVal =
false;
7604 if (index < commandPackets.size())
7606 auto eraseLocation = commandPackets.begin() + index;
7607 commandPackets.erase(eraseLocation);
7617 if (commandPackets.empty())
7623 for (
const auto &command : commandPackets)
7625 bool currentCommandAllowed =
false;
7627 for (
const auto &allowedCommand : ALLOWED_COMMANDS_LOOKUP_TABLE)
7629 if (!command.empty() && (command.at(0) == allowedCommand))
7631 currentCommandAllowed =
true;
7636 if (!currentCommandAllowed)
7653 return MIN_OBJECT_LENGTH;
7663 returnedError = AttributeError::InvalidAttributeID;
7669 bool retVal =
false;
7671 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
7675 case AttributeName::Type:
7677 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
7694 bool retVal =
false;
7696 if ((value != colourMapData.size()) &&
7701 colourMapData.clear();
7702 colourMapData.resize(value);
7704 for (std::size_t i = 0; i < colourMapData.size(); i++)
7706 colourMapData[i] =
static_cast<std::uint8_t
>(i);
7715 return static_cast<std::uint16_t
>(colourMapData.size());
7720 bool retVal =
false;
7722 if (index < colourMapData.size())
7724 colourMapData[index] = value;
7732 std::uint8_t retVal = 0;
7734 if (index < get_number_of_colour_indexes())
7736 retVal = colourMapData[index];
7748 return MIN_OBJECT_LENGTH;
7753 bool anyWrongChildType =
false;
7755 if (WindowType::Freeform != get_window_type())
7761 if (
nullptr != titleObject)
7766 anyWrongChildType =
true;
7770 if (0 == titleObject->get_number_children())
7772 anyWrongChildType =
true;
7776 std::uint16_t titleObjectPointedTo = std::static_pointer_cast<ObjectPointer>(titleObject)->get_child_id(0);
7785 anyWrongChildType =
true;
7796 anyWrongChildType =
true;
7801 anyWrongChildType =
true;
7808 if (
nullptr != nameObject)
7813 anyWrongChildType =
true;
7817 if (0 == nameObject->get_number_children())
7819 anyWrongChildType =
true;
7823 std::uint16_t titleObjectPointedTo = std::static_pointer_cast<ObjectPointer>(nameObject)->get_child_id(0);
7832 anyWrongChildType =
true;
7843 anyWrongChildType =
true;
7848 anyWrongChildType =
true;
7855 if (
nullptr != nameObject)
7857 switch (nameObject->get_object_type())
7881 anyWrongChildType =
true;
7888 anyWrongChildType =
true;
7893 anyWrongChildType =
true;
7898 anyWrongChildType =
true;
7904 case WindowType::Freeform:
7910 case WindowType::NumericOutputValueWithUnits1x1:
7911 case WindowType::NumericOutputValueWithUnits2x1:
7918 if ((
nullptr == outputNum) ||
7919 (
nullptr == outputString) ||
7923 anyWrongChildType =
true;
7928 anyWrongChildType =
true;
7933 case WindowType::NumericOutputValueNoUnits1x1:
7934 case WindowType::NumericOutputValueNoUnits2x1:
7940 if ((
nullptr == outputNum) ||
7943 anyWrongChildType =
true;
7948 anyWrongChildType =
true;
7953 case WindowType::StringOutputValue1x1:
7954 case WindowType::StringOutputValue2x1:
7960 if ((
nullptr == outputString) ||
7963 anyWrongChildType =
true;
7968 anyWrongChildType =
true;
7973 case WindowType::NumericInputValueWithUnits1x1:
7974 case WindowType::NumericInputValueWithUnits2x1:
7981 if ((
nullptr == inputNum) ||
7982 (
nullptr == outputString) ||
7986 anyWrongChildType =
true;
7991 anyWrongChildType =
true;
7996 case WindowType::NumericInputValueNoUnits1x1:
7997 case WindowType::NumericInputValueNoUnits2x1:
8003 if ((
nullptr == inputNum) ||
8006 anyWrongChildType =
true;
8011 anyWrongChildType =
true;
8016 case WindowType::StringInputValue1x1:
8017 case WindowType::StringInputValue2x1:
8023 if ((
nullptr == inputStr) ||
8026 anyWrongChildType =
true;
8031 anyWrongChildType =
true;
8036 case WindowType::HorizontalLinearBarGraphNoUnits1x1:
8037 case WindowType::HorizontalLinearBarGraphNoUnits2x1:
8043 if ((
nullptr == outputBargraph) ||
8046 anyWrongChildType =
true;
8051 anyWrongChildType =
true;
8056 case WindowType::SingleButton1x1:
8057 case WindowType::SingleButton2x1:
8063 if ((
nullptr == button) ||
8066 anyWrongChildType =
true;
8071 anyWrongChildType =
true;
8076 case WindowType::DoubleButton1x1:
8077 case WindowType::DoubleButton2x1:
8084 if ((
nullptr == button1) ||
8085 (
nullptr == button2) ||
8089 anyWrongChildType =
true;
8094 anyWrongChildType =
true;
8101 anyWrongChildType =
true;
8105 return !anyWrongChildType;
8110 bool retVal =
false;
8112 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
8116 case AttributeName::BackgroundColour:
8123 case AttributeName::Options:
8125 set_options(
static_cast<std::uint8_t
>(rawAttributeData));
8130 case AttributeName::Name:
8132 set_name_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
8139 returnedError = AttributeError::InvalidAttributeID;
8146 returnedError = AttributeError::InvalidAttributeID;
8153 bool retVal =
false;
8155 if (attributeID <
static_cast<std::uint8_t
>(AttributeName::NumberOfAttributes))
8159 case AttributeName::Type:
8161 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8166 case AttributeName::BackgroundColour:
8173 case AttributeName::Options:
8175 returnedAttributeData = optionsBitfield;
8180 case AttributeName::Name:
8182 returnedAttributeData =
static_cast<std::uint32_t
>(get_name_object_id());
8234 if (
static_cast<std::uint8_t
>(type) <=
static_cast<std::uint8_t
>(WindowType::DoubleButton2x1))
8236 windowType =
static_cast<std::uint8_t
>(type);
8242 return (0 != ((1 <<
static_cast<std::uint8_t
>(option)) & optionsBitfield));
8247 optionsBitfield = value;
8254 optionsBitfield |= (1 <<
static_cast<std::uint8_t
>(option));
8258 optionsBitfield &= ~(1 <<
static_cast<std::uint8_t
>(option));
8275 bool anyWrongChildType =
false;
8281 if (
nullptr != childObject)
8283 switch (childObject->get_object_type())
8299 anyWrongChildType =
true;
8306 anyWrongChildType =
true;
8310 return !anyWrongChildType;
8315 returnedError = AttributeError::InvalidAttributeID;
8321 bool retVal =
false;
8323 if (attributeID ==
static_cast<std::uint8_t
>(AttributeName::Type))
8325 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8333 return functionType;
8338 functionType = type;
8353 bool anyWrongChildType =
false;
8359 if (
nullptr != childObject)
8361 switch (childObject->get_object_type())
8383 anyWrongChildType =
true;
8390 anyWrongChildType =
true;
8394 return !anyWrongChildType;
8399 bool retVal =
false;
8401 if (attributeID ==
static_cast<std::uint8_t
>(AttributeName::BackgroundColour))
8408 returnedError = AttributeError::InvalidAttributeID;
8415 bool retVal =
false;
8417 switch (attributeID)
8419 case static_cast<std::uint8_t
>(AttributeName::Type):
8421 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8426 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
8433 case static_cast<std::uint8_t
>(AttributeName::FunctionAttributes):
8435 returnedAttributeData = functionAttributesBitfield;
8451 return static_cast<FunctionType>(functionAttributesBitfield & 0x1F);
8456 functionAttributesBitfield &= 0xE0;
8457 functionAttributesBitfield |=
static_cast<std::uint8_t
>(type) & 0x1F;
8462 return (0 != ((1 <<
static_cast<std::uint8_t
>(attributeToCheck)) & functionAttributesBitfield));
8469 functionAttributesBitfield |= (1 <<
static_cast<std::uint8_t
>(attributeToSet));
8473 functionAttributesBitfield &= ~(1 <<
static_cast<std::uint8_t
>(attributeToSet));
8489 bool anyWrongChildType =
false;
8495 if (
nullptr != childObject)
8497 switch (childObject->get_object_type())
8513 anyWrongChildType =
true;
8520 anyWrongChildType =
true;
8524 return !anyWrongChildType;
8529 returnedError = AttributeError::InvalidAttributeID;
8535 bool retVal =
false;
8537 if (attributeID ==
static_cast<std::uint8_t
>(AttributeName::Type))
8539 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8547 return functionType;
8552 functionType = type;
8562 bool retVal =
false;
8584 bool anyWrongChildType =
false;
8590 if (
nullptr != childObject)
8592 switch (childObject->get_object_type())
8614 anyWrongChildType =
true;
8621 anyWrongChildType =
true;
8625 return !anyWrongChildType;
8630 bool retVal =
false;
8632 switch (attributeID)
8634 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
8641 case static_cast<std::uint8_t
>(AttributeName::FunctionAttributes):
8643 functionAttributesBitfield = (
static_cast<std::uint8_t
>(rawAttributeData));
8650 returnedError = AttributeError::InvalidAttributeID;
8659 bool retVal =
false;
8661 switch (attributeID)
8663 case static_cast<std::uint8_t
>(AttributeName::Type):
8665 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8670 case static_cast<std::uint8_t
>(AttributeName::FunctionAttributes):
8672 returnedAttributeData = functionAttributesBitfield;
8677 case static_cast<std::uint8_t
>(AttributeName::BackgroundColour):
8700 functionAttributesBitfield &= 0xE0;
8701 functionAttributesBitfield |=
static_cast<std::uint8_t
>(type) & 0x1F;
8706 return (0 != ((1 <<
static_cast<std::uint8_t
>(attributeToCheck)) & functionAttributesBitfield));
8713 functionAttributesBitfield |= (1 <<
static_cast<std::uint8_t
>(attributeToSet));
8717 functionAttributesBitfield &= ~(1 <<
static_cast<std::uint8_t
>(attributeToSet));
8755 bool retVal =
false;
8756 returnedError = AttributeError::InvalidAttributeID;
8758 if (
static_cast<std::uint8_t
>(AttributeName::AuxiliaryObjectID) == attributeID)
8761 ((
nullptr !=
get_object_by_id(
static_cast<std::uint16_t
>(rawAttributeData), objectPool)) &&
8765 set_auxiliary_object_id(
static_cast<std::uint16_t
>(rawAttributeData));
8770 returnedError = AttributeError::InvalidValue;
8778 bool retVal =
false;
8780 switch (attributeID)
8782 case static_cast<std::uint8_t
>(AttributeName::Type):
8784 returnedAttributeData =
static_cast<std::uint32_t
>(
get_object_type());
8789 case static_cast<std::uint8_t
>(AttributeName::PointerType):
8791 returnedAttributeData = get_pointer_type();
8796 case static_cast<std::uint8_t
>(AttributeName::AuxiliaryObjectID):
8798 returnedAttributeData = get_auxiliary_object_id();
8814 return auxiliaryObjectID;
8819 auxiliaryObjectID = id;
Priority
Enumerates the different mask priorities. Higher priority masks will be shown over lower priority one...
@ Low
Low, information only.
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.
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.
AcousticSignal
Enumerates the acoustic signal values for the alarm mask. Works only if your VT has a way to make sou...
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 get_soft_key_mask() const
Returns the object ID of the soft key mask associated with this alarm mask.
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.
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.
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.
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.
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.
FunctionType
Enumerates the different kinds of auxiliary functions (type 1)
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.
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.
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.
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.
FunctionAttribute
Enumerates bit offsets of attributes of auxiliary functions to be assigned to an input control.
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.
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.
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.
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.
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.
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.
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.
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 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.
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...
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.
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_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 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.
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.
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.
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.
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 ...
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 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 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.
void set_type(FillType value)
Sets the fill type/mode associated with this object.
FillType
Enumerates the different fill types for an object.
FontType
Enumerates the different font types.
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.
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.
@ 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.
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.
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.
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.
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...
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.
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.
std::uint8_t get_key_code() const
Returns the key code associated to 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.
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_key_code(std::uint8_t value)
Sets the key code associated to this 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.
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.
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.
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.
bool remove_command_packet(std::uint8_t index)
Deletes a command packet from the macro by index.
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.
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.
bool get_are_command_packets_valid() const
Returns if the command packets in this macro are valid.
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.
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.
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.
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.
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.
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.
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 get_min_value() const
Returns the minimum value of the bar graph.
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_target_value_reference(std::uint16_t value)
Sets the target value reference object ID.
Options
Options that can be applied to the input number.
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::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 ...
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.
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 get_variable_reference() const
Returns the value reference object ID, which is a number variable object that should be used to deter...
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
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.
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.
EllipseType
Types 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::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.
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::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.
LineDirection
Enumerates the different directions a line can be drawn.
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...
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::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::uint16_t get_max_value() const
Returns the max value for the graph.
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).
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.
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...
Options
Options that can be applied to the input number.
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 ...
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 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.
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...
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 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.
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.
void set_number_of_ticks(std::uint8_t ticks)
Sets the number of ticks to render when drawing the meter.
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.
std::uint8_t get_arc_and_tick_colour() const
Returns the arc and tick colour for the meter.
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 get_border_colour() const
Returns the border colour of the meter.
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.
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.
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...
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).
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.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
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.
bool get_format() const
Returns if the "format" option is set for this object.
Options
Options that can be applied to the input number.
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.
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.
AttributeName
Enumerates this object's attributes which are assigned an attribute ID. The Change Attribute command ...
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
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.
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.
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::uint16_t get_fill_attributes() const
Returns the object ID of the fill attributes used to display this polygon's fill.
PolygonType
Polygon type. The first three types are useful only if the polygon is to be filled.
std::uint8_t get_number_of_points() const
Returns the number of polygon points.
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.
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.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
std::uint8_t get_line_suppression_bitfield() const
Returns the line suppression bitfield.
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 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.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated object.
std::uint16_t get_fill_attributes() const
Returns the object ID of the fill attributes used to display this rectangle's fill.
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...
VerticalJustification
The allowable vertical justification options.
std::uint32_t get_minumum_object_length() const override
Returns the minimum binary serialized length of the associated 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.
std::string get_value() const
Returns the value of the string, used only if the variable reference (a child var string) is NULL_OBJ...
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.
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.
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)
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...
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.
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.
VerticalJustification get_vertical_justification() const
Returns the vertical justification of the output string within its bounding box.
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.
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.
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.
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.
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.
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)
std::uint16_t get_actual_width() const
Returns the actual width of the underlying bitmap.
Format get_format() const
Returns the picture's colour format.
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 ...
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.
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.
VirtualTerminalObjectType get_object_type() const override
Returns the VT object type of the underlying derived object.
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.
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::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.
VT 3 component colour vector.
Storage for child object data.
ChildObjectData()=default
Default constructor for child object data with default values.
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.
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)
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.
void set_option(Options option, bool value)
Sets a single option in the options bitfield to the specified value.
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...
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.
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.
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.
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.
void set_options(std::uint8_t value)
Sets the options bitfield for this object to a new value.
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 ...
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.
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_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.
Defines the different VT object types that can comprise a VT object pool.
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.
VirtualTerminalObjectType
The types of objects in an object pool by object type byte value.
@ OutputPolygon
Used to output a polygon.
@ FontAttributes
Used to group font based attributes. Can only be referenced by other objects.
@ WorkingSet
Top level object that describes an implement’s ECU or group of ECUs.
@ NumberVariable
Used to store a 32-bit unsigned integer value.
@ WindowMask
Top level object that contains other objects. The Window Mask is activated by the VT.
@ Container
Used to group objects.
@ AuxiliaryInputType1
The Auxiliary Input Type 1 object defines the designator, key number, and function type for an auxili...
@ PictureGraphic
Used to output a picture graphic (bitmap).
@ Macro
Special object that contains a list of commands that can be executed in response to an event.
@ ObjectPointer
Used to reference another object.
@ OutputList
Used to output a list item.
@ DataMask
Top level object that contains other objects. A Data Mask is activated by a Working Set to become the...
@ OutputEllipse
Used to output an ellipse or circle.
@ OutputString
Used to output a character string.
@ StringVariable
Used to store a fixed length string value.
@ InputNumber
Used to input an integer or float numeric.
@ OutputArchedBarGraph
Used to output an arched bar graph.
@ AuxiliaryFunctionType1
The Auxiliary Function Type 1 object defines the designator and function type for an Auxiliary Functi...
@ InputString
Used to input a character string.
@ AuxiliaryControlDesignatorType2
Used to reference Auxiliary Input Type 2 object or Auxiliary Function Type 2 object.
@ OutputRectangle
Used to output a rectangle or square.
@ Button
Used to describe a Button control.
@ Key
Used to describe a Soft Key.
@ FillAttributes
Used to group fill based attributes. Can only be referenced by other objects.
@ ExtendedInputAttributes
Used to specify a list of valid WideChars. Can only be referenced by Input Field Objects.
@ GraphicsContext
Used to output a graphics context.
@ OutputMeter
Used to output a meter.
@ ExternalObjectPointer
Used to reference an object in another Working Set.
@ AlarmMask
Top level object that contains other objects. Describes an alarm display.
@ ScaledGraphic
Used to display a scaled representation of a graphic object.
@ SoftKeyMask
Top level object that contains Key objects.
@ OutputNumber
Used to output an integer or float numeric.
@ InputList
Used to select an item from a pre-defined list.
@ AuxiliaryInputType2
The Auxiliary Input Type 2 object defines the designator, key number, and function type for an Auxili...
@ AuxiliaryFunctionType2
The Auxiliary Function Type 2 object defines the designator and function type for an Auxiliary Functi...
@ LineAttributes
Used to group line based attributes. Can only be referenced by other objects.
@ OutputLine
Used to output a line.
@ Animation
The Animation object is used to display simple animations.
@ KeyGroup
Top level object that contains Key objects.
@ InputBoolean
Used to input a TRUE/FALSE type input.
@ OutputLinearBarGraph
Used to output a linear bar graph.
@ ColourMap
Used to specify a colour table object.
@ InputAttributes
Used to specify a list of valid characters. Can only be referenced by input field objects.
Stores a cartesian polygon point.