Client API

class VirtualTerminalClient

An client interface for interacting with a virtual terminal (VT) server.

This class is the main interface for working with a VT. To use it, you must instantiate it with a source and partner control function, and set and one or more object pools to this class to be uploaded to the VT server. Once this setup is done, call the initialize function to start running the internal state machine. The stack will take care of uploading the object pool, and then you will be able to interact with the pool using the provided “send” functions from your application.

Public Types

enum class Function : std::uint8_t

Enumerates the multiplexor byte values for VT commands.

Values:

enumerator SoftKeyActivationMessage
enumerator ButtonActivationMessage
enumerator PointingEventMessage
enumerator VTSelectInputObjectMessage
enumerator VTESCMessage
enumerator VTChangeNumericValueMessage
enumerator VTChangeActiveMaskMessage
enumerator VTChangeSoftKeyMaskMessage
enumerator VTChangeStringValueMessage
enumerator VTOnUserLayoutHideShowMessage
enumerator VTControlAudioSignalTerminationMessage
enumerator ObjectPoolTransferMessage
enumerator EndOfObjectPoolMessage
enumerator AuxiliaryAssignmentTypeOneCommand
enumerator AuxiliaryInputTypeOneStatus
enumerator PreferredAssignmentCommand
enumerator AuxiliaryInputTypeTwoMaintenanceMessage
enumerator AuxiliaryAssignmentTypeTwoCommand
enumerator AuxiliaryInputStatusTypeTwoEnableCommand
enumerator AuxiliaryInputTypeTwoStatusMessage
enumerator AuxiliaryCapabilitiesRequest
enumerator SelectActiveWorkingSet
enumerator ESCCommand
enumerator HideShowObjectCommand
enumerator EnableDisableObjectCommand
enumerator SelectInputObjectCommand
enumerator ControlAudioSignalCommand
enumerator SetAudioVolumeCommand
enumerator ChangeChildLocationCommand
enumerator ChangeSizeCommand
enumerator ChangeBackgroundColourCommand
enumerator ChangeNumericValueCommand
enumerator ChangeEndPointCommand
enumerator ChangeFontAttributesCommand
enumerator ChangeLineAttributesCommand
enumerator ChangeFillAttributesCommand
enumerator ChangeActiveMaskCommand
enumerator ChangeSoftKeyMaskCommand
enumerator ChangeAttributeCommand
enumerator ChangePriorityCommand
enumerator ChangeListItemCommand
enumerator DeleteObjectPoolCommand
enumerator ChangeStringValueCommand
enumerator ChangeChildPositionCommand
enumerator ChangeObjectLabelCommand
enumerator ChangePolygonPointCommand
enumerator ChangePolygonScaleCommand
enumerator GraphicsContextCommand
enumerator GetAttributeValueMessage
enumerator SelectColourMapCommand
enumerator IdentifyVTMessage
enumerator ExecuteExtendedMacroCommand
enumerator LockUnlockMaskCommand
enumerator ExecuteMacroCommand
enumerator GetMemoryMessage
enumerator GetSupportedWidecharsMessage
enumerator GetNumberOfSoftKeysMessage
enumerator GetTextFontDataMessage
enumerator GetWindowMaskDataMessage
enumerator GetSupportedObjectsMessage
enumerator GetHardwareMessage
enumerator StoreVersionCommand
enumerator LoadVersionCommand
enumerator DeleteVersionCommand
enumerator ExtendedGetVersionsMessage
enumerator ExtendedStoreVersionCommand
enumerator ExtendedLoadVersionCommand
enumerator ExtendedDeleteVersionCommand
enumerator GetVersionsMessage
enumerator GetVersionsResponse
enumerator UnsupportedVTFunctionMessage
enumerator VTStatusMessage
enumerator WorkingSetMaintenanceMessage
enum class HideShowObjectCommand : std::uint8_t

Enumerates the states that can be sent with a hide/show object command.

Values:

enumerator HideObject

Hides the object.

enumerator ShowObject

Shows an object.

enum class EnableDisableObjectCommand : std::uint8_t

Enumerates the states that can be sent with an enable/disable object command.

Values:

enumerator DisableObject

Disables a compatible object.

enumerator EnableObject

Enables a compatible object.

enum class SelectInputObjectOptions : std::uint8_t

Enumerates the states that can be sent with a select input object options command.

Values:

enumerator ActivateObjectForDataInput

Activates an object for data input.

enumerator SetFocusToObject

Focuses the object (usually this draws a temporary box around it)

enum class VTVersion

The different VT versions that a client or server might support.

Values:

enumerator Version2OrOlder

Client or server supports VT version 2 or lower.

enumerator Version3

Client or server supports all of VT version 3.

enumerator Version4

Client or server supports all of VT version 4.

enumerator Version5

Client or server supports all of VT version 5.

enumerator Version6

Client or server supports all of VT version 6.

enumerator ReservedOrUnknown

Reserved value, not to be used.

enum class LineDirection : std::uint8_t

Enumerates the different line directions that can be used when changing an endpoint of an object.

Values:

enumerator TopLeftToBottomRightOfEnclosingVirtualRectangle

Draws the line from top left to bottom right of the enclosing virtual rectangle.

enumerator BottomLeftToTopRightOfEnclosingVirtualRectangle

Draws the line from bottom left to top right of the enclosing virtual rectangle.

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.

enum class FillType : std::uint8_t

Enumerates the different fill types for an object.

Values:

enumerator NoFill

No fill will be applied.

enumerator FillWithLineColour

Fill with the colour of the outline of the shape.

enumerator FillWithSpecifiedColourInFillColourAttribute

Fill with the colour specified by a fill attribute.

enumerator FillWithPatternGivenByFillPatternAttribute

Fill with a patter provided by a fill pattern attribute.

enum class MaskType : std::uint8_t

The types of object pool masks.

Values:

enumerator DataMask

A data mask, used in normal circumstances.

enumerator AlarmMask

An alarm mask, which has different metadata related to popping up alarms, like priority.

enum class AlarmMaskPriority : std::uint8_t

The allowable priorities of an alarm mask.

Values:

enumerator High

Overrides lower priority alarm masks.

enumerator Medium

Overrides low priority alarm masks.

enumerator Low

Overrides data masks.

enum class MaskLockState : std::uint8_t

Denotes the lock/unlock state of a mask. Used to freeze/unfreeze rendering of a mask.

Values:

enumerator UnlockMask

Renders the mask normally.

enumerator LockMask

Locks the mask so rendering of it is not updated until it is unlocked or a timeout occurs.

