Object Definitions

Defines the different VT object types that can comprise a VT object pool.

Author

Adrian Del Grosso

Copyright

2023 Adrian Del Grosso

namespace isobus

This namespace encompasses all of the ISO11783 stack’s functionality to reduce global namespace pollution.

Forward declare the linux sockaddr_can struct.

Enums

enum class VirtualTerminalObjectType : std::uint8_t

The types of objects in an object pool by object type byte value.

Values:

enumerator WorkingSet

Top level object that describes an implement’s ECU or group of ECUs.

enumerator DataMask

Top level object that contains other objects. A Data Mask is activated by a Working Set to become the active set of objects on the VT display.

enumerator AlarmMask

Top level object that contains other objects. Describes an alarm display.

enumerator Container

Used to group objects.

enumerator WindowMask

Top level object that contains other objects. The Window Mask is activated by the VT.

enumerator SoftKeyMask

Top level object that contains Key objects.

enumerator Key

Used to describe a Soft Key.

enumerator Button

Used to describe a Button control.

enumerator KeyGroup

Top level object that contains Key objects.

enumerator InputBoolean

Used to input a TRUE/FALSE type input.

enumerator InputString

Used to input a character string.

enumerator InputNumber

Used to input an integer or float numeric.

enumerator InputList

Used to select an item from a pre-defined list.

enumerator OutputString

Used to output a character string.

enumerator OutputNumber

Used to output an integer or float numeric.

enumerator OutputList

Used to output a list item.

enumerator OutputLine

Used to output a line.

enumerator OutputRectangle

Used to output a rectangle or square.

enumerator OutputEllipse

Used to output an ellipse or circle.

enumerator OutputPolygon

Used to output a polygon.

enumerator OutputMeter

Used to output a meter.

enumerator OutputLinearBarGraph

Used to output a linear bar graph.

enumerator OutputArchedBarGraph

Used to output an arched bar graph.

enumerator GraphicsContext

Used to output a graphics context.

enumerator Animation

The Animation object is used to display simple animations.

enumerator PictureGraphic

Used to output a picture graphic (bitmap).

enumerator GraphicData

Used to define the data for a graphic image.

enumerator ScaledGraphic

Used to display a scaled representation of a graphic object.

enumerator NumberVariable

Used to store a 32-bit unsigned integer value.

enumerator StringVariable

Used to store a fixed length string value.

enumerator FontAttributes

Used to group font based attributes. Can only be referenced by other objects.

enumerator LineAttributes

Used to group line based attributes. Can only be referenced by other objects.

enumerator FillAttributes

Used to group fill based attributes. Can only be referenced by other objects.

enumerator InputAttributes

Used to specify a list of valid characters. Can only be referenced by input field objects.

enumerator ExtendedInputAttributes

Used to specify a list of valid WideChars. Can only be referenced by Input Field Objects.

enumerator ColourMap

Used to specify a colour table object.

enumerator ObjectLabelRefrenceList

Used to specify an object label.

enumerator ObjectPointer

Used to reference another object.

enumerator ExternalObjectDefinition

Used to list the objects that may be referenced from another Working Set.

enumerator ExternalReferenceNAME

Used to identify the WS Master of a Working Set that can be referenced.

enumerator ExternalObjectPointer

Used to reference an object in another Working Set.

enumerator Macro

Special object that contains a list of commands that can be executed in response to an event.

enumerator AuxiliaryFunctionType1

The Auxiliary Function Type 1 object defines the designator and function type for an Auxiliary Function.

enumerator AuxiliaryInputType1

The Auxiliary Input Type 1 object defines the designator, key number, and function type for an auxiliary input.

enumerator AuxiliaryFunctionType2

The Auxiliary Function Type 2 object defines the designator and function type for an Auxiliary Function.

enumerator AuxiliaryInputType2

The Auxiliary Input Type 2 object defines the designator, key number, and function type for an Auxiliary Input.

enumerator AuxiliaryControlDesignatorType2

Used to reference Auxiliary Input Type 2 object or Auxiliary Function Type 2 object.

enumerator ManufacturerDefined1

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined2

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined3

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined4

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined5

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined6

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined7

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined8

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined9

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined10

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined11

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined12

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined13

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined14

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator ManufacturerDefined15

Manufacturer defined objects should not be sent to any other Vendors VT.

enumerator Reserved

Reserved for future use. (See Clause D.14 Get Supported Objects message)

enum class EventID : std::uint8_t

Enumerates VT events. Events can be uniquely associated with a Macro object to execute when the event occurs. These are defined in ISO 11783-6:2018 Table A.2.

Values:

enumerator Reserved

Reserved.

enumerator OnActivate

Working set is made active.

enumerator OnDeactivate

Working set is made inactive.

enumerator OnShow

For Container objects, triggered by the hide/show command, with “show” indicated; For mask objects, when the mask is made visible on the display.

enumerator OnHide

For Container objects, triggered by the hide/show command, with “hide” indicated; for mask objects, when the mask is removed from the display.

enumerator OnEnable

Input object is enabled (only enabled input objects can be navigated to). An Animation object is enabled for animation.

enumerator OnDisable

Input object is disabled (only enabled input objects can be navigated to). An Animation object is disabled for animation.

enumerator OnChangeActiveMask

Change Active mask command.

enumerator OnChangeSoftKeyMask

Change Soft Key mask command.

enumerator OnChangeAttribute

Change Attribute command.

enumerator OnChangeBackgroundColour

Change Background Colour command.

enumerator ChangeFontAttributes

Change Font Attributes command.

enumerator ChangeLineAttributes

Change Line Attributes command.

enumerator ChangeFillAttributes

Change Fill Attributes command.

enumerator ChangeChildLocation

Change Child Location command.

enumerator OnChangeSize

Change Size command.

enumerator OnChangeValue

Change numeric value or change string value command.

enumerator OnChangePriority

Change Priority command.

enumerator OnChangeEndpoint

Change Endpoint command.

enumerator OnInputFieldSelection

The input field, Key or Button has received focus, operator has navigated onto the input field or Button or the VT has received the Select Input Object command.

enumerator OnInputFieldDeselection

The input field, Key or Button has lost focus, operator has navigated off of the input field or Button or the VT has received the Select Input Object command.

enumerator OnESC

Input aborted on an input field either by the operator or the Working Set.

enumerator OnEntryOfAValue

Operator completes entry by activating the ENTER means - value does not have to change.

enumerator OnEntryOfANewValue

Operator completes entry by activating the ENTER means - value has changed.

enumerator OnKeyPress

A Soft Key or Button is pressed.

enumerator OnKeyRelease

A Soft Key or Button is released.

enumerator OnChangeChildPosition

Change Child Position command.

enumerator OnPointingEventPress

Operator touches/clicks an area that causes a pointing event.

enumerator OnPointingEventRelease

Operator touch/click is released.

enumerator ProprietaryRangeBegin

Proprietary range begin.

enumerator ProprietaryRangeEnd

Proprietary range end.

enumerator UseExtendedMacroReference

This is not an event. When value is found in the event list of an object, it indicates that a 16 bit Macro Object ID reference is used.

struct MacroMetadata
#include <isobus_virtual_terminal_objects.hpp>

A helper structure to group a macro ID with an event ID.

Public Members

EventID event

The event that triggers this macro.

std::uint16_t macroID

The ID of the macro to execute.

class VTColourVector
#include <isobus_virtual_terminal_objects.hpp>

VT 3 component colour vector.

Public Functions

inline constexpr VTColourVector()

Default constructor for a VT Colour, which produces the colour black.

inline constexpr VTColourVector(float red, float green, float blue)

Constructor for a VT Colour which initializes to an arbitrary colour.

Parameters:
  • red[in] The red value for a pixel, range 0.0f to 1.0f

  • green[in] The green value for a pixel, range 0.0f to 1.0f

  • blue[in] The blue value for a pixel, range 0.0f to 1.0f

Public Members

float r

Red value for a pixel, range 0.0f to 1.0f.

float g

Green value for a pixel, range 0.0f to 1.0f.

float b

Blue value for a pixel, range 0.0f to 1.0f.

class VTColourTable
#include <isobus_virtual_terminal_objects.hpp>

An object that represents the VT’s active colour table.

Public Functions

VTColourTable()

Constructor for a VT colour table.

VTColourVector get_colour(std::uint8_t colourIndex) const

Returns the colour vector associated to the specified VT colour index, which is what gets provided normally in most VT CAN messages, so this essentially maps the index to an actually usable colour definition.

Parameters:

colourIndex[in] The VT colour index to retrieve

Returns:

An RGB colour vector associated to the specified VT colour index

void set_colour(std::uint8_t colourIndex, VTColourVector newColour)

Sets the specified VT colour index to a new RGB colour value.

Parameters:
  • colourIndex[in] The VT colour index to modify

  • newColour[in] The RGB colour to set the specified index to

Private Members

std::array<VTColourVector, VT_COLOUR_TABLE_SIZE> colourTable

Colour table data. Associates VT colour index with RGB value.

Private Static Attributes

static constexpr std::size_t VT_COLOUR_TABLE_SIZE = 256

The size of the VT colour table as specified in ISO11783-6.

class VTObject
#include <isobus_virtual_terminal_objects.hpp>

Generic VT object base class.

Subclassed by isobus::AlarmMask, isobus::AuxiliaryControlDesignatorType2, isobus::AuxiliaryFunctionType1, isobus::AuxiliaryFunctionType2, isobus::AuxiliaryInputType1, isobus::AuxiliaryInputType2, isobus::Button, isobus::ColourMap, isobus::Container, isobus::DataMask, isobus::ExtendedInputAttributes, isobus::ExternalObjectPointer, isobus::FillAttributes, isobus::FontAttributes, isobus::InputAttributes, isobus::InputBoolean, isobus::InputList, isobus::InputNumber, isobus::InputString, isobus::Key, isobus::KeyGroup, isobus::LineAttributes, isobus::Macro, isobus::NumberVariable, isobus::ObjectPointer, isobus::OutputArchedBarGraph, isobus::OutputEllipse, isobus::OutputLine, isobus::OutputLinearBarGraph, isobus::OutputList, isobus::OutputMeter, isobus::OutputNumber, isobus::OutputPolygon, isobus::OutputRectangle, isobus::OutputString, isobus::PictureGraphic, isobus::SoftKeyMask, isobus::StringVariable, isobus::WindowMask, isobus::WorkingSet

Public Types

enum class AttributeError : std::uint8_t

Enumerates the bit indices of the error fields that can be set when changing an attribute.

Values:

enumerator InvalidObjectID
enumerator InvalidAttributeID
enumerator InvalidValue
enumerator AnyOtherError

Public Functions

VTObject() = default

Constructor for a generic VT object. Sets up default values and the pointer to the member object pool.

virtual ~VTObject() = default

Virtual destructor for a generic VT object.

virtual VirtualTerminalObjectType get_object_type() const = 0

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const = 0

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual bool get_is_valid(const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool) const = 0

Performs basic error checking on the object and returns if the object is valid.

Parameters:

objectPool[in] A map of all objects in the current object pool, keyed by their object ID

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) = 0

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] A map of all objects in the current object pool, keyed by their object ID. Used to validate some object references.

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual bool get_attribute(std::uint8_t attributeID, std::uint32_t &returnedAttributeData) const = 0

Gets an attribute and returns the raw data in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_id() const

Returns the object ID of this VT object.

Returns:

The object ID of this VT object

void set_id(std::uint16_t value)

Sets the object ID of this VT object.

Parameters:

value[in] The new object ID for this object. Must be unique in this pool.

std::uint16_t get_width() const

Returns the width of this object in px.

Returns:

The width of this object in px

void set_width(std::uint16_t value)

Sets the width of this object in px.

Parameters:

value[in] The new width of this object in px

std::uint16_t get_height() const

Returns the height of this object in px.

Returns:

The height of this object in px

void set_height(std::uint16_t value)

Sets the height of this object in px.

Parameters:

value[in] The new height of this object in px

std::uint8_t get_background_color() const

Returns the background color attribute of this object.

Returns:

The background color attribute of this object (index to the actual color in the color table)

void set_background_color(std::uint8_t value)

Sets the background color attribute of this object.

Parameters:

value[in] The new background color attribute for this object (index to the actual color in the color table)

std::uint16_t get_number_children() const

Returns the number of child objects within this object.

Returns:

The number of child objects within this object

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.

Parameters:
  • objectID[in] The object ID of the child to add

  • relativeXLocation[in] The X offset of this object to its parent

  • relativeYLocation[in] The Y offset of this object to its parent

std::uint16_t get_child_id(std::uint16_t index) const

Returns the ID of the child by index, if one was added previously.

Note

NULL_OBJECT_ID is a valid child, so you should always check the number of children to know if the return value of this is “valid”

Parameters:

index[in] The index of the child to retrieve

Returns:

The ID of the child at the specified index, or NULL_OBJECT_ID if the index is out of range

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.

Parameters:

index[in] The index of the child to retrieve

Returns:

The relative X position of the child, and always 0 if the index is out of range

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.

Parameters:

index[in] The index of the child to retrieve

Returns:

The relative Y position of the child, and always 0 if the index is out of range

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.

Parameters:
  • index[in] The child index to affect

  • xOffset[in] The relative X position of the child, and always 0 if the index is out of range

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.

Parameters:
  • index[in] The child index to affect

  • yOffset[in] The relative Y position of the child, and always 0 if the index is out of range

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.

Parameters:
  • childObjectID[in] The object ID of the children to offset

  • xOffset[in] The relative amount to offset the object(s) by in the X axis

  • yOffset[in] The relative amount to offset the object(s) by in the Y axis

Returns:

true if any child matched the specified object ID, otherwise false if no children were found with the specified ID.

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 removed. This is because objects can have multiple of the same child at different places, so we can’t infer which one to remove without the exact position.

Parameters:
  • objectIDToRemove[in] The object ID of the child to remove

  • relativeXLocation[in] The X offset of this object to its parent

  • relativeYLocation[in] The Y offset of this object to its parent

void pop_child()

Removes the last added child object. This is meant to be a faster way to deal with objects that only have a max of 1 child.

std::uint8_t get_number_macros() const

Returns the number of macros referenced by this object.

Returns:

The number of macros referenced by this object

void add_macro(MacroMetadata macroToAdd)

Adds a macro to the list of macros referenced by this object.

Parameters:

macroToAdd[in] The macro to add, which includes the event ID and macro ID

MacroMetadata get_macro(std::uint8_t index) const

Returns the macro ID at the specified index.

Parameters:

index[in] The index of the macro to retrieve