enum class KeyActivationCode : std::uint8_t

The different key activation codes that a button press can generate.

Values:

enumerator ButtonUnlatchedOrReleased

Button is released.

enumerator ButtonPressedOrLatched

Button is pressed.

enumerator ButtonStillHeld

Button is being held down (sent cyclically)

enumerator ButtonPressAborted

Press was aborted (user navigated away from the button and did not release it)

enum class ESCMessageErrorCode : std::uint8_t

Enumerates the errors that can be present in an ESC message.

Values:

enumerator NoError

No error occurred.

enumerator NoInputFieldOpen

No input field is open.

enumerator OtherError

Error is not one of the above.

enum class MacroEventID : std::uint8_t

Enumerates the different events that can be associated with a macro.

Values:

enumerator Reserved

Reserved.

enumerator OnActivate

Event on activation of an object (such as for data input)

enumerator OnDeactivate

Event on deactivation of an object.

enumerator OnShow

Event on an object being shown.

enumerator OnHide

Event on an object being hidden.

enumerator OnEnable

Event on enable of an object.

enumerator OnDisable

Event on disabling an object.

enumerator OnChangeActiveMask

Event on changing the active mask.

enumerator OnChangeSoftKeyMask

Event on change of the soft key mask.

enumerator OnChangeAttribute

Event on change of an attribute value.

enumerator OnChangeBackgroundColour

Event on change of a background colour.

enumerator OnChangeFontAttributes

Event on change of a font attribute.

enumerator OnChangeLineAttributes

Event on change of a line attribute.

enumerator OnChangeFillAttributes

Event on change of a fill attribute.

enumerator OnChangeChildLocation

Event on change of a child objects location.

enumerator OnChangeSize

Event on change of an object size.

enumerator OnChangeValue

Event on change of an object value (like via change numeric value)

enumerator OnChangePriority

Event on change of a mask’s priority.

enumerator OnChangeEndPoint

Event on change of an object endpoint.

enumerator OnInputFieldSelection

Event when an input field is selected.

enumerator OnInputFieldDeselection

Event on deselection of an input field.

enumerator OnESC

Event on ESC (escape)

enumerator OnEntryOfValue

Event on entry of a value.

enumerator OnEntryOfNewValue

Event on entry of a new value.

enumerator OnKeyPress

Event on the press of a key.

enumerator OnKeyRelease

Event on the release of a key.

enumerator OnChangeChildPosition

Event on changing a child object’s position.

enumerator OnPointingEventPress

Event on a pointing event press.

enumerator OnPointingEventRelease

Event on a pointing event release.

enumerator ReservedBegin

Beginning of the reserved range.

enumerator ReservedEnd

End of the reserved range.

enumerator UseExtendedMacroReference

Use extended macro reference.

enum class GraphicMode : std::uint8_t

Enumerates the various VT server graphics modes.

Values:

enumerator Monochrome

Monochromatic graphics mode (1 bit)

enumerator SixteenColour

16 Colour mode (4 bit)

enumerator TwoHundredFiftySixColour

256 Colour mode (8 bit)

enum class AuxiliaryTypeTwoFunctionType : std::uint8_t

Enumerates the various auxiliary input function types.

Values:

enumerator BooleanLatching

Two-position switch (maintains position) (Single Pole, Double Throw)

enumerator AnalogueLatching

Two-way analogue (Maintains position setting)

enumerator BooleanMomentary

Two-position switch (returns to off) (Momentary Single Pole, Single Throw)

enumerator AnalogueMomentaryTwoWay

Two-way analogue (returns to centre position - 50%)

enumerator AnalogueMomentaryOneWay

One-way analogue (returns to 0%)

enumerator DualBooleanLatching

Three-position switch (maintains position) (Single Pole, Three Positions, Centre Off)

enumerator DualBooleanMomentary

Three-position switch (returns to off/centre position) (Momentary Single Pole, Three Positions, Centre Off)

enumerator DualBooleanLatchingUpOnly

Three-position switch (maintains position only in up position) (Single Pole, Three Positions, Centre Off)

enumerator DualBooleanLatchingDownpOnly

Three-position switch (maintains position only in down position) (Momentary Single Pole, Three Positions, Centre Off)

enumerator AnalogueMomentaryBooleanLatching

two-way analogue (returns to centre position) with latching Boolean at 0% and 100% positions

enumerator AnalogueLatchingBooleanLatching

two-way analogue (maintains position setting) with momentary Boolean at 0% and 100% positions

enumerator QuadratureBooleanMomentary

Two Quadrature mounted Three-position switches (returns to centre position) (Momentary Single Pole, Three Position Single Throw, Centre Off)

enumerator QuadratureAnalogueLatching

Two Quadrature mounted Two-way analogue (maintains position)

enumerator QuadratureAnalogueMomentary

Two Quadrature mounted Two-way analogue (returns to centre position - 50%)

enumerator BidirectionalEncoder

Count increases when turning in the encoders “increase” direction, and decreases when turning in the opposite direction.

enumerator Reserved

15-30 Reserved

enumerator ReservedRemoveAssignment

Used for Remove assignment command.

enum class StateMachineState : std::uint8_t

The internal state machine state of the VT client, mostly just public so tests can access it.

Values:

enumerator Disconnected

VT is not connected, and is not trying to connect yet.

enumerator WaitForPartnerVTStatusMessage

VT client is initialized, waiting for a VT server to come online.

enumerator SendWorkingSetMasterMessage

Client is sending the working state master message.

enumerator ReadyForObjectPool

Client needs an object pool before connection can continue.

enumerator SendGetMemory

Client is sending the “get memory” message to see if VT has enough memory available.

enumerator WaitForGetMemoryResponse

Client is waiting for a response to the “get memory” message.

enumerator SendGetNumberSoftkeys

Client is sending the “get number of soft keys” message.

enumerator WaitForGetNumberSoftKeysResponse

Client is waiting for a response to the “get number of soft keys” message.

enumerator SendGetTextFontData

Client is sending the “get text font data” message.

enumerator WaitForGetTextFontDataResponse

Client is waiting for a response to the “get text font data” message.

enumerator SendGetHardware

Client is sending the “get hardware” message.

enumerator WaitForGetHardwareResponse

Client is waiting for a response to the “get hardware” message.

enumerator SendGetVersions

If a version label was specified, check to see if the VT has that version already.

enumerator WaitForGetVersionsResponse

Client is waiting for a response to the “get versions” message.

enumerator SendStoreVersion

Sending the store version command.

enumerator WaitForStoreVersionResponse

Client is waiting for a response to the store version command.

enumerator SendLoadVersion

Sending the load version command.

enumerator WaitForLoadVersionResponse

Client is waiting for the VT to respond to the “Load Version” command.

enumerator UploadObjectPool

Client is uploading the object pool.

enumerator SendEndOfObjectPool

Client is sending the end of object pool message.

enumerator WaitForEndOfObjectPoolResponse

Client is waiting for the end of object pool response message.

enumerator Connected

Client is connected to the VT server and the application layer is in control.

enumerator Failed

Client could not connect to the VT due to an error.

Public Functions

VirtualTerminalClient(std::shared_ptr<PartneredControlFunction> partner, std::shared_ptr<InternalControlFunction> clientSource)

The constructor for a VirtualTerminalClient.

Parameters:
  • partner[in] The VT server control function

  • clientSource[in] The internal control function to communicate from

VirtualTerminalClient(VirtualTerminalClient&) = delete

Deleted copy constructor for VirtualTerminalClient.

~VirtualTerminalClient()

The destructor for the VirtualTerminalClient.

void initialize(bool spawnThread)

This function starts the state machine. Call this once you have supplied 1 or more object pool and are ready to connect.

Parameters:

spawnThread[in] The client will start a thread to manage itself if this parameter is true. Otherwise you must update it cyclically.

bool get_is_initialized() const

Returns if the client has been initialized.

Note

This does not mean that the client is connected to the VT server

Returns:

true if the client has been initialized

bool get_is_connected() const

Check whether the client is connected to the VT server.

Returns:

true if cconnected, false otherwise

void terminate()

Terminates the client and joins the worker thread if applicable.

void restart_communication()

Halts communication with the VT gracefully and restarts it.

std::shared_ptr<PartneredControlFunction> get_partner_control_function() const

Returns the control function of the VT server with which this VT client communicates.

Returns:

The partner control function for the VT server

std::shared_ptr<InternalControlFunction> get_internal_control_function() const

Returns the internal control function being used by the client.

Returns:

The internal control function being used by the client

std::uint8_t get_active_working_set_master_address() const

Returns the active working set master’s address.

Returns:

The active working set master’s address, or 0xFE (NULL_CAN_ADDRESS) if none or unknown

EventDispatcher<VTKeyEvent> &get_vt_soft_key_event_dispatcher()

The event dispatcher for when a soft key is pressed or released.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTKeyEvent> &get_vt_button_event_dispatcher()

The event dispatcher for when a button is pressed or released.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTPointingEvent> &get_vt_pointing_event_dispatcher()

The event dispatcher for when a pointing event is “pressed or released”.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTSelectInputObjectEvent> &get_vt_select_input_object_event_dispatcher()

The event dispatcher for when an input object event is triggered.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTESCMessageEvent> &get_vt_esc_message_event_dispatcher()

The event dispatcher for when an ESC message is received, e.g. an open object input is closed.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTChangeNumericValueEvent> &get_vt_change_numeric_value_event_dispatcher()

The event dispatcher for when a numeric value is changed in an input object.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTChangeActiveMaskEvent> &get_vt_change_active_mask_event_dispatcher()

The event dispatcher for when the active mask is changed.

The VT sends this whenever there are missing object references or errors in the mask.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTChangeSoftKeyMaskEvent> &get_vt_change_soft_key_mask_event_dispatcher()

The event dispatcher for when the soft key mask is changed.

The VT sends this whenever there are missing object references or errors in the mask.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTChangeStringValueEvent> &get_vt_change_string_value_event_dispatcher()

The event dispatcher for when a string value is changed.

The object could be either the input string object or the referenced string variable object.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTUserLayoutHideShowEvent> &get_vt_user_layout_hide_show_event_dispatcher()

The event dispatcher for when a user-layout object is hidden or shown.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<VTAudioSignalTerminationEvent> &get_vt_control_audio_signal_termination_event_dispatcher()

The event dispatcher for when an audio signal is terminated.

Returns:

A reference to the event dispatcher, used to add listeners

EventDispatcher<AuxiliaryFunctionEvent> &get_auxiliary_function_event_dispatcher()

The event dispatcher for for when a change in auxiliary input for a function is received.

Returns:

A reference to the event dispatcher, used to add listeners

void set_auxiliary_input_model_identification_code(std::uint16_t modelIdentificationCode)

Set the model identification code of our auxiliary input device.

The model identification code is used to allow other devices identify whether our device differs from a previous versions. If the model identification code is different, the preferred assignments are reset.

Parameters:

modelIdentificationCode[in] The model identification code

bool get_auxiliary_input_learn_mode_enabled() const

Get whether the VT has enabled the learn mode for the auxiliary input.

Returns:

true if the VT has enabled the learn mode for the auxiliary input

void add_auxiliary_input_object_id(const std::uint16_t auxiliaryInputID)

Add a new auxiliary input to be managed by this virtual terminal object.

This function should be called for each auxiliary input that is available in the pool, and will receive updates using update_auxiliary_input().

Parameters:

auxiliaryInputID[in] The ID of the auxiliary input

void remove_auxiliary_input_object_id(const std::uint16_t auxiliaryInputID)

Remove an auxiliary input from the pool of managed auxiliary inputs.

Parameters:

auxiliaryInputID[in] The ID of the auxiliary input

void update_auxiliary_input(const std::uint16_t auxiliaryInputID, const std::uint16_t value1, const std::uint16_t value2, const bool controlLocked = false)

Update the state of an auxiliary input. This should be called when the value of an auxiliary input changes.

Parameters:
  • auxiliaryInputID[in] The ID of the auxiliary input

  • value1[in] The first value of the auxiliary input. See Table J.5 of Part 6 of the standard for details.

  • value2[in] The second value of the auxiliary input. See Table J.5 of Part 6 of the standard for details.

  • controlLocked[in] Whether the auxiliary input is locked

bool send_hide_show_object(std::uint16_t objectID, HideShowObjectCommand command)

Sends a hide/show object command.

This command is used to hide or show a Container object. This pertains to the visibility of the object as well as its remembered state.If the object cannot be displayed due to references to missing objects, the VT generates an error in the response.

Parameters:
  • objectID[in] The ID of the target object

  • command[in] The target hide/show state of the object

Returns:

true if the message is being sent successfully

bool send_enable_disable_object(std::uint16_t objectID, EnableDisableObjectCommand command)

Sends an enable/disable object command.

This command is used to enable or disable an input field object or a Button object and pertains to the accessibility of an input field object or Button object.This command is also used to enable or disable an Animation object. It is allowed to enable already enabled objects and to disable already disabled objects.