Returns:

The macro metadata at the specified index, or NULL_OBJECT_ID + EventID::Reserved if the index is out of range

Public Static Functions

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.

Parameters:
  • objectID[in] The object ID to search for

  • objectPool[in] The object pool to search in

Returns:

The object with the corresponding ID

Protected Attributes

std::vector<ChildObjectData> children

List of child objects.

std::vector<MacroMetadata> macros

List of macros referenced by this object.

std::uint16_t objectID = NULL_OBJECT_ID

Object identifier. Shall be unique within the object pool.

std::uint16_t width = 0

The width of the object. Not always applicable, but often used.

std::uint16_t height = 0

The height of the object. Not always applicable, but often used.

std::uint8_t backgroundColor = 0

The background color (from the VT colour table)

class ChildObjectData
#include <isobus_virtual_terminal_objects.hpp>

Storage for child object data.

Public Functions

ChildObjectData() = default

Default constructor for child object data with default values.

ChildObjectData(std::uint16_t objectId, std::int16_t x, std::int16_t y)

Constructor that initializes all members with parameters.

Parameters:
  • objectId[in] The object ID of this child object

  • x[in] The x location of this child relative to the parent object

  • y[in] The y location of this child relative to the parent object

Public Members

std::uint16_t id = NULL_OBJECT_ID

Object identifier. Shall be unique within the object pool.

std::int16_t xLocation = 0

Relative X location of the top left corner of the object.

std::int16_t yLocation = 0

Relative Y location of the top left corner of the object.

class WorkingSet : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object shall include one or more objects that fit inside a Soft Key designator for use as an identification of the Working Set.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator Selectable
enumerator ActiveMask
enumerator NumberOfAttributes

Public Functions

WorkingSet() = default

Constructor for a working set object.

~WorkingSet() override = default

Virtual destructor for a working set object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating this object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_selectable() const

Returns if the working set is currently selectable.

Returns:

true if the working set is currently selectable, otherwise false

void set_selectable(bool value)

Sets if the working set is selectable.

Parameters:

value[in] true to make the working set selectable, otherwise false

std::uint16_t get_active_mask() const

Returns tha currently active mask for this working set.

Returns:

The object ID of the active mask for this working set

void set_active_mask(std::uint16_t value)

Sets the object id of the active mask for this working set.

Parameters:

value[in] The object ID of the active mask for this working set

Private Members

std::vector<std::string> languageCodes

A list of 2 character language codes, like “en”.

std::uint16_t activeMask = NULL_OBJECT_ID

The currently active mask for this working set.

bool selectable = false

If this working set is selectable right now.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 18

The fewest bytes of IOP data that can represent this object.

class DataMask : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Data Mask describes the objects that will appear in the Data Mask area of the physical display.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator SoftKeyMask
enumerator NumberOfAttributes

Public Functions

DataMask() = default

Constructor for a data mask object.

~DataMask() override = default

Virtual destructor for a data mask object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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 the type of the assigned object to ensure it is a soft key mask.

Parameters:
  • newMaskID[in] The object ID of the new soft key mask to associate with this data mask

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

Returns:

True if the mask was changed, false if the new ID was not valid and the mask was not changed

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 the validity of the new object ID.

Parameters:

newMaskID[in] The object ID of the new soft key mask to associate with this data mask

std::uint16_t get_soft_key_mask() const

Returns the object ID of the soft key mask associated with this data mask.

Returns:

The object ID of the soft key mask associated with this data mask

Private Members

std::uint16_t softKeyMaskObjectID = NULL_OBJECT_ID

The object ID of the soft key mask associated with this data mask.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 12

The fewest bytes of IOP data that can represent this object.

class AlarmMask : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Similar to a data mask, but takes priority and will be shown over data masks.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator SoftKeyMask
enumerator Priority
enumerator AcousticSignal
enumerator NumberOfAttributes
enum class Priority : std::uint8_t

Enumerates the different mask priorities. Higher priority masks will be shown over lower priority ones across all working sets.

Values:

enumerator High

High, operator is in danger or urgent machine malfunction.

enumerator Medium

Medium, normal alarm, machine is malfunctioning.

enumerator Low

Low, information only.

enum class AcousticSignal : std::uint8_t

Enumerates the acoustic signal values for the alarm mask. Works only if your VT has a way to make sounds.

The result of this setting is somewhat proprietary depending on your VT

Values:

enumerator Highest

Most aggressive beeping.

enumerator Medium

Medium beeping.

enumerator Lowest

Low beeping.

enumerator None

No beeping.

Public Functions

AlarmMask() = default

Constructor for a alarm mask object.

~AlarmMask() override = default

Virtual destructor for a alarm mask object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

Priority get_mask_priority() const

Returns the priority of the alarm mask.

Higher priority masks will be shown over lower priority ones.

Returns:

The priority of the alarm mask

void set_mask_priority(Priority value)

Sets the priority of the alarm mask.

Higher priority masks will be shown over lower priority ones.

Parameters:

value[in] The priority to set

AcousticSignal get_signal_priority() const

Returns the acoustic signal priority for the alarm mask.

Controls how aggressive the beep is on VTs with a speaker or whistle chip.

Returns:

The acoustic signal priority of the alarm mask

void set_signal_priority(AcousticSignal value)

Sets the acoustic signal priority for the alarm mask.

Controls how aggressive the beep is on VTs with a speaker or whistle chip.

Parameters:

value – The acoustic signal priority to set

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 on the type of the assigned object to ensure it is a soft key mask.

Parameters:
  • newMaskID[in] The object ID of the new soft key mask to associate with this data mask

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

Returns:

True if the mask was changed, false if the new ID was not valid and the mask was not changed

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 the validity of the new object ID.

Parameters:

newMaskID[in] The object ID of the new soft key mask to associate with this alarm mask

std::uint16_t get_soft_key_mask() const

Returns the object ID of the soft key mask associated with this alarm mask.

Returns:

The object ID of the soft key mask associated with this alarm mask

Private Members

std::uint16_t softKeyMask = NULL_OBJECT_ID

Object ID of a soft key mask for this alarm mask, or the null ID.

Priority maskPriority = Priority::High

The priority of this mask.

AcousticSignal signalPriority = AcousticSignal::Highest

The acoustic signal priority for this mask.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 10

The fewest bytes of IOP data that can represent this object.

class Container : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Container object is used to group objects for the purpose of moving, hiding or sharing the group.

A container is not a visible object, only a logical grouping of other objects. Unlike masks, containers can be hidden and shown at run-time

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator Hidden
enumerator NumberOfAttributes

Public Functions

Container() = default

Constructor for a container object.

~Container() override = default

Virtual destructor for a container object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_hidden() const

Returns the “hidden” attribute for this container.

Returns:

true if the hidden attribute is set, otherwise false

void set_hidden(bool value)

Sets the “hidden” attribute for this container.

Parameters:

value[in] The new attribute state

Private Members

bool hidden = false

The hidden attribute state for this container object. True means it will be hidden when rendered.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 9

The fewest bytes of IOP data that can represent this object.

class SoftKeyMask : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Soft Key Mask is a Container object that contains Key objects, Object Pointer objects, or External Object Pointer objects.

Keys are assigned to physical Soft Keys in the order listed. It is allowable for a Soft Key Mask to contain no Keys in order that all Soft Keys are effectively disabled when this mask is activated

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator NumberOfAttributes

Public Functions

SoftKeyMask() = default

Constructor for a soft key mask object.

~SoftKeyMask() override = default

Virtual destructor for a soft key mask object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 6

The fewest bytes of IOP data that can represent this object.

class Key : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Key object defines the designator and key code for a Soft Key. Any object located outside of a Soft Key designator is clipped.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator KeyCode
enumerator NumberOfAttributes

Public Functions

Key() = default

Constructor for a key object.

~Key() override = default

Virtual destructor for a key object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_key_code() const

Returns the key code associated to this key object.

Returns:

The key code associated to this key object

void set_key_code(std::uint8_t value)

Sets the key code associated to this key object.

Parameters:

value[in] The key code to set

Private Members

std::uint8_t keyCode = 0

They key code associated with events from this key object.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7

The fewest bytes of IOP data that can represent this object.

class KeyGroup : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Key objects contained in this object shall be a grouping of Key objects, or Object Pointers to Key objects.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Options
enumerator Name
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Enumerates the options bits in the options bitfield of a KeyGroup.

Values:

enumerator Available

If 0 (FALSE) this object is not available for use at the present time, even though defined.

enumerator Transparent

If this bit is 1, the VT shall ignore the background colour attribute in all child Key objects.

Public Functions

KeyGroup() = default

Constructor for a key group object.

~KeyGroup() override = default

Virtual destructor for a key group object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_key_group_icon() const

Returns the key group icon that represents this key group.

Returns:

Object ID of the key group icon that represents this key group

void set_key_group_icon(std::uint16_t value)

Sets the object ID of the icon to use when representing this key group.

Parameters:

value[in] Object ID of a picture graphic to use as the key group icon

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

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 String object that contains a name for this object.

Returns:

Object ID of an Output String object or an Object Pointer object that will represent the name of this key group

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 String object that contains a name for this object.

Parameters:

value[in] The object ID of the object that will represent the name of this key group, CANNOT BE the null object ID

Public Static Attributes

static constexpr std::uint8_t MAX_CHILD_KEYS = 4

There shall be a max of 4 keys per group according to the standard.

Private Functions

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.

Parameters:
  • nameIDToValidate[in] The name’s object ID to validate

  • objectPool[in] The object pool to use when validating the name object

Returns:

True if the name ID is valid for this object, otherwise false

Private Members

std::uint16_t keyGroupIcon = NULL_OBJECT_ID

The VT may use this in the proprietary mapping screen to represent the key group.

std::uint16_t nameID = NULL_OBJECT_ID

Object ID of a string variable that contains the name of the key group.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 10

The fewest bytes of IOP data that can represent this object.

class Button : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Button object defines a button control.

This object is intended mainly for VTs with touch screens or a pointing method but shall be supported by all VTs.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator BackgroundColour
enumerator BorderColour
enumerator KeyCode
enumerator Options
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Enumerates the options encoded into the options bitfield for a button.

Values:

enumerator Latchable

If TRUE, the Button is latchable and remains pressed until the next activation. If FALSE, the Button is momentary.

enumerator CurrentButtonStateIfLatchable

For latchable Buttons. 0=released, 1=latched.

enumerator SuppressBorder

If FALSE, VT draws the proprietary border. If TRUE, no border is ever drawn.

enumerator TransparentBackground

If FALSE, the Button’s interior background is filled using the background colour attribute. If TRUE, the Button’s background is always transparent.

enumerator Disabled

If FALSE, the Button is enabled and can be selected and activated by the operator. If TRUE, the Button is drawn disabled (method proprietary)

enumerator NoBorder

If FALSE, the Button Border area is used by the VT as described in Bit 2. If TRUE, Bit 2 is ignored therefore no border is ever drawn and the Button Face extends to the full Button Area.

enumerator Reserved1

Set to 0.

enumerator Reserved2

Set to 0.

Public Functions

Button() = default

Constructor for a button object.

~Button() override = default

Virtual destructor for a button object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_key_code() const

Returns the key code associated with this button’s events.

Returns:

The key code associated with this button’s events

void set_key_code(std::uint8_t value)

Sets the key code associated with this button’s events.

Parameters:

value[in] The key code to set

std::uint8_t get_border_colour() const

Returns the colour of the button’s border as an index into the VT colour table.

Returns:

The colour of the button’s border as an index into the VT colour table

void set_border_colour(std::uint8_t value)

Sets the border colour.

Parameters:

value[in] The border colour to set as an index into the VT colour table

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

Private Members

std::uint8_t borderColour = 0

Border colour.

std::uint8_t keyCode = 0

Key code assigned by ECU. VT reports this code in the Button Activation message.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13

The fewest bytes of IOP data that can represent this object.

class InputBoolean : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Input Boolean object is used to input a TRUE/FALSE type indication from the operator.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator Width
enumerator ForegroundColour
enumerator VariableReference
enumerator Value
enumerator Enabled
enumerator NumberOfAttributes

Public Functions

InputBoolean() = default

Constructor for an input boolean object.

~InputBoolean() override = default

Virtual destructor for an input boolean object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_value() const

Returns the value of the boolean (only matters if a reference object is not present)

Note

The reference object will be a child number variable object if it is present

Returns:

The value of the boolean object

void set_value(std::uint8_t inputValue)

Sets the value of the boolean object (only matters if a reference object is not present)

Note

The reference object will be a child number variable object if it is present

Parameters:

inputValue[in] The value to set for the boolean’s state

bool get_enabled() const

Returns if this object is enabled based on the enabled attribute.

Returns:

true If the enabled attribute on this object is true, otherwise false

void set_enabled(bool isEnabled)

Sets the enabled attribute on this object to a new value.

Parameters:

isEnabled[in] The new state for the enabled attribute for this object

std::uint16_t get_foreground_colour_object_id() const

Returns the object ID of a font attributes object that defines the foreground colour, or the null ID.

Returns:

The object ID of a font attributes object that defines the foreground colour, or the null ID

void set_foreground_colour_object_id(std::uint16_t fontAttributeValue)

Sets the object ID of the foreground colour object. Does not perform error checking on the type of the supplied object.

Parameters:

fontAttributeValue[in] The object ID of the foreground colour object

std::uint16_t get_variable_reference() const

Returns the object ID of a number variable object that contains the value of the Input Boolean object or the null ID if the “value” attribute is used instead.

Returns:

The object ID of a number variable object that contains the value of the Input Boolean object, or the null ID

void set_variable_reference(std::uint16_t numberVariableValue)

Sets the object ID of the number variable object that contains the value of the Input Boolean object. Does no error checking on the type of the supplied object.

Parameters:

numberVariableValue[in] The object ID of the number variable object that contains the value of the Input Boolean object, or the null ID

Private Members

std::uint16_t foregroundColourObjectID = NULL_OBJECT_ID

Object ID of a font attributes that contains the foreground colour of the Input Boolean object.

std::uint16_t variableReference = NULL_OBJECT_ID

Object ID of a number variable object that contains the value of the Input Boolean object.

std::uint8_t value = 0

Used only if it has no number variable child object.

bool enabled = false

If the bool is interactable.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13

The fewest bytes of IOP data that can represent this object.

class InputString : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object is used to input a character string from the operator.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator BackgroundColour
enumerator FontAttributes
enumerator InputAttributes
enumerator Options
enumerator VariableReference
enumerator Justification
enumerator Enabled
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input string.

Values:

enumerator Transparent