Parameters:
  • objectID[in] The ID of the target object

  • command[in] The target enable/disable state of the object

Returns:

true if the message is being sent successfully

bool send_select_input_object(std::uint16_t objectID, SelectInputObjectOptions option)

Sends a select input object command.

This command is used to force the selection of an input field, Button, or Key object.

Parameters:
  • objectID[in] The ID of the target object

  • option[in] The method by which the object will be selected

Returns:

true if the message is being sent successfully

bool send_ESC()

Sends the ESC message (Escape)

Returns:

true if the message is being sent successfully

bool send_control_audio_signal(std::uint8_t activations, std::uint16_t frequency_hz, std::uint16_t duration_ms, std::uint16_t offTimeDuration_ms)

Sends the control audio signal command.

This command may be used to control the audio on the VT. When received this message shall terminate any audio in process from the originating ECU and replace the previous command with the new command.

Parameters:
  • activations[in] Number of times to activate the signal

  • frequency_hz[in] The audio frequency to command in Hz

  • duration_ms[in] Duration of the signal activation

  • offTimeDuration_ms[in] The amount of silent time in the signal

Returns:

true if the message is being sent successfully

bool send_set_audio_volume(std::uint8_t volume_percent)

Sends the set audio volume command.

This command applies to subsequent Control Audio Signal commands. VTs that are not able to modify the volume of the currently playing tone shall set the Audio device is busy bit in the response.This command should not affect in any way the volume settings of other Working Sets and shall not affect the volume of Alarm Masks.

Parameters:

volume_percent[in] The volume percentage to set the VT server to

Returns:

true if the message is being sent successfully

bool send_change_child_location(std::uint16_t objectID, std::uint16_t parentObjectID, std::uint8_t relativeXPositionChange, std::uint8_t relativeYPositionChange)

Sends the change child location command.

The Change Child Location command is used to change the position of an object. The new position is set relative to the object’s current position. Since the object can be included in many parent objects, the parent Object ID is also included. If a parent object includes the child object multiple times, then each instance will be moved. The position attributes given in the message have an offset of -127, so a value of 255 results in a +128 px move. Positive values indicate a position change down or to the right. Negative values indicate a position change up or to the left.

Parameters:
  • objectID[in] The ID of the target object

  • parentObjectID[in] The ID of the object’s parent object

  • relativeXPositionChange[in] The amount to change the X position by (px)

  • relativeYPositionChange[in] The amount to change the Y position by (px)

Returns:

true if the message is being sent successfully

bool send_change_child_position(std::uint16_t objectID, std::uint16_t parentObjectID, std::uint16_t xPosition, std::uint16_t yPosition)

Sends the change child position command.

The new position is set relative to the parent object’s position. Since the object can be included in many parent objects, the parent Object ID is also included.If a parent object includes the child object multiples times, then each instance will be moved to the same location(the designer may want to use Change Child Location command to move all instances in a relative motion). When the object is moved, the parent object shall be refreshed. The position attributes given in the message are signed integer. Positive values indicate a position below(Y) or to the right of(X) the top left corner of the parent object.Negative values indicate a position above(Y) or to the left of(X) the top left corner of the parent object.

Parameters:
  • objectID[in] The ID of the target object

  • parentObjectID[in] The ID of the object’s parent object

  • xPosition[in] The new X position of the object (px)

  • yPosition[in] The new Y position of the object (px)

Returns:

true if the message is being sent successfully

bool send_change_size_command(std::uint16_t objectID, std::uint16_t newWidth, std::uint16_t newHeight)

Sends the change size command.

A value of 0 for width or height or both means that the object size is 0 and the object is not drawn.

Parameters:
  • objectID[in] The ID of the target object

  • newWidth[in] The new width of the object

  • newHeight[in] The new height of the object

Returns:

true if the message is being sent successfully

bool send_change_background_colour(std::uint16_t objectID, std::uint8_t colour)

Sends the change background colour command.

Parameters:
  • objectID[in] The ID of the target object

  • colour[in] The new background colour of the object

Returns:

true if the message is being sent successfully

bool send_change_numeric_value(std::uint16_t objectID, std::uint32_t value)

Sends the change numeric value command.

The size of the object shall not be changed by this command. Only the object indicated in the command is to be changed, variables referenced by the object are not changed.

Parameters:
  • objectID[in] The ID of the target object

  • value[in] The new numeric value of the object

Returns:

true if the message is being sent successfully

bool send_change_string_value(std::uint16_t objectID, uint16_t stringLength, const char *value)

Sends the change string value command.

The size of the object shall not be changed by this command. Only the object indicated in the command is to be changed, variables referenced by the object are not changed. The transferred string is allowed to be smaller than the length of the value attribute of the target object and in this case the VT shall pad the value attribute with space characters.

Parameters:
  • objectID[in] The ID of the target object

  • stringLength[in] The length of the string to be sent

  • value[in] The string to be sent

Returns:

true if the message is being sent successfully

bool send_change_string_value(std::uint16_t objectID, const std::string &value)

Sends the change string value command (with a c++ string instead of buffer + length)

The size of the object shall not be changed by this command. Only the object indicated in the command is to be changed, variables referenced by the object are not changed. The transferred string is allowed to be smaller than the length of the value attribute of the target object and in this case the VT shall pad the value attribute with space characters.

Parameters:
  • objectID[in] The ID of the target object

  • value[in] The string to be sent

Returns:

true if the message is being sent successfully

bool send_change_endpoint(std::uint16_t objectID, std::uint16_t width_px, std::uint16_t height_px, LineDirection direction)

Sends the change endpoint command, which changes the end of an output line.

Parameters:
  • objectID[in] The ID of the target object

  • width_px[in] The width to change the output line to

  • height_px[in] The height to change the output line to

  • direction[in] The line direction (refer to output line object attributes)

Returns:

true if the message is being sent successfully

bool send_change_font_attributes(std::uint16_t objectID, std::uint8_t colour, FontSize size, std::uint8_t type, std::uint8_t styleBitfield)

Sends the change font attributes command.

This command is used to change the Font Attributes in a Font Attributes object.

Parameters:
  • objectID[in] The ID of the target object

  • colour[in] See the standard VT colour palette for more details

  • size[in] Font size

  • type[in] Font Type

  • styleBitfield[in] The font style encoded as a bitfield

Returns:

true if the message is being sent successfully

bool send_change_line_attributes(std::uint16_t objectID, std::uint8_t colour, std::uint8_t width, std::uint16_t lineArtBitmask)

Sends the change line attributes command.

This command is used to change the Line Attributes in a Line Attributes object.

Parameters:
  • objectID[in] The ID of the target object

  • colour[in] See the standard VT colour palette for more details

  • width[in] The line width

  • lineArtBitmask[in] The line art, encoded as a bitfield (See ISO11783-6 for details)

Returns:

true if the message is being sent successfully

bool send_change_fill_attributes(std::uint16_t objectID, FillType fillType, std::uint8_t colour, std::uint16_t fillPatternObjectID)

Sends the change fill attributes command.

This command is used to change the Fill Attributes in a Fill Attributes object.

Parameters:
  • objectID[in] The ID of the target object

  • fillType[in] The fill type

  • colour[in] See the standard VT colour palette for more details

  • fillPatternObjectID[in] Object ID to a fill pattern or NULL_OBJECT_ID

Returns:

true if the message is being sent successfully

bool send_change_active_mask(std::uint16_t workingSetObjectID, std::uint16_t newActiveMaskObjectID)

Sends the change active mask command.

This command is used to change the active mask of a Working Set to either a Data Mask object or an Alarm Mask object.

Parameters:
  • workingSetObjectID[in] The ID of the working set

  • newActiveMaskObjectID[in] The object ID of the new active mask

Returns:

true if the message is being sent successfully

bool send_change_softkey_mask(MaskType type, std::uint16_t dataOrAlarmMaskObjectID, std::uint16_t newSoftKeyMaskObjectID)

Sends the change softkey mask command.

This command is used to change the Soft Key Mask associated with a Data Mask object or an Alarm Mask object.

Parameters:
  • type[in] The mask type, alarm or data

  • dataOrAlarmMaskObjectID[in] The object ID of the target mask

  • newSoftKeyMaskObjectID[in] The object ID of the new softkey mask

Returns:

true if the message is being sent successfully

bool send_change_attribute(std::uint16_t objectID, std::uint8_t attributeID, std::uint32_t value)

Sends the change attribute command.

This command is used to change any attribute with an assigned Attribute ID. This message cannot be used to change strings.

Parameters:
  • objectID[in] The ID of the target object

  • attributeID[in] The attribute ID of the attribute being changed

  • value[in] The new attribute value

Returns:

true if the message is being sent successfully

bool send_change_attribute(std::uint16_t objectID, std::uint8_t attributeID, float value)

Sends the change attribute command (for float values)

This command is used to change a float attribute with an assigned Attribute ID. This is most useful for changing output number scale factors.

Parameters:
  • objectID[in] The ID of the target object

  • attributeID[in] The attribute ID of the attribute being changed

  • value[in] The new attribute value

Returns:

true if the message is being sent successfully

bool send_change_priority(std::uint16_t alarmMaskObjectID, AlarmMaskPriority priority)

Sends the change priority command.

This command is used to change the priority of an Alarm Mask. This command causes the VT to evaluate the priority of all active masks and may cause a change to a different mask if the Alarm Mask being changed should either become the active Working Set and mask, or should no longer be the active Working Set and mask.

Parameters:
  • alarmMaskObjectID[in] The object ID of the target alarm mask

  • priority[in] The new priority for the mask

Returns:

true if the message is being sent successfully

bool send_change_list_item(std::uint16_t objectID, std::uint8_t listIndex, std::uint16_t newObjectID)

Sends the change list item command.

This command is used to change a list item in an Input List object, Output List object, animation object, or external object definition object. NULL_OBJECT_ID will result in the list item being removed, but will not change the index order of the other list items.

Parameters:
  • objectID[in] The object ID of the list

  • listIndex[in] The index in the list to edit

  • newObjectID[in] The new object ID for the specified list index, or NULL_OBJECT_ID.

Returns:

true if the message is being sent successfully

bool send_lock_unlock_mask(MaskLockState state, std::uint16_t objectID, std::uint16_t timeout_ms)

Sends the lock unlock mask command.

This command is used by a Working Set to disallow or allow screen refreshes at the VT for the visible Data Mask or User Layout Data Mask owned by the requesting Working Set. This message would be used when a series of changes need to be synchronized or made visually atomic. The mask may be unlocked if a a timeout occurs based on the timeout attribute of this message, or by several other methods outlined in ISO11783-6, such as “proprietary reasons”.

Parameters:
  • state[in] The target lock/unlock state

  • objectID[in] The object ID of the target mask

  • timeout_ms[in] The max time to lock the mask, or 0 for no timeout. Does not apply to unlock commands.

Returns:

true if the message is being sent successfully

bool send_execute_macro(std::uint16_t objectID)

Sends the execute macro command.

This command is used to execute a Macro.

Parameters:

objectID[in] The ID of the target object

Returns:

true if the message is being sent successfully

bool send_change_object_label(std::uint16_t objectID, std::uint16_t labelStringObjectID, std::uint8_t fontType, std::uint16_t graphicalDesignatorObjectID)

Sends the change object label command.

This command is used by an ECU to change a label of an object.

Parameters:
  • objectID[in] The ID of the target object

  • labelStringObjectID[in] The label’s object ID

  • fontType[in] The font type or NULL_OBJECT_ID

  • graphicalDesignatorObjectID[in] Object ID of an object to be used as a graphic representation of the object label or NULL_OBJECT_ID

Returns:

true if the message is being sent successfully

bool send_change_polygon_point(std::uint16_t objectID, std::uint8_t pointIndex, std::uint16_t newXValue, std::uint16_t newYValue)

Sends change polygon point command.

This command is used by a Working Set to modify a point in an Output Polygon object.

Parameters:
  • objectID[in] The ID of the target object

  • pointIndex[in] The index of the point in the polygon to edit

  • newXValue[in] The new X axis value (px)

  • newYValue[in] The new Y axis value (px)

Returns:

true if the message is being sent successfully

bool send_change_polygon_scale(std::uint16_t objectID, std::uint16_t widthAttribute, std::uint16_t heightAttribute)

Sends the change polygon scale command.

This command is used by a Working Set to change the scale of a complete Output Polygon object. This message causes the value of the polygon points to be changed.

Parameters:
  • objectID[in] The ID of the target object

  • widthAttribute[in] New width attribute

  • heightAttribute[in] New height attribute

Returns:

true if the message is being sent successfully

bool send_select_colour_map_or_palette(std::uint16_t objectID)

Sends the select colour map or palette command.

Parameters:

objectID[in] The object to select

Returns:

true if the message is being sent successfully

bool send_execute_extended_macro(std::uint16_t objectID)

Sends the execute extended macro command.

Executes an extended macro