If TRUE, the input field is displayed with background showing through instead of using the background colour.

enumerator AutoWrap

Auto-Wrapping rules apply.

enumerator WrapOnHyphen

If TRUE, Auto-Wrapping can occur between a hyphen and the following character.

enum class HorizontalJustification : std::uint8_t

The allowable horizontal justification options.

Values:

enumerator PositionLeft

The input string is horizontally justified to the left side of its bounding box.

enumerator PositionMiddle

The input string is horizontally justified to the center of its bounding box.

enumerator PositionRight

The input string is horizontally justified to the right side of its bounding box.

enumerator Reserved

Reserved.

enum class VerticalJustification : std::uint8_t

The allowable vertical justification options.

Values:

enumerator PositionTop

The input string is vertically justified to the top of its bounding box.

enumerator PositionMiddle

The input string is vertically justified to the center of its bounding box.

enumerator PositionBottom

The input string is vertically justified to the bottom of its bounding box.

enumerator Reserved

Reserved.

Public Functions

InputString() = default

Constructor for a input string object.

~InputString() override = default

Virtual destructor for a input string object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_enabled() const

Returns if the input string is enabled for text entry.

Returns:

true if the input string is enabled for entry

void set_enabled(bool value)

Sets the enable/disable state of the input string.

Parameters:

value[in] The new enable/disable state for the input string

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

HorizontalJustification get_horizontal_justification() const

Returns the horizontal justification setting of the string.

Returns:

The horizontal justification setting of the string

VerticalJustification get_vertical_justification() const

Returns the vertical justification setting of the string.

Returns:

The vertical justification setting of the string

void set_justification_bitfield(std::uint8_t value)

Sets the justification bitfield of the string.

Parameters:

value[in] The justification bitfield to set

std::string get_value() const

Returns a copy of the stored string value. Used only when no string variable objects are children of this object.

Returns:

The value of the string stored in this object

void set_value(const std::string &value)

Changes the stored string value. Use only when no string variable objects are children of this object.

Parameters:

value[in] The new string value

std::uint16_t get_font_attributes() const

Returns the object ID of a font attributes object that defines the font attributes of the Input String object.

Returns:

The object ID of a font attributes object that defines the font attributes of the Input String object

void set_font_attributes(std::uint16_t fontAttributesValue)

Sets the object ID of a font attributes object that defines the font attributes of the Input String object. Does no error checking on the type of the supplied object.

Parameters:

fontAttributesValue[in] The object ID of a font attributes object that defines the font attributes of the Input String object

std::uint16_t get_variable_reference() const

Returns the object ID of a string variable object that contains the value of the Input String object.

Returns:

The object ID of a string variable object that contains the value of the Input String object

void set_variable_reference(std::uint16_t variableReferenceValue)

Sets the object ID of a string variable object that contains the value of the Input String object. Does no error checking on the type of the supplied object.

Parameters:

variableReferenceValue[in] The object ID of a string variable object that contains the value of the Input String object

std::uint16_t get_input_attributes() const

Returns the object ID of a input attributes object that defines what can be input into the Input String object.

Returns:

The object ID of a input attributes object that defines the input attributes of the Input String object

void set_input_attributes(std::uint16_t inputAttributesValue)

Sets the object ID of a input attributes object that defines what can be input into the Input String object. Does no error checking on the type of the supplied object.

Parameters:

inputAttributesValue[in] The object ID of a input attributes object that defines the input attributes of the Input String object

Private Members

std::string stringValue

The actual string. Used only if variable reference attribute is NULL. Pad with spaces as necessary to satisfy length attribute.

std::uint16_t fontAttributes = NULL_OBJECT_ID

Stores the object ID of a font attributes object that will be used to display this object.

std::uint16_t inputAttributes = NULL_OBJECT_ID

Stores the object ID of a input attributes object that will be used to determine what can be input into this object.

std::uint16_t variableReference = NULL_OBJECT_ID

Stores the object ID of a string variable object that will be used in place of the string value attribute if it is not NULL_OBJECT_ID.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t justificationBitfield = 0

Bitfield of justification options.

bool enabled = false

If the string is interactable.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 19

The fewest bytes of IOP data that can represent this object.

class InputNumber : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object is used to format, display and change a numeric value based on a supplied integer value.

Displayed value = (value attribute + Offset) * Scaling Factor

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator BackgroundColour
enumerator FontAttributes
enumerator Options
enumerator VariableReference
enumerator MinValue
enumerator MaxValue
enumerator Offset
enumerator Scale
enumerator NumberOfDecimals
enumerator Format
enumerator Justification
enumerator Value
enumerator Options2
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input number.

Values:

enumerator Transparent

If TRUE, the input field is displayed with background showing through instead of using the background colour.

enumerator DisplayLeadingZeros

If TRUE, fill left to width of field with zeros; justification is applied after filling.

enumerator DisplayZeroAsBlank

When this option bit is set, a blank field is displayed if and only if the displayed value of the object is exactly zero.

enumerator Truncate

If TRUE the value shall be truncated to the specified number of decimals. Otherwise it shall be rounded off to the specified number of decimals.

enum class Options2 : std::uint8_t

More options, for some reason they are different bytes.

Values:

enumerator Enabled

If TRUE the object shall be enabled.

enumerator RealTimeEditing

If TRUE the value shall be transmitted to the ECU as it is being changed.

enum class HorizontalJustification : std::uint8_t

The allowable horizontal justification options.

Values:

enumerator PositionLeft

The input number is horizontally justified to the left side of its bounding box.

enumerator PositionMiddle

The input number is horizontally justified to the center of its bounding box.

enumerator PositionRight

The input number is horizontally justified to the right side of its bounding box.

enumerator Reserved

Reserved.

enum class VerticalJustification : std::uint8_t

The allowable vertical justification options.

Values:

enumerator PositionTop

The input number is vertically justified to the top of its bounding box.

enumerator PositionMiddle

The input number is vertically justified to the center of its bounding box.

enumerator PositionBottom

The input number is vertically justified to the bottom of its bounding box.

enumerator Reserved

Reserved.

Public Functions

InputNumber() = default

Constructor for an input number object.

~InputNumber() override = default

Virtual destructor for an input number object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

HorizontalJustification get_horizontal_justification() const

Returns the horizontal justification setting of the input number.

Returns:

The horizontal justification setting of the input number

VerticalJustification get_vertical_justification() const

Returns the vertical justification setting of the input number.

Returns:

The vertical justification setting of the input number

void set_justification_bitfield(std::uint8_t newJustification)

Sets the justification bitfield of the input number.

Parameters:

newJustification[in] The justification bitfield to set

float get_scale() const

Returns the scale factor that is applied to the value of the input number.

Returns:

The scale factor that is applied to the value of the input number

void set_scale(float newScale)

Sets the scale factor that is applied to the value of the input number.

Parameters:

newScale[in] The scale factor to set

std::uint32_t get_maximum_value() const

Returns the maximum value for the input number.

The VT shall not accept values higher than this for this input number’s value

Returns:

The maximum value for the input number

void set_maximum_value(std::uint32_t newMax)

Sets the maximum value for the input number.

The VT shall not accept values higher than this for this input number’s value

Parameters:

newMax[in] The maximum value for the input number

std::uint32_t get_minimum_value() const

Returns the minimum value for this input number.

The VT shall not accept values smaller than this value for this input number

Returns:

The minimum value for this input number

void set_minimum_value(std::uint32_t newMin)

Sets the minimum value for the input number.

The VT shall not accept values smaller than this value for this input number

Parameters:

newMin[in] The minimum value to set for the input number

std::int32_t get_offset() const

Returns the offset that will be applied to the number’s value when it is displayed.

Returns:

The offset that will be applied to the number’s value when it is displayed

void set_offset(std::int32_t newOffset)

Sets the offset that will be applied to the number’s value when it is displayed.

Parameters:

newOffset[in] The new offset that will be applied to the number’s value when it is displayed

std::uint8_t get_number_of_decimals() const

Returns the number of decimals to display when rendering this input number.

Returns:

The number of decimals to display when rendering the input number

void set_number_of_decimals(std::uint8_t numDecimals)

Sets the number of decimals to display when rendering this number.

Parameters:

numDecimals[in] The number of decimals to display

bool get_format() const

Returns if the format option is set for this input number.

The format option determines if the value is shown in fixed decimal or exponential form. A value of true means fixed decimal (####.nn), and false means exponential ([−]###.nnE[+/−]##)

Returns:

true if the format option is set for this input number, otherwise false

void set_format(bool newFormat)

Sets the format option.

The format option determines if the value is shown in fixed decimal or exponential form. A value of true means fixed decimal (####.nn), and false means exponential ([−]###.nnE[+/−]##)

Parameters:

newFormat[in] The format value to set. true for fixed decimal, false for exponential.

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t newOptions)

Sets the options bitfield for this object to a new value.

Parameters:

newOptions[in] The new value for the options bitfield

void set_option(Options option, bool optionValue)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • optionValue[in] The new value of the option bit

bool get_option2(Options2 newOption) const

Returns the state of a single option in the object’s second option bitfield.

Parameters:

newOption[in] The option to check the value of in the object’s second option bitfield

Returns:

The state of the associated option bit

void set_options2(std::uint8_t newOptions)

Sets the second options bitfield for this object to a new value.

Parameters:

newOptions[in] The new value for the second options bitfield

void set_option2(Options2 option, bool newOption)

Sets a single option in the second options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • newOption[in] The new value of the option bit

std::uint32_t get_value() const

Returns the value of the input number (only matters if there’s no child number variable object).

Returns:

The value of the input number

void set_value(std::uint32_t inputValue)

Sets the value of the input number (only matters if there’s no child number variable object).

Parameters:

inputValue[in] The value to set for the input number

std::uint16_t get_font_attributes() const

Returns the object ID of a font attributes object that defines the font attributes of the Input Number object.

Returns:

The object ID of a font attributes object that defines the font attributes of the Input Number 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 Input Number object. Does no error checking on the type of the supplied object.

Parameters:

fontAttributesValue[in] The object ID of a font attributes object that defines the font attributes of the Input Number object

std::uint16_t get_variable_reference() const

Returns the object ID of a number variable object that contains the value of the Input Number object.

Returns:

The object ID of a number variable object that contains the value of the Input Number object

void set_variable_reference(std::uint16_t variableReferenceValue)

Sets the object ID of a number variable object that contains the value of the Input Number object. Does no error checking on the type of the supplied object.

Parameters:

variableReferenceValue[in] The object ID of a number variable object that contains the value of the Input Number object

Private Members

float scale = 0.0f

Scale to be applied to the input value and min/max values.

std::uint32_t maximumValue = 0

Raw maximum value for the input.

std::uint32_t minimumValue = 0

Raw minimum value for the input before scaling.

std::uint32_t value = 0

The raw value of the object, used if no number variable child has been set.

std::int32_t offset = 0

Offset to be applied to the input value and min/max values.

std::uint16_t fontAttributes = NULL_OBJECT_ID

Stores the object ID of a font attributes object that will be used to display this object.

std::uint16_t variableReference = NULL_OBJECT_ID

Stores the object ID of a number variable object that will be used in place of the value attribute if it is not NULL_OBJECT_ID.

std::uint8_t numberOfDecimals = 0

Specifies number of decimals to display after the decimal point.

std::uint8_t options = 0

Options byte 1.

std::uint8_t options2 = 0

Options byte 2.

std::uint8_t justificationBitfield = 0

Indicates how the number is positioned in the field defined by height and width.

bool format = false

0 = use fixed format decimal display (####.nn), 1 = use exponential format ([-]###.nnE[+/-]##) where n is set by the number of decimals

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 38

The fewest bytes of IOP data that can represent this object.

class InputList : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Input List object is used to show one object out of a set of objects, and to allow operator selection of one object from the set.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator VariableReference
enumerator Value
enumerator Options
enumerator NumberOfAttributes
enum class Options

Enumerates the bits in the options bitfield for an InputList.

Values:

enumerator Enabled

If true the object shall be enabled.

enumerator RealTimeEditing

If true the value shall be transmitted to the ECU as it is being changed.

Public Functions

InputList() = default

Constructor for an input list object.

~InputList() override = default

Virtual destructor for an input list object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t options)

Sets the options bitfield for this object to a new value.

Parameters:

options[in] The new value for the options bitfield

void set_option(Options option, bool optionValue)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • optionValue[in] The new value of the option bit

std::uint8_t get_value() const

Returns the value of the selected list index (only matters if there is no child number variable)

Returns:

The value of the selected list index

void set_value(std::uint8_t inputValue)

Sets the selected list index (only matters when the object has no child number variable)

Parameters:

inputValue[in] The new value for the selected list index

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 list getting messed up from changing the attribute or a list item.

Parameters:

referencedObjectID[in] The object ID of a number variable to set as the value reference

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)

Returns:

The variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)

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.

Parameters:
  • index[in] The index to change (starting from 0)

  • newListItem[in] The object ID to use as the new list item at the specified index

  • objectPool[in] The object pool to use to look up the object ID

Returns:

True if the operation was successful, otherwise false (perhaps the index is out of bounds?)

std::uint8_t get_number_of_list_items() const

Returns the number of items in the list.

Note

This is not the number of children, it’s the number of allocated list items. The number of children can be less than this number.

Returns:

The number of items in the list

void set_number_of_list_items(std::uint8_t value)

Sets the number of items in the list.

Note

This is not the number of children, it’s the number of allocated list items. The number of children can be less than this number.

Parameters:

value[in] The number of items in the list

Private Members

std::uint16_t variableReference = NULL_OBJECT_ID

Stores the object ID of a number variable that will be used as the value, or the NULL_OBJECT_ID if not used.

std::uint8_t numberOfListItems = 0

Number of object references to follow. The size of the list can never exceed this number and this attribute cannot be changed.

std::uint8_t optionsBitfield = 0

Options byte.

std::uint8_t value = 0

Selected list index of this object. Used only if variable reference attribute is NULL.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13

The fewest bytes of IOP data that can represent this object.

class OutputString : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object is used to output a string of text.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator BackgroundColour
enumerator FontAttributes
enumerator Options
enumerator VariableReference
enumerator Justification
enumerator NumberOfAttributes
enum class Options

Enumerates the option bits in the options bitfield for an output string.

Values:

enumerator Transparent

If TRUE, the output field is displayed with background showing through instead of using the background colour.

enumerator AutoWrap

Auto-Wrapping rules apply.

enumerator WrapOnHyphen

If TRUE, Auto-Wrapping can occur between a hyphen and the next character.

enum class HorizontalJustification : std::uint8_t

The allowable horizontal justification options.

Values:

enumerator PositionLeft

Output string is horizontally aligned to the left of its bounding box.

enumerator PositionMiddle

Output string is horizontally aligned to the center of its bounding box.

enumerator PositionRight

Output string is horizontally aligned to the right of its bounding box.

enumerator Reserved

Reserved.

enum class VerticalJustification : std::uint8_t

The allowable vertical justification options.

Values:

enumerator PositionTop

Output string is vertically aligned to the top of its bounding box.

enumerator PositionMiddle

Output string is vertically aligned to the center of its bounding box.

enumerator PositionBottom

Output string is vertically aligned to the bottom of its bounding box.

enumerator Reserved

Reserved.

Public Functions

OutputString() = default

Constructor for an output string object.

~OutputString() override = default

Virtual destructor for an output string object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

HorizontalJustification get_horizontal_justification() const

Returns the horizontal justification of the output string within its bounding box.

Returns:

The horizontal justification of the output string within its bounding box

VerticalJustification get_vertical_justification() const

Returns the vertical justification of the output string within its bounding box.

Returns:

The vertical justification of the output string within its bounding box

void set_justification_bitfield(std::uint8_t value)

Sets the justification bitfield for the object to a new value.

Parameters:

value[in] The new value for the justification bitfield

std::string get_value() const

Returns the value of the string, used only if the variable reference (a child var string) is NULL_OBJECT_ID.

Returns:

The value of the string

void set_value(const std::string &value)

Sets the value of the string (only matters if it has no child string variable)

Parameters:

value[in] The new value for the string

std::uint16_t get_font_attributes() const

Returns the object ID of a font attributes object that defines the font attributes of the Output String object.

Returns:

The object ID of a font attributes object that defines the font attributes of the Output String object

void set_font_attributes(std::uint16_t fontAttributesValue)

Sets the object ID of a font attributes object that defines the font attributes of the Output String object. Does no error checking on the type of the supplied object.

Parameters:

fontAttributesValue[in] The object ID of a font attributes object that defines the font attributes of the Output String object

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.

Returns:

The object ID of a string variable object that contains the value of the Output String object

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. Does no error checking on the type of the supplied object.

Parameters:

variableReferenceValue[in] The object ID of a string variable object that contains the value of the Output String object

Private Members

std::string stringValue

The actual string. Used only if variable reference attribute is NULL. Pad with spaces as necessary to satisfy length attribute.

std::uint16_t fontAttributes = NULL_OBJECT_ID

Stores the object ID of a font attributes object that will be used to display this object.

std::uint16_t variableReference = NULL_OBJECT_ID

Stores the object ID of a string variable object that will be used in place of the string value attribute if it is not NULL_OBJECT_ID.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t justificationBitfield = 0

Bitfield of justification options.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 16

The fewest bytes of IOP data that can represent this object.

class OutputNumber : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object is used to format and output a numeric value based on a supplied integer value.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator BackgroundColour
enumerator FontAttributes
enumerator Options
enumerator VariableReference
enumerator Offset
enumerator Scale
enumerator NumberOfDecimals
enumerator Format
enumerator Justification
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input number.

Values:

enumerator Transparent

If true, the input field is displayed with background showing through instead of using the background colour.

enumerator DisplayLeadingZeros

If true, fill left to width of field with zeros; justification is applied after filling.

enumerator DisplayZeroAsBlank

When this option bit is set, a blank field is displayed if and only if the displayed value of the object is exactly zero.

enumerator Truncate

If true the value shall be truncated to the specified number of decimals. Otherwise it shall be rounded off to the specified number of decimals.

enum class HorizontalJustification : std::uint8_t

The allowable horizontal justification options.

Values:

enumerator PositionLeft

The output number is horizontally justified to the left side of its bounding box.

enumerator PositionMiddle

The output number is horizontally justified to the center of its bounding box.

enumerator PositionRight

The output number is horizontally justified to the right side of its bounding box.

enumerator Reserved

Reserved.

enum class VerticalJustification : std::uint8_t

The allowable vertical justification options.

Values:

enumerator PositionTop

The output number is vertically justified to the top of its bounding box.

enumerator PositionMiddle

The output number is vertically justified to the center of its bounding box.

enumerator PositionBottom

The output number is vertically justified to the bottom of its bounding box.

enumerator Reserved

Reserved.

Public Functions

OutputNumber() = default

Constructor for an output number object.

~OutputNumber() override = default

Virtual destructor for an output number object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

HorizontalJustification get_horizontal_justification() const

Returns the horizontal justification of the output number within its bounding box.

Returns:

The horizontal justification of the output number within its bounding box

VerticalJustification get_vertical_justification() const

Returns the vertical justification of the output number within its bounding box.

Returns:

The vertical justification of the output number within its bounding box

void set_justification_bitfield(std::uint8_t value)

Sets the justification bitfield to a new value.

Parameters:

value[in] The new value for the justification bitfield

float get_scale() const

Returns the scale factor of the output number.

Returns:

The scale factor of the output number

void set_scale(float scaleValue)

Sets the scale factor for the output number.

Parameters:

scaleValue[in] The new value for the scale factor

std::int32_t get_offset() const

Returns the offset that is applied to the output number.

Returns:

The offset of the output number

void set_offset(std::int32_t offsetValue)

Sets the offset of the output number.

Parameters:

offsetValue[in] The offset to set for the output number

std::uint8_t get_number_of_decimals() const

Returns the number of decimals to render in the output number.

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.

Parameters:

decimalValue[in] The number of decimals to render in the output number

bool get_format() const

Returns if the “format” option is set for this object.

The format option determines if fixed decimal or exponential notation is used. A value of false is fixed decimal notation, and true is exponential notation

Returns:

true if the format option is set

void set_format(bool shouldFormatAsExponential)

Sets the format option for this object.

The format option determines if fixed decimal or exponential notation is used. A value of false is fixed decimal notation, and true is exponential notation

Parameters:

shouldFormatAsExponential[in] true to use fixed decimal notation (####.nn), false to use exponential ([−]###.nnE[+/−]##)

std::uint32_t get_value() const

Returns the value of the output number (only matters if there’s no child number variable object).

Returns:

The value of the output number.

void set_value(std::uint32_t inputValue)

Sets the value of the output number (only matters if there’s no child number variable object).

Parameters:

inputValue[in] The value to set for the output number

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 list getting messed up from changing the attribute or a list item.

Parameters:

referencedObjectID[in] The object ID of a number variable to set as the value reference

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)

Returns:

The variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)

std::uint16_t get_font_attributes() const

Returns the object ID of a font attributes object that defines the font attributes of the Output Number object.

Returns:

The object ID of a font attributes object that defines the font attributes of the Output Number 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 Number object. Does no error checking on the type of the supplied object.

Parameters:

fontAttributesValue[in] The object ID of a font attributes object that defines the font attributes of the Output Number object

Private Members

float scale = 1.0f

Scale to be applied to the input value and min/max values.

std::int32_t offset = 0

Offset to be applied to the input value and min/max values.

std::uint32_t value = 0

Raw unsigned value of the output field before scaling (unsigned 32-bit integer). Used only if variable reference attribute is NULL.

std::uint16_t variableReference = NULL_OBJECT_ID

Stores the object ID of a number variable that will be used as the value, or the NULL_OBJECT_ID if not used.

std::uint16_t fontAttributes = NULL_OBJECT_ID

Stores the object ID of a font attributes object that will be used to display this object.

std::uint8_t numberOfDecimals = 0

Specifies number of decimals to display after the decimal point.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t justificationBitfield = 0

Bitfield of justification options.

bool format = false

0 = use fixed format decimal display (####.nn), 1 = use exponential format ([-]###.nnE[+/-]##) where n is set by the number of decimals

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 29

The fewest bytes of IOP data that can represent this object.

class OutputList : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Used to show one object out of a set of objects.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator VariableReference
enumerator Value
enumerator NumberOfAttributes

Public Functions

OutputList() = default

Constructor for an output list object.

~OutputList() override = default

Virtual destructor for an output list object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_number_of_list_items() const

Returns the number of items in the list.

Note

This is not the number of children, it’s the number of allocated list items. The number of children can be less than this number.

Returns:

The number of items in the list

void set_number_of_list_items(std::uint8_t value)

Sets the number of items in the list.

Note

This is not the number of children, it’s the number of allocated list items. The number of children can be less than this number.

Parameters:

value[in] The number of items in the list

std::uint8_t get_value() const

Returns the value of the selected list index (only matters if no child number variable object is present)

Returns:

The value of the selected list index

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)

Parameters:

value[in] The value to set for the list’s selected index

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 list getting messed up from changing the attribute or a list item.

Parameters:

referencedObjectID[in] The object ID of a number variable to set as the value reference

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)

Returns:

The variable reference, which is an object ID of a number variable or NULL_OBJECT_ID (0xFFFF)

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.

Parameters:
  • index[in] The index to change (starting from 0)

  • newListItem[in] The object ID to use as the new list item at the specified index

  • objectPool[in] The object pool to use to look up the object ID

Returns:

True if the operation was successful, otherwise false (perhaps the index is out of bounds?)

Private Members

std::uint16_t variableReference = NULL_OBJECT_ID

The object ID of a number variable to use for the value/selected index, or NULL_OBJECT_ID.

std::uint8_t numberOfListItems = 0

Number of object references to follow. The size of the list can never exceed this number and this attribute cannot be changed.

std::uint8_t value = 0

Selected list index of this object. Used only if variable reference attribute is NULL.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 12

The fewest bytes of IOP data that can represent this object.

class OutputLine : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object outputs a line shape. The starting point for the line is found in the parent object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator LineAttributes
enumerator Width
enumerator Height
enumerator LineDirection
enumerator NumberOfAttributes
enum class LineDirection : std::uint8_t

Enumerates the different directions a line can be drawn.

Values:

enumerator TopLeftToBottomRight
enumerator BottomLeftToTopRight

Public Functions

OutputLine() = default

Constructor for an output line object.

~OutputLine() override = default

Virtual destructor for an output line object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

LineDirection get_line_direction() const

Returns the line’s direction.

When the line direction is zero, the ine is drawn from top left to bottom right of enclosing virtual rectangle. When the line direction is 1, the line is drawn from bottom left to top right of enclosing virtual rectangle.

Returns:

The line’s direction (see details).

void set_line_direction(LineDirection value)

Sets the line’s direction.

When the line direction is zero, the ine is drawn from top left to bottom right of enclosing virtual rectangle. When the line direction is 1, the line is drawn from bottom left to top right of enclosing virtual rectangle.

Parameters:

value[in] The line direction to set (see details).

std::uint16_t get_line_attributes() const

Returns the object ID of the line attributes used to display this line.

Returns:

The object ID of the line attributes used to display this line

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 checking on the type of the object specified.

Parameters:

lineAttributesObject[in] The object ID of the line attributes used to display this line

Private Members

std::uint16_t lineAttributes = NULL_OBJECT_ID

Object ID of line attributes used to display this line.

std::uint8_t lineDirection = 0

0 = Line is drawn from top left to bottom right of enclosing virtual rectangle, 1 = Line is drawn from bottom left to top right

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 11

The fewest bytes of IOP data that can represent this object.

class OutputRectangle : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object outputs a rectangle shape.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator LineAttributes
enumerator Width
enumerator Height
enumerator LineSuppression
enumerator FillAttributes
enumerator NumberOfAttributes
enum class LineSuppressionOption

The different line suppression options.

Values:

enumerator SuppressTopLine

Suppress the top line of the rectangle.

enumerator SuppressRightSideLine

Suppress the right side of the rectangle.

enumerator SuppressBottomLine

Suppress the bottom line of the rectangle.

enumerator SuppressLeftSideLine

Suppress the left line of the rectangle.

Public Functions

OutputRectangle() = default

Constructor for an output rectangle object.

~OutputRectangle() override = default

Virtual destructor for an output rectangle object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_line_suppression_bitfield() const

Returns the line suppression bitfield.

Note

See LineSuppressionOption for the bit definitions.

Returns:

The line suppression bitfield (see LineSuppressionOption).

void set_line_suppression_bitfield(std::uint8_t value)

Sets the line suppression bitfield value.

Note

See LineSuppressionOption for the bit definitions.

Parameters:

value[in] The line suppression bitfield to set.

std::uint16_t get_line_attributes() const

Returns the object ID of the line attributes used to display this rectangle’s lines.

Returns:

The object ID of the line attributes used to display this rectangle’s lines

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 any error checking on the type of the object specified.

Parameters:

lineAttributesObject[in] The object ID of the line attributes used to display this rectangle’s lines

std::uint16_t get_fill_attributes() const

Returns the object ID of the fill attributes used to display this rectangle’s fill.

Returns:

The object ID of the fill attributes used to display this rectangle’s fill

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 error checking on the type of the object specified.

Parameters:

fillAttributesObject[in] The object ID of the fill attributes used to display this rectangle’s fill

Private Members

std::uint16_t lineAttributes = NULL_OBJECT_ID

Object ID of line attributes used to display this rectangle.

std::uint16_t fillAttributes = NULL_OBJECT_ID

Object ID of fill attributes used to display this rectangle.

std::uint8_t lineSuppressionBitfield = 0

Bitfield of line suppression options.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 13

The fewest bytes of IOP data that can represent this object.

class OutputEllipse : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object outputs an ellipse or circle shape.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator LineAttributes
enumerator Width
enumerator Height
enumerator EllipseType
enumerator StartAngle
enumerator EndAngle
enumerator FillAttributes
enumerator NumberOfAttributes
enum class EllipseType

Types of ellipse.

Values:

enumerator Closed

Closed ellipse.

enumerator OpenDefinedByStartEndAngles

The ellipse is defined by start and end angles.

enumerator ClosedEllipseSegment
enumerator ClosedEllipseSection

Public Functions

OutputEllipse() = default

Constructor for an output ellipse object.

~OutputEllipse() override = default

Virtual destructor for an output ellipse object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

EllipseType get_ellipse_type() const

Returns the type of the ellipse.

Returns:

The type of the ellipse

void set_ellipse_type(EllipseType value)

Sets the ellipse type.

Parameters:

value[in] The ellipse type to set

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 the ellipse.

The range for this is 0 to 180.

Note

If type > 0 and start and end angles are the same, the ellipse is drawn closed.

Returns:

Start angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up)

void set_start_angle(std::uint8_t value)

Sets the start angle for the ellipse.

Note

If type > 0 and start and end angles are the same, the ellipse is drawn closed.

Parameters:

value[in] Start angle/2 (in degrees) from positive X axis counter clockwise(90° is straight up)

std::uint8_t get_end_angle() const