Parameters:

objectID[in] The object ID of the extended macro to execute

Returns:

true if the message is being sent successfully

bool send_select_active_working_set(std::uint64_t NAMEofWorkingSetMasterForDesiredWorkingSet)

Sends the select active working set command.

Parameters:

NAMEofWorkingSetMasterForDesiredWorkingSet[in] The NAME of the target working set master

Returns:

true if the message is being sent successfully

bool send_set_graphics_cursor(std::uint16_t objectID, std::int16_t xPosition, std::int16_t yPosition)

Sends the set graphics cursor command.

This command sets the graphics cursor X/Y attributes of the object.

Parameters:
  • objectID[in] The ID of the target object

  • xPosition[in] The new X position (px)

  • yPosition[in] The new Y position (px)

Returns:

true if the message is being sent successfully

bool send_move_graphics_cursor(std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)

Sends the move graphics cursor command.

This command alters the graphics cursor x/y attributes of the object by moving it relative to its current position.

Parameters:
  • objectID[in] The ID of the target object

  • xOffset[in] The new relative X offset of the cursor

  • yOffset[in] The new relative Y offset of the cursor

Returns:

true if the message was sent successfully

bool send_set_foreground_colour(std::uint16_t objectID, std::uint8_t colour)

Sends the set foreground colour command.

This command modifies the foreground colour attribute.The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • colour[in] See standard colour palette, 0-255

Returns:

true if the message is being sent successfully

bool send_set_background_colour(std::uint16_t objectID, std::uint8_t colour)

Sends the set background colour command.

This command modifies the background colour attribute.The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • colour[in] See standard colour palette, 0-255

Returns:

true if the message is being sent successfully

bool send_set_line_attributes_object_id(std::uint16_t objectID, std::uint16_t lineAttributeobjectID)

Sends the set line attributes object id.

This command modifies the Output Line object attribute. All drawing commands that follow use the new attribute value. For line suppression, set the Object ID to NULL. The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • lineAttributeobjectID[in] The object ID of the line attribute

Returns:

true if the message is being sent successfully

bool send_set_fill_attributes_object_id(std::uint16_t objectID, std::uint16_t fillAttributeobjectID)

Sends the fill attributes object id.

This command modifies the fill object attribute. All drawing commands that follow use the new attribute value. For no filling, set the Object ID to NULL. The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • fillAttributeobjectID[in] The object ID of the fill attribute

Returns:

true if the message is being sent successfully

bool send_set_font_attributes_object_id(std::uint16_t objectID, std::uint16_t fontAttributesObjectID)

Sends the set fill attributes object ID command.

This command modifies the font object attribute. All drawing commands that follow use the new attribute value. If text is not being used, the object can be set to NULL. The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • fontAttributesObjectID[in] The object ID of the font attribute

Returns:

true if the message is being sent successfully

bool send_erase_rectangle(std::uint16_t objectID, std::uint16_t width, std::uint16_t height)

Sends the erase rectangle command.

Fills the rectangle at the graphics cursor using the current background colour.For this command, the Fill Attributes Object is not used regardless of the state of Options bit 1 The graphics cursor is moved to the bottom right pixel inside of the rectangle.

Parameters:
  • objectID[in] The ID of the target object

  • width[in] The width of the rectangle

  • height[in] The height of the rectangle

Returns:

true if the message is being sent successfully

bool send_draw_point(std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)

Sends the draw point command.

Sets the pixel to the foreground colour. The graphics cursor is moved to the defined point.

Parameters:
  • objectID[in] The ID of the target object

  • xOffset[in] The pixel X offset relative to the cursor

  • yOffset[in] The pixel Y offset relative to the cursor

Returns:

true if the message is being sent successfully

bool send_draw_line(std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)

Sends the draw line command.

Draws a line from the graphics cursor to the specified end pixel using the foreground colour. The Output Line Object drawing rules apply with respect to the end pixel location and Line Attributes.The graphics cursor is moved to the specified end pixel.

Parameters:
  • objectID[in] The ID of the target object

  • xOffset[in] The pixel X offset relative to the cursor

  • yOffset[in] The pixel Y offset relative to the cursor

Returns:

true if the message is being sent successfully

bool send_draw_rectangle(std::uint16_t objectID, std::uint16_t width, std::uint16_t height)

Sends the draw rectangle command.

Draws a rectangle at the graphics cursor. The Rectangle Object drawing rules apply.If a Line Attributes object is currently defined, the border is drawn. If a fill attribute object is currently defined, the rectangle is filled.The graphics cursor is moved to the bottom right pixel inside of the rectangle.

Parameters:
  • objectID[in] The ID of the target object

  • width[in] The width of the rectangle (px)

  • height[in] The height of the rectangle (px)

Returns:

true if the message is being sent successfully

bool send_draw_closed_ellipse(std::uint16_t objectID, std::uint16_t width, std::uint16_t height)

Sends the draw closed ellipse message.

Draws a closed ellipse bounded by the rectangle defined by the current graphics cursor location and the width and height given.The Output Ellipse object drawing rules apply.If a Line Attributes object is currently defined, the border is drawn.If a fill attribute object is currently defined, the ellipse is filled. The graphics cursor is moved to the bottom right pixel inside of the bounding rectangle.

Parameters:
  • objectID[in] The ID of the target object

  • width[in] The width of the ellipse (px)

  • height[in] The height of the ellipse (px)

Returns:

true if the message is being sent successfully

bool send_draw_polygon(std::uint16_t objectID, std::uint8_t numberOfPoints, const std::int16_t *listOfXOffsetsRelativeToCursor, const std::int16_t *listOfYOffsetsRelativeToCursor)

Sends the draw polygon command.

Draws a polygon from the graphics cursor to the first point, then to the second point and so on. The polygon is closed if the last point has the offset 0,0. This is because offset 0,0 gives the coordinates of the original graphics cursor which was used as the first point in the polygon. If the data does not close the polygon, no automatic closing is performed and filling is ignored. Foreground colour is used for the border colour. The Output Polygon object drawing rules apply. If a Line Attributes object is currently defined, the border is drawn. If a fill object is currently defined and the polygon is closed, the polygon is filled. The graphics cursor is moved to the last point in the list.

Parameters:
  • objectID[in] The ID of the target object

  • numberOfPoints[in] Number of points in the polygon

  • listOfXOffsetsRelativeToCursor[in] A list of X offsets for the points, relative to the cursor

  • listOfYOffsetsRelativeToCursor[in] A list of Y offsets for the points, relative to the cursor

Returns:

true if the message is being sent successfully

bool send_draw_text(std::uint16_t objectID, bool transparent, std::uint8_t textLength, const char *value)

Sends the draw text command.

Draws the given text using the Font Attributes object. Any flashing bits in the Font style of the Font Attributes object are ignored If opaque, the background colour attribute is used.The graphics cursor is moved to the bottom right corner of the extent of the text.

Parameters:
  • objectID[in] The ID of the target object

  • transparent[in] Denotes if the text background is transparent

  • textLength[in] String length

  • value[in] A buffer to the text to draw with length textLength

Returns:

true if the message is being sent successfully

bool send_pan_viewport(std::uint16_t objectID, std::int16_t xAttribute, std::int16_t yAttribute)

Sends the pan viewport command.

This command modifies the viewport X and Y attributes and forces a redraw of the object.This allows �panning� of the underlying object contents. The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • xAttribute[in] The viewport X attribute

  • yAttribute[in] The viewport Y attribute

Returns:

true if the message is being sent successfully

bool send_zoom_viewport(std::uint16_t objectID, float zoom)

Sends the zoom viewport command.

This command allows magnification of the viewport contents. See section on zooming for meaning of the zoom value. The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • zoom[in] Zoom value, -32.0 to 32.0

Returns:

true if the message is being sent successfully

bool send_pan_and_zoom_viewport(std::uint16_t objectID, std::int16_t xAttribute, std::int16_t yAttribute, float zoom)

Sends the pan and zoom viewport command.

This command allows both panning and zooming at the same time.

Parameters:
  • objectID[in] The ID of the target object

  • xAttribute[in] The viewport X attribute

  • yAttribute[in] The viewport Y attribute

  • zoom[in] Zoom value, -32.0 to 32.0

Returns:

true if the message is being sent successfully

bool send_change_viewport_size(std::uint16_t objectID, std::uint16_t width, std::uint16_t height)

Sends the change viewport size command.

This command changes the size of the viewport and can be compared to the normal Change Size command.The graphics cursor is not moved.

Parameters:
  • objectID[in] The ID of the target object

  • width[in] The width of the viewport

  • height[in] The height of the viewport

Returns:

true if the message is being sent successfully

bool send_draw_vt_object(std::uint16_t graphicsContextObjectID, std::uint16_t VTObjectID)

Sends the draw VT object command.

his command draws the VT Object specified by the Object ID at the current graphics cursor location.

Parameters:
  • graphicsContextObjectID[in] The ID of the target graphics context object

  • VTObjectID[in] The object ID to draw

Returns:

true if the message is being sent successfully

bool send_copy_canvas_to_picture_graphic(std::uint16_t graphicsContextObjectID, std::uint16_t objectID)

Sends the copy canvas to picture graphic command.

This command copies the current canvas of the Graphics Context Object into the Picture Graphic object specified.

Parameters:
  • graphicsContextObjectID[in] The ID of the target graphics context object

  • objectID[in] The picture graphic’s object ID to copy to

Returns:

true if the message is being sent successfully

bool send_copy_viewport_to_picture_graphic(std::uint16_t graphicsContextObjectID, std::uint16_t objectID)

Sends the copy viewport to picture graphic command.

This command copies the current Viewport of the GCO into the specified picture graphic.

Parameters:
  • graphicsContextObjectID[in] The ID of the target graphics context object

  • objectID[in] The picture graphic’s object ID to copy to

Returns:

true if the message is being sent successfully

bool send_get_attribute_value(std::uint16_t objectID, std::uint8_t attributeID)

Sends the get attribute value message.

Parameters:
  • objectID[in] The object ID to query

  • attributeID[in] The attribute object to query

Returns:

true if the message is being sent successfully

std::uint8_t get_softkey_x_axis_pixels() const

Returns the number of X axis pixels in a softkey.

Returns:

The number of X axis pixels in a softkey

std::uint8_t get_softkey_y_axis_pixels() const

Returns the number of Y axis pixels in a softkey.

Returns:

The number of Y axis pixels in a softkey

std::uint8_t get_number_virtual_softkeys() const

Returns the number of virtual softkeys reported by the VT server.

Returns:

The number of virtual softkeys reported by the VT server

std::uint8_t get_number_physical_softkeys() const

Returns the number of physical softkeys reported by the VT server.

Returns:

The number of physical softkeys reported by the VT server

bool get_font_size_supported(FontSize value) const

Returns if the selected font is supported.

Parameters:

value[in] The font to check against

Returns:

true if the font is supported by the VT server

bool get_font_style_supported(FontStyleBits value) const

Returns if the selected font style is supported.

Parameters:

value[in] The font style to check against

Returns:

true if the font style is supported by the VT server

GraphicMode get_graphic_mode() const

Returns the graphics mode supported by the VT server.

Returns:

The graphics mode supported by the VT server

bool get_support_touchscreen_with_pointing_message() const

Returns if the VT server supports a touchscreen with pointing message.

Returns:

true if the VT server supports a touchscreen with pointing message

bool get_support_pointing_device_with_pointing_message() const

Returns if the VT server supports a pointing device with pointing message.

Returns:

true if the VT server supports a pointing device with pointing message

bool get_multiple_frequency_audio_output() const

Returns if the VT server supports multiple frequency audio output.

Returns:

true if the VT server supports multiple frequency audio output

bool get_has_adjustable_volume_output() const

Returns if the VT server supports adjustable volume output.

Returns:

true if the VT server supports adjustable volume output

bool get_support_simultaneous_activation_physical_keys() const

Returns if the VT server supports simultaneous activation of physical keys.

Returns:

true if the VT server supports simultaneous activation of physical keys

bool get_support_simultaneous_activation_buttons_and_softkeys() const

Returns if the VT server supports simultaneous activation of buttons and softkeys.

Returns:

true if the VT server supports simultaneous activation of buttons and softkeys

bool get_support_drag_operation() const

Returns if the VT supports the drag operation.

Returns:

true if the VT supports the drag operation

bool get_support_intermediate_coordinates_during_drag_operations() const

Returns if the VT supports the intermediate coordinates during a drag operation.

Returns:

true if the VT supports the intermediate coordinates during a drag operation

std::uint16_t get_number_x_pixels() const

Returns the number of x pixels in the data mask area.

Returns:

the number of x pixels in the data mask area

std::uint16_t get_number_y_pixels() const

Returns the number of y pixels in the data mask area.

Returns:

the number of y pixels in the data mask area

VTVersion get_connected_vt_version() const

Returns the VT version supported supported by the VT server.

Returns:

The VT version supported supported by the VT server