Returns the end angle/2 (in degrees) from positive X axis counter clockwise(90° is straight up).

The range for this is 0 to 180.

Note

If type > 0 and start and end angles are the same, the ellipse is drawn closed.

Returns:

End angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up)

void set_end_angle(std::uint8_t value)

Sets the end angle for the ellipse.

Note

If type > 0 and start and end angles are the same, the ellipse is drawn closed.

Parameters:

value[in] The end angle/2 (in degrees) from positive X axis counter clockwise(90° is straight up).

std::uint16_t get_line_attributes() const

Returns the object ID of the line attributes used to display this ellipse’s lines.

Returns:

The object ID of the line attributes used to display this ellipse’s lines

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 error checking on the type of the object specified.

Parameters:

lineAttributesObject[in] The object ID of the line attributes used to display this ellipse’s lines

std::uint16_t get_fill_attributes() const

Returns the object ID of the fill attributes used to display this ellipse’s fill.

Returns:

The object ID of the fill attributes used to display this ellipse’s fill

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 error checking on the type of the object specified.

Parameters:

fillAttributesObject[in] The object ID of the fill attributes used to display this ellipse’s fill

Private Members

std::uint16_t lineAttributes = NULL_OBJECT_ID

Object ID of line attributes used to display this ellipse.

std::uint16_t fillAttributes = NULL_OBJECT_ID

Object ID of fill attributes used to display this ellipse.

std::uint8_t ellipseType = 0

The type of ellipse.

std::uint8_t startAngle = 0

Start angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up).

std::uint8_t endAngle = 0

End angle/2 (in degrees) from positive X axis counter clockwise (90° is straight up)

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 15

The fewest bytes of IOP data that can represent this object.

class OutputPolygon : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object outputs a polygon.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator LineAttributes
enumerator FillAttributes
enumerator PolygonType
enumerator NumberOfAttributes
enum class PolygonType

Polygon type. The first three types are useful only if the polygon is to be filled.

Values:

enumerator Convex

On any given horizontal line, only two points on the polygon are encountered.

enumerator NonConvex

On any given horizontal line, more than two points on the polygon edges can be encountered but the polygon edges do not cross.

enumerator Complex

Similar to Non-convex but edges cross. Uses Complex Fill Algorithm.

enumerator Open

This type cannot be filled.

Public Functions

OutputPolygon() = default

Constructor for an output polygon object.

~OutputPolygon() override = default

Virtual destructor for an output polygon object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

void add_point(std::uint16_t x, std::uint16_t y)

Adds a point to the polygon, defined by x and y coordinates.

Parameters:
  • x[in] The X value of a point relative to the top left corner of the polygon

  • y[in] The Y value of a point relative to the top left corner of the polygon

std::uint8_t get_number_of_points() const

Returns the number of polygon points.

Returns:

The number of polygon points

PolygonPoint get_point(std::uint8_t index)

Returns a point from the polygon by index.

Parameters:

index[in] The index of the point to retrieve

Returns:

A point in the polygon by index, or zeros if the index is out of range.

PolygonType get_type() const

Returns the polygon type of this object.

Returns:

The polygon type of this object

void set_type(PolygonType value)

Sets the polygon type for this object.

Parameters:

value[in] The new polygon type for this object

std::uint16_t get_line_attributes() const

Returns the object ID of the line attributes used to display this polygon’s lines.

Returns:

The object ID of the line attributes used to display this polygon’s lines

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 error checking on the type of the object specified.

Parameters:

lineAttributesObject[in] The object ID of the line attributes used to display this polygon’s lines

std::uint16_t get_fill_attributes() const

Returns the object ID of the fill attributes used to display this polygon’s fill.

Returns:

The object ID of the fill attributes used to display this polygon’s fill

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 error checking on the type of the object specified.

Parameters:

fillAttributesObject[in] The object ID of the fill attributes used to display this polygon’s fill

Private Members

std::vector<PolygonPoint> pointList

List of points that make up the polygon. Must be at least 3 points!

std::uint16_t fillAttributes = NULL_OBJECT_ID

Object ID of fill attributes used to display this polygon.

std::uint16_t lineAttributes = NULL_OBJECT_ID

Object ID of line attributes used to display this polygon.

std::uint8_t polygonType = 0

The polygon type. Affects how the object gets drawn.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 14

The fewest bytes of IOP data that can represent this object.

struct PolygonPoint
#include <isobus_virtual_terminal_objects.hpp>

Stores a cartesian polygon point.

Public Members

std::uint16_t xValue

X value of a point relative to the top left corner of the polygon.

std::uint16_t yValue

Y value of a point relative to the top left corner of the polygon.

class OutputMeter : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object is a meter. Meter is drawn about a circle enclosed within a defined square.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator NeedleColour
enumerator BorderColour
enumerator ArcAndTickColour
enumerator Options
enumerator NumberOfTicks
enumerator StartAngle
enumerator EndAngle
enumerator MinValue
enumerator MaxValue
enumerator VariableReference
enumerator Value
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input number.

Values:

enumerator DrawArc

Draw Arc.

enumerator DrawBorder

Draw Border.

enumerator DrawTicks

Draw Ticks.

enumerator DeflectionDirection

0 = From min to max, counterclockwisee. 1 = from min to max, clockwise

Public Functions

OutputMeter() = default

Constructor for an output meter object.

~OutputMeter() override = default

Virtual destructor for an output meter object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_min_value() const

Returns the minimum value of the output meter.

Returns:

The minimum value of the output meter

void set_min_value(std::uint16_t value)

Sets the minimum value of the output meter.

Parameters:

value[in] The minimum value to set for the output meter

std::uint16_t get_max_value() const

Returns the max value for the output meter.

Returns:

The max value for the output meter

void set_max_value(std::uint16_t value)

Sets the max value for the output meter.

Parameters:

value[in] The max value to set for 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).

Returns:

The value of the output 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).

Parameters:

value[in] The value to set for the output meter

std::uint8_t get_needle_colour() const

Returns the value of the needle colour.

Returns:

The value of the needle colour as an index into the VT colour table

void set_needle_colour(std::uint8_t colourIndex)

Sets the value of the needle colour.

Parameters:

colourIndex[in] The colour to set for the needle as an index into the VT colour table

std::uint8_t get_border_colour() const

Returns the border colour of the meter.

Returns:

The border colour of the meter as an index into the VT colour table

void set_border_colour(std::uint8_t colourIndex)

Sets the border colour of the meter.

Parameters:

colourIndex[in] The border colour to set for the meter as an index into the VT colour table

std::uint8_t get_arc_and_tick_colour() const

Returns the arc and tick colour for the meter.

Returns:

The arc and tick colour for the meter as an index into the VT colour table

void set_arc_and_tick_colour(std::uint8_t colourIndex)

Sets the arc and tick colour for the meter.

Parameters:

colourIndex[in] The arc and tick colour to set for the meter as an index into the VT colour table

std::uint8_t get_number_of_ticks() const

Returns the number of ticks to render across the meter.

Returns:

The number of ticks to render across the meter

void set_number_of_ticks(std::uint8_t ticks)

Sets the number of ticks to render when drawing the meter.

Parameters:

ticks[in] The number of ticks to render

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t options)

Sets the options bitfield for this object to a new value.

Parameters:

options[in] The new value for the options bitfield

void set_option(Options option, bool optionValue)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • optionValue[in] The new value of the option bit

std::uint8_t get_start_angle() const

Returns the start angle for the meter.

Note

If the start and end angles are the same the meter’s arc is closed.

Returns:

Start angle/2 (in degrees) from positive X axis anticlockwise(90° is straight up).

void set_start_angle(std::uint8_t value)

Sets the start angle for the meter.

Note

If the start and end angles are the same the meter’s arc is closed.

Parameters:

value[in] Start angle/2 (in degrees) from positive X axis anticlockwise(90° is straight up).

std::uint8_t get_end_angle() const

Returns the end angle of the meter.

Note

If the start and end angles are the same the meter’s arc is closed.

Returns:

The end angle/2 (in degrees) from positive X axis anticlockwise(90° is straight up).

void set_end_angle(std::uint8_t value)

Sets the end angle for this meter in degrees from the +x axis counter clockwise.

Note

If the start and end angles are the same the meter’s arc is closed.

Parameters:

value[in] End angle/2 (in degrees) from positive X axis anticlockwise(90° is straight up).

std::uint16_t get_variable_reference() const

Returns the value reference object ID, which is a number variable object that should be used to determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID.

Returns:

The object ID of a number variable to use for the value, or NULL_OBJECT_ID if not used.

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 determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID. Does not do any checking on the type of the object ID.

Parameters:

variableReferenceValue[in] The object ID of a number variable to use for the target value

Private Members

std::uint16_t minValue = 0

Minimum value. Represents value when needle is at the start of arc.

std::uint16_t maxValue = 0

Maximum value. Represents when the needle is at the end of the arc.

std::uint16_t value = 0

Current value. Needle position set to this value, used if variable ref is NULL.

std::uint16_t variableReference = NULL_OBJECT_ID

Object ID of a number variable to use for the value, or NULL_OBJECT_ID if not used.

std::uint8_t needleColour = 0

Needle (indicator) colour.

std::uint8_t borderColour = 0

Border colour (if drawn)

std::uint8_t arcAndTickColour = 0

Meter arc and tick colour (if drawn)

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t numberOfTicks = 0

Number of ticks to draw about meter arc.

std::uint8_t startAngle = 0

Start angle / 2 in degrees from positive X axis counterclockwise.

std::uint8_t endAngle = 0

End angle / 2 in degrees from positve X axis counterclockwise.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 21

The fewest bytes of IOP data that can represent this object.

class OutputLinearBarGraph : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This is a linear bar graph or thermometer, defined by an enclosing rectangle.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator Colour
enumerator TargetLineColour
enumerator Options
enumerator NumberOfTicks
enumerator MinValue
enumerator MaxValue
enumerator VariableReference
enumerator TargetValueVariableReference
enumerator TargetValue
enumerator Value
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input number.

Values:

enumerator DrawBorder

Draw Border.

enumerator DrawTargetLine

Draw Target Line.

enumerator DrawTicks

Draw Ticks.

enumerator BarGraphType

0 = Filled, 1 = not filled with value line

enumerator AxisOrientation

0 = vertical, 1 = horizontal

enumerator Direction

0 = Grows negative, 1 = Grows positive

Public Functions

OutputLinearBarGraph() = default

Constructor for an output linear bar graph object.

~OutputLinearBarGraph() override = default

Virtual destructor for an output linear bar graph object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_min_value() const

Returns the minimum value on the graph. Used to scale the graph’s range.

Returns:

The minimum value that will be shown on the graph.

void set_min_value(std::uint16_t value)

Sets the minimum value on the graph.

Used to scale the graph’s range. Values below this will be clamped to the min.

Parameters:

value[in] The minimum value to set

std::uint16_t get_max_value() const

Returns the max value for the graph.

Returns:

The max value for the graph

void set_max_value(std::uint16_t value)

Sets the max value for the graph.

Parameters:

value[in] The max value to set for the graph

std::uint16_t get_value() const

Returns the value of the graph (only matters if there’s no child number variable object).

Returns:

The value of the graph

void set_value(std::uint16_t value)

Sets the value of the graph (only matters if there’s no child number variable object).

Parameters:

value[in] The value to set for the graph

std::uint16_t get_target_value() const

Returns the graph’s target value (only matters if there’s no target value reference).

Returns:

The graph’s target value

void set_target_value(std::uint16_t valueTarget)

Sets the target value for the graph (only matters if there’s no target value reference).

Parameters:

valueTarget[in] The target value to set

std::uint16_t get_target_value_reference() const

Returns the target value reference object ID.

This object will be used (if it’s not NULL_OBJECT_ID) to determine the target value of the graph instead of the target value itself.

Returns:

The object ID of a number variable to use for the target value

void set_target_value_reference(std::uint16_t valueReferenceObjectID)

Sets the target value reference object ID.

This object will be used (if it’s not NULL_OBJECT_ID) to determine the target value of the graph instead of the target value itself.

Parameters:

valueReferenceObjectID[in] The object ID of a number variable to use for the target value

std::uint8_t get_number_of_ticks() const

Returns the number of ticks to render across the graph.

Returns:

The number of ticks to render across the graph

void set_number_of_ticks(std::uint8_t value)

Sets the number of ticks to render when drawing the graph.

Parameters:

value[in] The number of ticks to graph

std::uint8_t get_colour() const

Returns the colour of the graph.

Returns:

The colour of the graph as an index into the VT colour table

void set_colour(std::uint8_t graphColour)

Sets the colour of the graph.

Parameters:

graphColour[in] The colour of the graph to set as an index into the VT colour table

std::uint8_t get_target_line_colour() const

Returns the target line colour as an index into the VT colour table.

Returns:

The target line colour as an index into the VT colour table

void set_target_line_colour(std::uint8_t lineColour)

Sets the target line colour.

Parameters:

lineColour[in] The colour to set for the target line as an index into the VT colour table

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t options)

Sets the options bitfield for this object to a new value.

Parameters:

options[in] The new value for the options bitfield

void set_option(Options option, bool optionValue)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • optionValue[in] The new value of the option bit

std::uint16_t get_variable_reference() const

Returns the value reference object ID, which is a number variable object that should be used to determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID.

Returns:

The object ID of a number variable to use for the value, or NULL_OBJECT_ID if not used.

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 determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID. Does not do any checking on the type of the object ID.

Parameters:

variableReferenceValue[in] The object ID of a number variable to use for the target value

Private Members

std::uint16_t minValue = 0

Minimum value.

std::uint16_t maxValue = 0

Maximum value.

std::uint16_t targetValue = 0

Current target value. Used only if Target value variable Reference attribute is NULL.

std::uint16_t targetValueReference = NULL_OBJECT_ID

Object ID of a Number Variable object in which to retrieve the bar graph’s target value.

std::uint16_t value = 0

Current value. Needle position set to this value, used if variable ref is NULL.

std::uint16_t variableReference = NULL_OBJECT_ID

Object ID of a Number Variable object in which to retrieve the bar graph’s value.

std::uint8_t numberOfTicks = 0

Number of ticks to draw along the bar graph.

std::uint8_t colour = 0

Bar graph fill and border colour.

std::uint8_t targetLineColour = 0

Target line colour (if drawn).

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 24

The fewest bytes of IOP data that can represent this object.

class OutputArchedBarGraph : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

TThis object is similar in concept to a linear bar graph but appears arched. Arched bar graphs are drawn about an Output Ellipse object enclosed within a defined rectangle.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Height
enumerator Colour
enumerator TargetLineColour
enumerator Options
enumerator StartAngle
enumerator EndAngle
enumerator BarGraphWidth
enumerator MinValue
enumerator MaxValue
enumerator VariableReference
enumerator TargetValueVariableReference
enumerator TargetValue
enumerator NumberOfAttributes
enum class Options : std::uint8_t

Options that can be applied to the input number.

Values:

enumerator DrawBorder

Draw border.

enumerator DrawTargetLine

Draw a target line.

enumerator Undefined

Undefined, set to 0 recommended.

enumerator BarGraphType

bar graph type. If this bit is FALSE (0), bar graph is filled

enumerator Deflection

0 = anticlockwise and 1 = clockwise

Public Functions

OutputArchedBarGraph() = default

Constructor for an output arched bar graph object.

~OutputArchedBarGraph() override = default

Virtual destructor for an output arched bar graph object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_bar_graph_width() const

Returns the width (px) of the bar graph.

Returns:

The width (px) of the bar graph

void set_bar_graph_width(std::uint16_t width)

Sets the width (px) of the bar graph.

Parameters:

width[in] The width (px) to set for the bar graph

std::uint16_t get_min_value() const

Returns the minimum value of the bar graph.

Note

Values below this will be clamped to the min when rendered.

Returns:

The minimum value of the bar graph

void set_min_value(std::uint16_t minimumValue)

Sets the minimum value for the bar graph.

Note

Values below this will be clamped to the min when rendered.

Parameters:

minimumValue[in] The minimum value to set

std::uint16_t get_max_value() const

Returns the maximum value of the bar graph.

Note

Values above this will be clamped to the max when rendered.

Returns:

The maximum value of the bar graph

void set_max_value(std::uint16_t maximumValue)

Sets the max value of the bar graph.

Note

Values above this will be clamped to the max when rendered.

Parameters:

maximumValue[in] The maximum value of the bar graph to set

std::uint16_t get_value() const

Returns the value of the bar graph (only matters when no child number variable is used)

Returns:

The value of the bar graph

void set_value(std::uint16_t value)

Sets the value of the bar graph (only matters when no child number variable is used)

Parameters:

value[in] The value to set for the bar graph

std::uint8_t get_target_line_colour() const

Returns the colour of the target line.

Returns:

The colour of the target line as an index into the VT colour table

void set_target_line_colour(std::uint8_t value)

Sets the colour of the target line.

Parameters:

value[in] The colour to set as an index into the VT colour table

std::uint8_t get_colour() const

Returns the colour of the bar graph.

Returns:

The colour of the bar graph as an index into the VT colour table

void set_colour(std::uint8_t value)

Sets the colour of the bar graph.

Parameters:

value[in] The colour to set for the bar graph as an index into the VT colour table

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t options)

Sets the options bitfield for this object to a new value.

Parameters:

options[in] The new value for the options bitfield

void set_option(Options option, bool optionValue)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • optionValue[in] The new value of the option bit

std::uint8_t get_start_angle() const

Returns the start angle of the graph.

Returns:

Start angle/2 (in degrees) from positive X axis anticlockwise (90° is straight up) for the graph

void set_start_angle(std::uint8_t value)

Sets the start angle for the graph.

Parameters:

value[in] Start angle/2 (in degrees) from positive X axis anticlockwise (90° is straight up) for the graph

std::uint8_t get_end_angle() const

Returns the end angle of the graph.

Returns:

End angle/2 (in degrees) from positive X axis anticlockwise (90° is straight up) for the graph

void set_end_angle(std::uint8_t value)

Sets the end angle for the graph.

Parameters:

value[in] End angle/2 (in degrees) from positive X axis anticlockwise (90° is straight up) for the graph

std::uint16_t get_target_value() const

Returns the target value of the graph (only matters when no target value reference is used)

Returns:

The target value of the 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)

Parameters:

value[in] The target value of the graph

std::uint16_t get_target_value_reference() const

Returns the target value reference object ID.

This object will be used (if it’s not NULL_OBJECT_ID) to determine the target value of the graph instead of the target value itself.

Returns:

The object ID of a number variable to use for the target value

void set_target_value_reference(std::uint16_t value)

Sets the target value reference object ID.

This object will be used (if it’s not NULL_OBJECT_ID) to determine the target value of the graph instead of the target value itself.

Parameters:

value[in] The object ID of a number variable to use for the target 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 determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID.

Returns:

The object ID of a number variable to use for the value, or NULL_OBJECT_ID if not used.

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 determine the value of the graph instead of the value itself if it’s not NULL_OBJECT_ID. Does not do any checking on the type of the object ID.

Parameters:

variableReferenceValue[in] The object ID of a number variable to use for the target value

Private Members

std::uint16_t barGraphWidth = 0

Bar graph width in pixels. Bar graph width should be less than half the total width, or less than half the total height, whichever is least.

std::uint16_t minValue = 0

Minimum value. Represents value when needle is at the start of arc.

std::uint16_t maxValue = 0

Maximum value. Represents when the needle is at the end of the arc.

std::uint16_t value = 0

Current value. Needle position set to this value, used if variable ref is NULL.

std::uint16_t targetValue = 0

Current target value. Used only if Target value variable Reference attribute is NULL.

std::uint16_t targetValueReference = NULL_OBJECT_ID

Object ID of a Number Variable object in which to retrieve the bar graph’s target value.

std::uint16_t variableReference = NULL_OBJECT_ID

Object ID of a Number Variable object in which to retrieve the bar graph’s value.

std::uint8_t targetLineColour = 0

Target line colour (if drawn)

std::uint8_t colour = 0

Bar graph fill and border colour.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t startAngle = 0

Start angle / 2 in degrees from positive X axis counterclockwise.

std::uint8_t endAngle = 0

End angle / 2 in degrees from positive X axis counterclockwise.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 27

The fewest bytes of IOP data that can represent this object.

class PictureGraphic : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object displays a picture graphic (bitmap)

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Width
enumerator Options
enumerator TransparencyColour
enumerator ActualWidth
enumerator ActualHeight
enumerator Format
enumerator NumberOfAttributes
enum class Format

Enumerates the different colour formats a picture graphic can have (mutually exclusive)

Values:

enumerator Monochrome

Monochrome; 8 pixels per byte. Each bit represents a colour palette index of 0 or 1.

enumerator FourBitColour

2 colour pixels per byte. Each nibble(4 bits) represents a colour palette index of 0 through 15.

enumerator EightBitColour

colour pixel per byte. Each byte represents a colour palette index of 0 through 255

enum class Options

Enumerates the different options bits in the options bitfield.

Values:

enumerator Transparent

0 = Opaque, 1 = Transparent

enumerator Flashing

0 = Normal, 1 = Flashing

enumerator RunLengthEncoded

Data is RLE See Clause B.12.2 Picture Graphic object raw data format and compression.

Public Functions

PictureGraphic() = default

Constructor for a picture graphic (bitmap) object.

~PictureGraphic() override = default

Virtual destructor for a picture graphic (bitmap) object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::vector<std::uint8_t> &get_raw_data()

Returns a reference to the underlying bitmap data.

Returns:

A reference to the underlying bitmap data

void set_raw_data(const std::uint8_t *data, std::uint32_t size)

Sets a large chunk of data to the underlying bitmap.

Parameters:
  • data[in] Pointer to a buffer of data

  • size[in] The length of the data buffer to add to the underlying bitmap

void add_raw_data(std::uint8_t dataByte)

Sets one byte of raw data to the underlying bitmap.

Parameters:

dataByte[in] One byte of bitmap data

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.

Returns:

The number of bytes in the raw data that comprises the underlying bitmap

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.

Parameters:

value[in] The number of bytes in the raw data that comprises the underlying bitmap

std::uint16_t get_actual_width() const

Returns the actual width of the underlying bitmap.

Returns:

The actual width of the underlying bitmap (px)

void set_actual_width(std::uint16_t value)

Sets the actual width of the underlying bitmap.

Parameters:

value[in] Actual width to set for the underlying bitmap (px)

std::uint16_t get_actual_height() const

Returns the actual height of the underlying bitmap.

Returns:

The actual height of the underlying bitmap (px)

void set_actual_height(std::uint16_t value)

Sets the actual height of the underlying bitmap.

Parameters:

value[in] Actual height to set for the underlying bitmap (px)

Format get_format() const

Returns the picture’s colour format.

Returns:

The picture colour format

void set_format(Format value)

Sets the picture’s colour format.

Parameters:

value[in] The colour format to use for this picture graphic

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

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.

Returns:

Transparency colour to use when rendering the object as an index into the VT colour table

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.

Parameters:

value[in] The colour to use when rendering the object as an index into the VT colour table

Private Members

std::vector<std::uint8_t> rawData

The raw picture data. Not a standard bitmap, but rather indicies into the VT colour table.

std::uint32_t numberOfBytesInRawData = 0

Number of bytes of raw data.

std::uint16_t actualWidth = 0

The actual width of the bitmap.

std::uint16_t actualHeight = 0

The actual height of the bitmap.

std::uint8_t formatByte = 0

The format option byte.

std::uint8_t optionsBitfield = 0

Options bitfield, see the options enum.

std::uint8_t transparencyColour = 0

The colour to render as transparent if so set in the options.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 17

The fewest bytes of IOP data that can represent this object.

class NumberVariable : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

A number variable holds a 32-bit unsigned integer value.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Value
enumerator NumberOfAttributes

Public Functions

NumberVariable() = default

Constructor for a number variable object.

~NumberVariable() override = default

Virtual destructor for a number variable object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint32_t get_value() const

Returns the number variable’s value.

Returns:

The number variable’s value

void set_value(std::uint32_t value)

Sets the number variable’s value.

Parameters:

value[in] The value to set for the number variable

Private Members

std::uint32_t value = 0

32-bit unsigned integer value

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7

The fewest bytes of IOP data that can represent this object.

class StringVariable : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

A String Variable holds a fixed length string.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator NumberOfAttributes

Public Functions

StringVariable() = default

Constructor for a string variable object.

~StringVariable() override = default

Virtual destructor for a string variable object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::string get_value() const

Returns the actual string value stored in this object.

Returns:

The string value stored in this object

void set_value(const std::string &value)

Sets the actual string value stored in this object.

Parameters:

value[in] The new string value for this object

Private Members

std::string value

The actual value of the string, for non utf-16 strings.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

class FontAttributes : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object holds attributes related to fonts.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator FontColour
enumerator FontSize
enumerator FontType
enumerator FontStyle
enumerator NumberOfAttributes
enum class FontSize : std::uint8_t

Enumerates the different font sizes.

Values:

enumerator Size6x8

6x8 Font size

enumerator Size8x8

8x8 Font size

enumerator Size8x12

8x12 Font size

enumerator Size12x16

12x16 Font size

enumerator Size16x16

16x16 Font size

enumerator Size16x24

16x24 Font size

enumerator Size24x32

24x32 Font size

enumerator Size32x32

32x32 Font size

enumerator Size32x48

32x48 Font size

enumerator Size48x64

48x64 Font size

enumerator Size64x64

64x64 Font size

enumerator Size64x96

64x96 Font size

enumerator Size96x128

96x128 Font size

enumerator Size128x128

128x128 Font size

enumerator Size128x192

128x192 Font size

enum class FontStyleBits : std::uint8_t

Enumerates the font style options that can be encoded in a font style bitfield.

Values:

enumerator Bold

Bold font style.

enumerator CrossedOut

Crossed-out font style (strikethrough)

enumerator Underlined

Underlined font style.

enumerator Italic

Italic font style.

enumerator Inverted

Inverted font style (upside down)

enumerator Flashing

Flashing font style.

enumerator FlashingHidden

Flashing between hidden and shown font style.

enumerator ProportionalFontRendering

Enables proportional font rendering if supported by the server.

enum class FontType : std::uint8_t

Enumerates the different font types.

Values:

enumerator ISO8859_1

ISO Latin 1.

enumerator ISO8859_15

ISO Latin 9.

enumerator ISO8859_2

ISO Latin 2.

enumerator Reserved_1

Reserved.

enumerator ISO8859_4

ISO Latin 4.

enumerator ISO8859_5

Cyrillic.

enumerator Reserved_2

Reserved.

enumerator ISO8859_7

Greek.

enumerator ReservedEnd

Reserved from ISO8859_7 to this value.

enumerator ProprietaryBegin

The beginning of the proprietary range.

enumerator ProprietaryEnd

The end of the proprietary region.

Public Functions

FontAttributes() = default

Constructor for a font attributes object.

~FontAttributes() override = default

Virtual destructor for a font attributes object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

FontType get_type() const

Returns the font type associated to this font attributes object.

Returns:

The font type associated to this font attributes object

void set_type(FontType value)

Sets the font type.

Parameters:

value[in] The font type to set

std::uint8_t get_style() const

Returns the font style bitfield.

Returns:

The style bitfield, which is comprised of FontStyleBits

bool get_style(FontStyleBits styleSetting) const

Returns a specific font style bit’s state.

Parameters:

styleSetting[in] The font style bit to check

Returns:

The state of the selected style bit

void set_style(FontStyleBits bit, bool value)

Sets a specific font style bit to a new value.

Parameters:
  • bit[in] The style bit to change

  • value[in] The state to set for the selected style bit

void set_style(std::uint8_t value)

Sets the font style bitfield to a new value.

Parameters:

value[in] The value to set to the font style bitfield

FontSize get_size() const

Returns the font size.

Returns:

The font size

void set_size(FontSize value)

Sets the font size to a new value.

Parameters:

value[in] The new font size

std::uint8_t get_colour() const

Returns the font colour as an index into the VT colour table.

Returns:

The font colour as an index into the VT colour table

void set_colour(std::uint8_t value)

Sets the colour of the font to a new VT colour.

Parameters:

value[in] An index into the VT colour table associated to the desired colour

std::uint8_t get_font_width_pixels() const

Returns the width of the associated font size in pixels.

Returns:

The width of the associated font size in pixels

std::uint8_t get_font_height_pixels() const

Returns the height of the associated font size in pixels.

Returns:

The height of the associated font size in pixels

Private Members

std::uint8_t colour = 0

Text colour.

std::uint8_t size = 0

Font size.

std::uint8_t type = 0

Encoding type.

std::uint8_t style = 0

Font style.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8

The fewest bytes of IOP data that can represent this object.

class LineAttributes : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines a line attributes object, which describes how lines should be displayed on the VT.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator LineColour
enumerator LineWidth
enumerator LineArt
enumerator NumberOfAttributes

Public Functions

LineAttributes() = default

Constructor for a line attributes object.