bool is_vt_version_supported(VTVersion value) const

Returns whether the VT version is supported by the VT server.

Parameters:

value[in] The VT version to check against

Returns:

true if the VT version is supported by the VT server

std::uint16_t get_visible_data_mask() const

Returns the current data mask displayed by the VT server.

Returns:

The object ID of the data mask visible

std::uint16_t get_visible_soft_key_mask() const

Returns the current soft key mask displayed by the VT server.

Returns:

The object ID of the soft key mask visible

void set_object_pool(std::uint8_t poolIndex, const std::uint8_t *pool, std::uint32_t size, std::string version = "")

Assigns an object pool to the client using a buffer and size.

This is good for small pools or pools where you have all the data in memory.

Parameters:
  • poolIndex[in] The index of the pool you are assigning

  • pool[in] A pointer to the object pool. Must remain valid until client is connected!

  • size[in] The object pool size

  • version[in] An optional version string. The stack will automatically store/load your pool from the VT if this is provided.

void set_object_pool(std::uint8_t poolIndex, const std::vector<std::uint8_t> *pool, std::string version = "")

Assigns an object pool to the client using a vector.

This is good for small pools or pools where you have all the data in memory.

Parameters:
  • poolIndex[in] The index of the pool you are assigning

  • pool[in] A pointer to the object pool. Must remain valid until client is connected!

  • version[in] An optional version string. The stack will automatically store/load your pool from the VT if this is provided.

void set_object_pool_scaling(std::uint8_t poolIndex, std::uint32_t originalDataMaskDimensions_px, std::uint32_t originalSoftKyeDesignatorHeight_px)

Configures an object pool to be automatically scaled to match the target VT server.

Parameters:
  • poolIndex[in] The index of the pool you want to auto-scale

  • originalDataMaskDimensions_px[in] The data mask width that your object pool was originally designed for

  • originalSoftKyeDesignatorHeight_px[in] The soft key designator width that your object pool was originally designed for

void register_object_pool_data_chunk_callback(std::uint8_t poolIndex, std::uint32_t poolTotalSize, DataChunkCallback value, std::string version = "")

Assigns an object pool to the client where the client will get data in chunks during upload.

This is probably better for huge pools if you are RAM constrained, or if your pool is stored on some external device that you need to get data from in pages. This is also the best way to load from IOP files, as you can read the data in piece by piece.

Parameters:
  • poolIndex[in] The index of the pool you are assigning

  • poolTotalSize[in] The object pool size

  • value[in] The data callback that will be used to get object pool data to upload.

  • version[in] An optional version string. The stack will automatically store/load your pool from the VT if this is provided.

void update()

Periodic Update Function (worker thread may call this)

This class can spawn a thread, or you can supply your own to run this function. To configure that behavior, see the initialize function.

Public Members

LanguageCommandInterface languageCommandInterface

Used to determine the language and unit systems in use by the VT server.

class AssignedAuxiliaryFunction

A struct for storing information of a function assigned to an auxiliary input.

Public Functions

AssignedAuxiliaryFunction(std::uint16_t functionObjectID, std::uint16_t inputObjectID, AuxiliaryTypeTwoFunctionType functionType)

Constructs a AssignedAuxiliaryFunction, sets default values.

Parameters:
  • functionObjectID[in] the object ID of the function present in our object pool

  • inputObjectID[in] the object ID assigned on the auxiliary inputs end

  • functionType[in] the type of function

bool operator==(const AssignedAuxiliaryFunction &other) const

Allows easy comparison of two AssignedAuxiliaryFunction objects.

Parameters:

other[in] the object to compare against

Returns:

true if the objects are equal, false otherwise

Public Members

std::uint16_t functionObjectID

The object ID of the function present in our object pool.

std::uint16_t inputObjectID

The object ID assigned on the auxiliary inputs end.

AuxiliaryTypeTwoFunctionType functionType

The type of function.

struct AuxiliaryFunctionEvent

A struct for storing information of an auxilary function event.

Public Members

AssignedAuxiliaryFunction function

The function.

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t value1

The first value.

std::uint16_t value2

The second value.

struct VTAudioSignalTerminationEvent

A struct for storing information of a VT control audio signal termination event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

bool isTerminated

Whether the audio signal is terminated.

struct VTChangeActiveMaskEvent

A struct for storing information of a VT change active mask event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t maskObjectID

The mask object ID.

std::uint16_t errorObjectID

The error object ID.

std::uint16_t parentObjectID

The parent object ID.

bool missingObjects

Whether there are missing objects.

bool maskOrChildHasErrors

Whether the mask or child has errors.

bool anyOtherError

Whether there are any other errors.

bool poolDeleted

Whether the pool has been deleted.

struct VTChangeNumericValueEvent

A struct for storing information of a VT change numeric value event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint32_t value

The value.

std::uint16_t objectID

The object ID.

struct VTChangeSoftKeyMaskEvent

A struct for storing information of a VT change soft key mask event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t dataOrAlarmMaskObjectID

The data or alarm mask object ID.

std::uint16_t softKeyMaskObjectID

The soft key mask object ID.

bool missingObjects

Whether there are missing objects.

bool maskOrChildHasErrors

Whether the mask or child has errors.

bool anyOtherError

Whether there are any other errors.

bool poolDeleted

Whether the pool has been deleted.

struct VTChangeStringValueEvent

A struct for storing information of a VT change string value event.

Public Members

std::string value

The value.

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t objectID

The object ID.

struct VTESCMessageEvent

A struct for storing information of a VT ESC message event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t objectID

The object ID.

ESCMessageErrorCode errorCode

The error code.

struct VTKeyEvent

A struct for storing information of a VT key input event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t objectID

The object ID.

std::uint16_t parentObjectID

The parent object ID.

std::uint8_t keyNumber

The key number.

KeyActivationCode keyEvent

The key event.

struct VTPointingEvent

A struct for storing information of a VT pointing event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t xPosition

The x position.

std::uint16_t yPosition

The y position.

std::uint16_t parentObjectID

The parent object ID.

KeyActivationCode keyEvent

The key event.

struct VTSelectInputObjectEvent

A struct for storing information of a VT input object selection event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t objectID

The object ID.

bool objectSelected

Whether the object is selected.

bool objectOpenForInput

Whether the object is open for input.

struct VTUserLayoutHideShowEvent

A struct for storing information of a VT on user-layout hide/show event.

Public Members

VirtualTerminalClient *parentPointer

A pointer to the parent VT client.

std::uint16_t objectID

The object ID.

bool isHidden

Whether the object is hidden.