~LineAttributes() override = default

Virtual destructor for a line attributes object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_line_art_bit_pattern() const

Sets the line art bit pattern. Each bit represents 1 pixel’s on/off state.

Returns:

The line attribute’s line art bit pattern

void set_line_art_bit_pattern(std::uint16_t value)

Sets the line art bit patter for the line attribute.

Parameters:

value[in] The line art bit pattern to set

Private Members

std::uint16_t lineArtBitpattern = 0

Bit pattern art for line. Each bit represents a paintbrush spot.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8

The fewest bytes of IOP data that can represent this object.

class FillAttributes : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object holds attributes related to filling output shape objects.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator FillType
enumerator FillColour
enumerator FillPattern
enumerator NumberOfAttributes
enum class FillType : std::uint8_t

Enumerates the different fill types for an object.

Values:

enumerator NoFill

No fill will be applied.

enumerator FillWithLineColor

Fill with the color of the outline of the shape.

enumerator FillWithSpecifiedColorInFillColorAttribute

Fill with the color specified by a fill attribute.

enumerator FillWithPatternGivenByFillPatternAttribute

Fill with a patter provided by a fill pattern attribute.

Public Functions

FillAttributes() = default

Constructor for a fill attributes object.

~FillAttributes() override = default

Virtual destructor for a fill attributes object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_fill_pattern() const

Returns the fill pattern associated with this fill attributes object.

Returns:

The fill pattern for this attribute object

void set_fill_pattern(std::uint16_t value)

Sets the fill pattern for this fill attributes object.

Parameters:

value[in] The fill pattern to set for this object

FillType get_type() const

Returns the fill type/mode associated with this object.

Returns:

The fill type/mode associated with this object

void set_type(FillType value)

Sets the fill type/mode associated with this object.

Parameters:

value[in] The fill type/mode associated with this object

Private Members

std::uint16_t fillPattern = NULL_OBJECT_ID

Object id of a Picture Graphic object to use as a Fill pattern.

FillType type = FillType::NoFill

The fill type/mode associated with this object.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 8

The fewest bytes of IOP data that can represent this object.

class InputAttributes : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

This object defines the valid or invalid characters for an Input String object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator ValidationType
enumerator NumberOfAttributes
enum class ValidationType : std::uint8_t

Enumerates the different validation types for this object, which describe how to interpret the validation string.

Values:

enumerator ValidCharactersAreListed
enumerator InvalidCharactersAreListed

Public Functions

InputAttributes() = default

Constructor for a input attributes object.

~InputAttributes() override = default

Virtual destructor for a input attributes object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::string get_validation_string() const

Returns the validation string associated to this input attributes object.

Returns:

The validation string associated to this input attributes object

void set_validation_string(const std::string &value)

Sets the validation string for this object.

Parameters:

value[in] The new validation string for this object

ValidationType get_validation_type() const

Returns the validation type setting for this object.

Returns:

The validation type associated to this object

void set_validation_type(ValidationType newValidationType)

Sets the validation type setting for this object.

Parameters:

newValidationType[in] The validation type

Private Members

std::string validationString

String containing all valid or invalid character codes.

ValidationType validationType = ValidationType::ValidCharactersAreListed

Describes how to interpret the validation string.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 7

The fewest bytes of IOP data that can represent this object.

class ExtendedInputAttributes : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The Extended Input Attributes object, available in VT version 4 and later, defines the valid or invalid characters for an Input String object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator ValidationType
enumerator NumberOfAttributes
enum class ValidationType : std::uint8_t

Enumerates the different validation types for this object, which describe how to interpret the validation string.

Values:

enumerator ValidCharactersAreListed
enumerator InvalidCharactersAreListed

Public Functions

ExtendedInputAttributes() = default

Constructor for an extended input attributes object.

~ExtendedInputAttributes() override = default

Virtual destructor for an extended input attributes object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint8_t get_number_of_code_planes() const

Returns the number of code planes in this extended input attributes.

Returns:

The number of code planes in this extended input attributes

void set_number_of_code_planes(std::uint8_t value)

Sets the number of code planes in this extended input attributes object.

Parameters:

value[in] The new number of code planes

ValidationType get_validation_type() const

Returns the validation type setting for this object.

Returns:

The validation type associated to this object

void set_validation_type(ValidationType value)

Sets the validation type setting for this object.

Parameters:

value[in] The validation type

Private Members

std::vector<CodePlane> codePlanes

Code planes to which the character ranges belong.

ValidationType validationType = ValidationType::ValidCharactersAreListed

Describes how to interpret the validation string.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

class CodePlane

Stores data for a code plane (for utf-16 strings)

Todo:

Finish ExtendedInputAttributes implementation

Public Members

std::vector<std::vector<wchar_t>> characterRanges

A list of character ranges for this code plane.

std::uint8_t numberOfCharacterRanges

The number of expected character ranges for this code plane.

class ObjectPointer : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Points to another object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator Value
enumerator NumberOfAttributes

Public Functions

ObjectPointer() = default

Constructor for a object pointer object.

~ObjectPointer() override = default

Virtual destructor for a object pointer object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

std::uint16_t get_value() const

Returns the object id of the object this object points to.

Returns:

The object id of the object this object points to

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 object this object points to.

Parameters:

objectIDToPointTo[in] The object id of the object this object points to

Private Members

std::uint16_t value = NULL_OBJECT_ID

Object ID of the object this object points to, or the NULL Object ID if the pointer should not be drawn.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

class ExternalObjectPointer : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

The External Object Pointer object, available in VT version 5 and later, allows a Working Set to display objects that exist in another Working Set’s object pool.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator DefaultObjectID
enumerator ExternalReferenceNAMEID
enumerator ExternalObjectID
enumerator NumberOfAttributes

Public Functions

ExternalObjectPointer() = default

Constructor for a object pointer object.

~ExternalObjectPointer() override = default

Virtual destructor for a object pointer object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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 External Object ID is not valid, or the NULL Object ID.

Returns:

The default object ID or the null object ID

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 External Object ID is not valid, or the NULL Object ID.

Parameters:

id[in] The default object ID or the null object ID

std::uint16_t get_external_reference_name_id() const

Returns the external reference NAME ID.

Returns:

External reference NAME ID

void set_external_reference_name_id(std::uint16_t id)

Sets the external reference NAME ID.

Parameters:

id[in] External reference NAME ID

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 Master identified by the External Reference NAME ID attribute and listed in the corresponding External Object Definition object.

Returns:

The external object 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 Master identified by the External Reference NAME ID attribute and listed in the corresponding External Object Definition object.

Parameters:

id[in] The external object ID.

Private Members

std::uint16_t defaultObjectID = NULL_OBJECT_ID

Object ID of an object which shall be displayed if the External Object ID is not valid, or the NULL Object ID.

std::uint16_t externalReferenceNAMEID = NULL_OBJECT_ID

Object id of an External Reference NAME object or the NULL Object ID.

std::uint16_t externalObjectID = NULL_OBJECT_ID

Object ID of a referenced object or the NULL Object ID.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

class Macro : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines a macro object. Performs a list of commands based on a message or event.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator NumberOfAttributes
enum class Command

A subset of the VT command multiplexors that support use in macros.

Values:

enumerator HideShowObject
enumerator EnableDisableObject
enumerator SelectInputObject
enumerator ControlAudioSignal
enumerator SetAudioVolume
enumerator ChangeChildLocation
enumerator ChangeSize
enumerator ChangeBackgroundColour
enumerator ChangeNumericValue
enumerator ChangeEndPoint
enumerator ChangeFontAttributes
enumerator ChangeLineAttributes
enumerator ChangeFillAttributes
enumerator ChangeActiveMask
enumerator ChangeSoftKeyMask
enumerator ChangeAttribute
enumerator ChangePriority
enumerator ChangeListItem
enumerator ChangeStringValue
enumerator ChangeChildPosition
enumerator ChangeObjectLabel
enumerator ChangePolygonPoint
enumerator LockUnlockMask
enumerator ExecuteMacro
enumerator ChangePolygonScale
enumerator GraphicsContextCommand
enumerator SelectColourMap
enumerator ExecuteExtendedMacro

Public Functions

Macro() = default

Constructor for a macro object.

~Macro() override = default

Virtual destructor for a macro object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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 ECU to VT commands that will be executed in order by this macro.

Parameters:

command[in] The command packet (CAN message data) to add

Returns:

true if the command was added to the macro, otherwise false (maybe the max number of commands has been hit)

std::uint8_t get_number_of_commands() const

Returns the number of stored command packets inside this macro (max 255)

Returns:

The number of stored command packets inside this macro

bool get_command_packet(std::uint8_t index, std::vector<std::uint8_t> &command)

Returns a command packet by index.

Parameters:
  • index[in] The index of the packet to retrieve

  • command[out] The returned command packet if the return value is true, otherwise the returned command packet content is undefined.

Returns:

true if a valid command packet was returned, otherwise false (index out of range)

bool remove_command_packet(std::uint8_t index)

Deletes a command packet from the macro by index.

Parameters:

index[in] The index of the packet to delete

Returns:

true if the specified command packet was removed, otherwise false (index out of range)

bool get_are_command_packets_valid() const

Returns if the command packets in this macro are valid.

Returns:

true if the command packets in this macro are valid, otherwise false

Private Members

std::vector<std::vector<std::uint8_t>> commandPackets

Macro command list.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

static const std::array<std::uint8_t, 28> ALLOWED_COMMANDS_LOOKUP_TABLE = {static_cast<std::uint8_t>(Command::HideShowObject), static_cast<std::uint8_t>(Command::EnableDisableObject), static_cast<std::uint8_t>(Command::SelectInputObject), static_cast<std::uint8_t>(Command::ControlAudioSignal), static_cast<std::uint8_t>(Command::SetAudioVolume), static_cast<std::uint8_t>(Command::ChangeChildLocation), static_cast<std::uint8_t>(Command::ChangeSize), static_cast<std::uint8_t>(Command::ChangeBackgroundColour), static_cast<std::uint8_t>(Command::ChangeNumericValue), static_cast<std::uint8_t>(Command::ChangeEndPoint), static_cast<std::uint8_t>(Command::ChangeFontAttributes), static_cast<std::uint8_t>(Command::ChangeLineAttributes), static_cast<std::uint8_t>(Command::ChangeFillAttributes), static_cast<std::uint8_t>(Command::ChangeActiveMask), static_cast<std::uint8_t>(Command::ChangeSoftKeyMask), static_cast<std::uint8_t>(Command::ChangeAttribute), static_cast<std::uint8_t>(Command::ChangePriority), static_cast<std::uint8_t>(Command::ChangeListItem), static_cast<std::uint8_t>(Command::ChangeStringValue), static_cast<std::uint8_t>(Command::ChangeChildPosition), static_cast<std::uint8_t>(Command::ChangeObjectLabel), static_cast<std::uint8_t>(Command::ChangePolygonPoint), static_cast<std::uint8_t>(Command::LockUnlockMask), static_cast<std::uint8_t>(Command::ExecuteMacro), static_cast<std::uint8_t>(Command::ChangePolygonScale), static_cast<std::uint8_t>(Command::GraphicsContextCommand), static_cast<std::uint8_t>(Command::SelectColourMap), static_cast<std::uint8_t>(Command::ExecuteExtendedMacro)}

The list of all allowed commands in a table for easy lookup when validating macro content.

class ColourMap : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines a colour map object. The Colour Map object, optionally available in VT version 4 and 5, and mandatory in VT version 6 and later, allows the Working Set designer to alter the transformation of the VT colour index values to the defined RGB value. This provides a mechanism where the colours table can be changed at run-time.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator NumberOfAttributes

Public Functions

ColourMap() = default

Constructor for a colour map object.

~ColourMap() override = default

Virtual destructor for a colour map object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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. Values will be initialized from the default color table to the colour map data whenever this is called.

Parameters:

value[in] The number of colour indexes to initialize the colour map to

Returns:

true if the number of colour indexes was set, otherwise false (invalid value or value is unchanged)

std::uint16_t get_number_of_colour_indexes() const

Returns the number of colour indexes in this colour map.

Returns:

The number of colour indexes in this colour map (2, 16, or 256)

bool set_colour_map_index(std::uint8_t index, std::uint8_t value)

Sets the colour map index to the specified value/colour.

Parameters:
  • index[in] The index to set

  • value[in] The colour to set the index to

Returns:

true if the colour map index was set, otherwise false (index out of range)

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.

Parameters:

index[in] The index in this map to get the VT colour index for

Returns:

The VT colour index at the specified index in this colour map

Private Members

std::vector<std::uint8_t> colourMapData

The actual colour map data, which remaps each index from the default table based on the size of this vector.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 5

The fewest bytes of IOP data that can represent this object.

class WindowMask : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines a window mask object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator Options
enumerator Name
enumerator NumberOfAttributes
enum class WindowType : std::uint8_t

Enumerates the different kinds of window masks which imply how they are displayed and what they contain.

Values:

enumerator Freeform

the Working Set supplies and positions all child objects contained inside the window. In this case the Working Set has complete control over the look and feel of the window.

enumerator NumericOutputValueWithUnits1x1

This window displays a single numeric output with units of measure in a single window cell.

enumerator NumericOutputValueNoUnits1x1

This window displays a single numeric output with no units of measure in a single window cell.

enumerator StringOutputValue1x1

This window displays a single string output in a single window cell.

enumerator NumericInputValueWithUnits1x1

This window displays a single numeric input with units of measure in a single window cell.

enumerator NumericInputValueNoUnits1x1

This window displays a single numeric input with no units of measure in a single window cell.

enumerator StringInputValue1x1

This window displays a single string input in a single window cell.

enumerator HorizontalLinearBarGraphNoUnits1x1

This window displays a single horizontal linear bar graph in a single window cell.

enumerator SingleButton1x1

This window displays a single Button object in a single window cell.

enumerator DoubleButton1x1

This window displays two Button objects in a single window cell.

enumerator NumericOutputValueWithUnits2x1

This window displays a single numeric output with units of measure in two horizontal window cells.

enumerator NumericOutputValueNoUnits2x1

This window displays a single numeric output with no units of measure in two horizontal window cells.

enumerator StringOutputValue2x1

This window displays a single string output in two horizontal window cells.

enumerator NumericInputValueWithUnits2x1

This window displays a single numeric input with units of measure in two horizontal window cells.

enumerator NumericInputValueNoUnits2x1

This window displays a single numeric input with no units of measure in two horizontal window cells.

enumerator StringInputValue2x1

This window displays a single string input in two horizontal window cells.

enumerator HorizontalLinearBarGraphNoUnits2x1

This window displays a single horizontal linear bar graph in two horizontal window cells.

enumerator SingleButton2x1

This window displays a single Button object in two horizontal window cells.

enumerator DoubleButton2x1

This window displays two Button objects in two horizontal window cells.

enum class Options

Enumerates the bit indexes of options encoded in the object’s options bitfield.

Values:

enumerator Available

If 0 (FALSE) this window is not available for use at the present time, even though defined.

enumerator Transparent

Transparent. If this bit is 1, the background colour attribute shall not be used and the Window shall be transparent.

Public Functions

WindowMask() = default

Constructor for a window mask object.

~WindowMask() override = default

Virtual destructor for a window mask object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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 String object that contains the string that gives a proper name to this object.

Returns:

Object ID corresponding to this object’s proper name

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 String object that contains the string that gives a proper name to this object.

Parameters:

object[in] The object ID that contains the string for this object’s proper name

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 String object that contains the string that supplies window title text.

Returns:

Object ID corresponding to this object’s window title text

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 String object that contains the string that supplies window title text.

Parameters:

object[in] The object ID that contains the string for this object’s title text

std::uint16_t get_icon_object_id() const

Returns the object ID of an output object that contains an icon for the window.

Returns:

The object ID of an output object that contains an icon for the window.

void set_icon_object_id(std::uint16_t object)

Sets the object ID of an output object that contains an icon for the window.

Parameters:

object[in] The object ID of an output object that contains an icon for the window.

WindowType get_window_type() const

Returns the window type for this object.

Returns:

The window type for this object

void set_window_type(WindowType type)

Sets the window type for this object.

Parameters:

type[in] The window type for this object

bool get_option(Options option) const

Returns the state of a single option in the object’s option bitfield.

Parameters:

option[in] The option to check the value of in the object’s option bitfield

Returns:

The state of the associated option bit

void set_options(std::uint8_t value)

Sets the options bitfield for this object to a new value.

Parameters:

value[in] The new value for the options bitfield

void set_option(Options option, bool value)

Sets a single option in the options bitfield to the specified value.

Parameters:
  • option[in] The option to set

  • value[in] The new value of the option bit

Private Members

std::uint16_t name = NULL_OBJECT_ID

Object ID of an Output String object or an Object Pointer object that points to an Output String object that contains the string that gives a proper name to this object.

std::uint16_t title = NULL_OBJECT_ID

Object ID of an Output String object or an Object Pointer object that points to an Output String object that supplies window title text.

std::uint16_t icon = NULL_OBJECT_ID

Object ID of an Output object or an Object Pointer object that points to an Output object that contains an icon for the window.

std::uint8_t optionsBitfield = 0

Bitfield of options defined in Options enum.

std::uint8_t windowType = 0

The window type, which implies its size.

Private Static Attributes

static constexpr std::uint32_t MIN_OBJECT_LENGTH = 17

The fewest bytes of IOP data that can represent this object.

class AuxiliaryFunctionType1 : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines an auxiliary function type 1 object.

The Auxiliary Function Type 1 object defines the function attributes and designator of an Auxiliary Function.

Note

This object is parsed and validated but not utilized by version 3 or later VTs in making Auxiliary Control Assignments

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator NumberOfAttributes
enum class FunctionType : std::uint8_t

Enumerates the different kinds of auxiliary functions (type 1)

Values:

enumerator LatchingBoolean
enumerator Analogue
enumerator NonLatchingBoolean

Public Functions

AuxiliaryFunctionType1() = default

Constructor for a auxiliary function type 1 object.

~AuxiliaryFunctionType1() override = default

Virtual destructor for a auxiliary function type 1 object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

FunctionType get_function_type() const

Returns the function type.

Returns:

The function type

void set_function_type(FunctionType type)

Sets the function type.

Parameters:

type[in] The function type

Private Members

FunctionType functionType = FunctionType::LatchingBoolean

The function type.

class AuxiliaryFunctionType2 : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines an auxiliary function type 2 object.

The Auxiliary Function Type 2 object defines the function attributes and designator of an Auxiliary Function.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator FunctionAttributes
enumerator NumberOfAttributes
enum class FunctionType : std::uint8_t

Aux inputs must be one of these types, and the input and function types must match.

This is table J.5 in ISO 11783-6 (2018)

Values:

enumerator BooleanLatchingOnOff

Two-position switch (maintains position) (Single Pole, Double Throw)

enumerator Analouge

Maintains position setting.

enumerator BooleanNonLatchingIncreaseValue

Two-position switch (return to off) (Momentary Single Pole, Double Throw)

enumerator AnalougeReturnTo50Percent

Two way analogue (return to centre position)

enumerator AnalougeReturnTo0PercentIncreaseValue

One way analogue input (returns to 0%)

enumerator DualBooleanBothLatching

Three-Position Switch (latching in all positions) (Single Pole, Three Position, Centre Off)

enumerator DualBooleanBothNonLatching

Three-Position Switch, (returning to centre position) (Momentary Single Pole, Three Position, Centre Off)

enumerator DualBooleanLatchingUp

Three-Position Switch, latching in up position, momentary down (Single Pole, Three Position, Centre Off)

enumerator DualBooleanLatchingDown

Three-Position Switch, latching in down position, momentary up (Single Pole, Three Position, Centre Off)

enumerator CombinedAnalougeReturnTo50PercentWithDualBooleanLatching

Two way analogue (return to centre position) with latching Boolean at 0% and 100% positions.

enumerator CombinedAnalougeMaintainsPositionWithDualBooleanLatching

Analogue maintains position setting with latching Boolean at 0% and 100% positions.

enumerator QuadratureBooleanNonLatching

Two quadrature mounted Three-Position Switches, (returning to centre position) (Momentary Single Pole, Three Position, Centre Off)

enumerator QuadratureAnalouge

Two quadrature mounted analogue maintain position setting. The centre position of each analogue axis is at 50 % value.

enumerator QuadratureAnalougeReturnTo50Percent

Two quadrature mounted analogue returns to centre position (The centre position of each analogue axis is at 50 %)

enumerator BidirectionalEncoder

Count increases when turning in the encoders “increase” direction and count decreases when turning in the opposite direction.

enumerator ReservedRangeStart

Reserved for future use.

enumerator ReservedRangeEnd

Used for Remove assignment command.

enum FunctionAttribute

Enumerates bit offsets of attributes of auxiliary functions to be assigned to an input control.

Values:

enumerator CriticalControl

If this bit is 1, This function can only be controlled by a critical Auxiliary Input (see ISO 15077)

enumerator AssignmentRestriction

If this bit is 1, This function, if assigned, can only be assigned as specified in the Preferred Assignment command.

enumerator SingleAssignment

If 1, Function shall not be assigned with other Auxiliary Functions to same input. Otherwise it can be assigned with other functions to the same input.

Public Functions

AuxiliaryFunctionType2() = default

Constructor for a auxiliary function type 2 object.

~AuxiliaryFunctionType2() override = default

Virtual destructor for a auxiliary function type 2 object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

FunctionType get_function_type() const

Returns the function type.

Returns:

The function type

void set_function_type(FunctionType type)

Sets the function type.

Parameters:

type[in] The function type

bool get_function_attribute(FunctionAttribute attributeToCheck) const

returns the value of a specified function attribute

Parameters:

attributeToCheck[in] The function attribute to check

Returns:

The value of a specified function attribute

void set_function_attribute(FunctionAttribute attributeToSet, bool value)

Sets the value of a specified function attribute.

Parameters:
  • attributeToSet[in] The function attribute to set

  • value[in] The value to set the function attribute to

Private Members

std::uint8_t functionAttributesBitfield = 0

Bitfield of function attributes defined in FunctionAttribute enum plus the FunctionType

class AuxiliaryInputType1 : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines an auxiliary input type 1 object.

The Auxiliary Input Type 1 object defines the designator, the key, switch or dial number and the function type for an Auxiliary Input.

Note

This object is parsed and validated but not utilized by version 3 or later VTs in making Auxiliary Control Assignments

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator NumberOfAttributes
enum class FunctionType : std::uint8_t

Enumerates the different kinds of auxiliary functions (type 1)

Values:

enumerator LatchingBoolean
enumerator Analogue
enumerator NonLatchingBoolean

Public Functions

AuxiliaryInputType1() = default

Constructor for a auxiliary input type 1 object.

~AuxiliaryInputType1() override = default

Virtual destructor for a auxiliary input type 1 object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

FunctionType get_function_type() const

Returns the function type.

Returns:

The function type

void set_function_type(FunctionType type)

Sets the function type.

Parameters:

type[in] The function type

std::uint8_t get_input_id() const

Returns the identification number of the input. Maximum value is 250.

This number is used by the Auxiliary Input units to identify a particular input when sending an Auxiliary Input status message.

Returns:

The identification number of the input

bool set_input_id(std::uint8_t id)

Sets the identification number of the input. Maximum value is 250.

This number is used by the Auxiliary Input units to identify a particular input when sending an Auxiliary Input status message.

Parameters:

id[in] The identification number of the input

Returns:

true if the identification number was set, otherwise false (value was >250)

Private Members

FunctionType functionType = FunctionType::LatchingBoolean

The function type.

std::uint8_t inputID = 0

The identification number of the input. This number is used by the Auxiliary Input units to identify a particular input when sending an Auxiliary Input status message.

class AuxiliaryInputType2 : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines an auxiliary input type 2 object.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator BackgroundColour
enumerator FunctionAttributes
enumerator NumberOfAttributes
enum FunctionAttribute

Enumerates bit offsets of attributes of auxiliary inputs.

Values:

enumerator CriticalControl

If this bit is 1, This input can control a critical (auxiliary) function.

enumerator AssignmentRestriction

Reserved, set to 0.

enumerator SingleAssignment

If 1, Input shall only be assigned to a single Auxiliary Function.

Public Functions

AuxiliaryInputType2() = default

Constructor for a auxiliary input type 2 object.

~AuxiliaryInputType2() override = default

Virtual destructor for a auxiliary input type 2 object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

AuxiliaryFunctionType2::FunctionType get_function_type() const

Returns the type of input function that the input control performs when assigned.

Returns:

The type of input function that the input control performs when assigned

void set_function_type(AuxiliaryFunctionType2::FunctionType type)

Sets the type of input function that the input control performs when assigned.

Parameters:

type[in] The type of input function that the input control performs when assigned

bool get_function_attribute(FunctionAttribute attributeToCheck) const

returns the value of a specified function attribute

Parameters:

attributeToCheck[in] The function attribute to check

Returns:

The value of a specified function attribute

void set_function_attribute(FunctionAttribute attributeToSet, bool value)

Sets the value of a specified function attribute.

Parameters:
  • attributeToSet[in] The function attribute to set

  • value[in] The value to set the function attribute to

Private Members

std::uint8_t functionAttributesBitfield = 0

Bitfield of function attributes defined in FunctionAttribute enum plus the FunctionType

class AuxiliaryControlDesignatorType2 : public isobus::VTObject
#include <isobus_virtual_terminal_objects.hpp>

Defines an auxiliary control designator type 2 object. Auxiliary Control Designator Type 2 Object Pointers allow the Working Set to place Auxiliary Input Type 2 and Auxiliary Function Type 2 designators in the Data Mask at Working Set defined coordinates.

Public Types

enum class AttributeName : std::uint8_t

Enumerates this object’s attributes which are assigned an attribute ID. The Change Attribute command allows any writable attribute with an AID to be changed.

Values:

enumerator Type
enumerator PointerType
enumerator AuxiliaryObjectID
enumerator NumberOfAttributes

Public Functions

AuxiliaryControlDesignatorType2() = default

Constructor for a auxiliary control designator type 2 object.

~AuxiliaryControlDesignatorType2() override = default

Virtual destructor for a auxiliary control designator type 2 object.

virtual VirtualTerminalObjectType get_object_type() const override

Returns the VT object type of the underlying derived object.

Returns:

The VT object type of the underlying derived object

virtual std::uint32_t get_minumum_object_length() const override

Returns the minimum binary serialized length of the associated object.

Returns:

The minimum binary serialized length of the associated object

virtual 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.

Parameters:

objectPool[in] The object pool to use when validating the object

Returns:

true if the object passed basic error checks

virtual bool set_attribute(std::uint8_t attributeID, std::uint32_t rawAttributeData, const std::map<std::uint16_t, std::shared_ptr<VTObject>> &objectPool, AttributeError &returnedError) override

Sets an attribute and optionally returns an error code in the last parameter.

Parameters:
  • attributeID[in] The ID of the attribute to change

  • rawAttributeData[in] The raw data to change the attribute to, as decoded in little endian format with unused bytes/bits set to zero.

  • objectPool[in] The object pool to use when validating the objects affected by setting this attribute

  • returnedError[out] If this function returns false, this will be the error code. If the function returns true, this value is undefined.

Returns:

True if the attribute was changed, otherwise false (check the returnedError in this case to know why).

virtual 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.

Parameters:
  • attributeID[in] The ID of the attribute to get

  • returnedAttributeData[out] The raw data of the attribute, as decoded in little endian format with unused bytes/bits set to zero. You may need to cast this to the correct type. If this function returns false, this value is undefined.

Returns:

True if the attribute was retrieved, otherwise false (the attribute ID was invalid)

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 with the pointer type.

Returns:

The object ID of the referenced auxiliary object or the null object ID

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.

Parameters:

id[in] The object ID of the referenced auxiliary object or the null object ID

std::uint8_t get_pointer_type() const

Returns the pointer type, which describes how this object should be rendered.

If the pointer type is 0 or 2, the pointer points to Auxiliary Object referenced in the auxiliaryObjectID, or the working set object and the VT shall display that auxiliary object designator (pointer type 0) or Working Set designator (pointer type 2). If the Auxiliary Control designator Object Pointer is of pointer type 1 or 3, then this pointer references Auxiliary Object(s) that have an assignment relationship to the object referenced by the auxiliary object attribute within this object pool.The VT shall display the assigned auxiliary object designator (pointer type 1) or its Working Set designator (pointer type 3). If the pointer type is 1, the pointer points to

Returns:

The pointer type, which describes how this object should be rendered

void set_pointer_type(std::uint8_t type)

Sets the pointer type which describes how this object should be rendered.

Parameters:

type[in] The pointer type, which describes how this object should be rendered

Private Members

std::uint16_t auxiliaryObjectID = NULL_OBJECT_ID

Object ID of a referenced Auxiliary Function or Auxiliary Input object or NULL_OBJECT_ID.

std::uint8_t pointerType = 0

The pointer type, defines how this should be rendered.