AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
isobus::VirtualTerminalClient Class Reference

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

#include <isobus_virtual_terminal_client.hpp>

Collaboration diagram for isobus::VirtualTerminalClient:
[legend]

Classes

class  AssignedAuxiliaryFunction
 A struct for storing information of a function assigned to an auxiliary input. More...
 
struct  AssignedAuxiliaryInputDevice
 A struct for storing information about an auxiliary input device. More...
 
struct  AuxiliaryFunctionEvent
 A struct for storing information of an auxilary function event. More...
 
struct  AuxiliaryInputState
 Struct for storing the state of an auxiliary input on our device. More...
 
struct  ObjectPoolDataStruct
 An object for storing information regarding an object pool upload. More...
 
struct  VTAudioSignalTerminationEvent
 A struct for storing information of a VT control audio signal termination event. More...
 
struct  VTChangeActiveMaskEvent
 A struct for storing information of a VT change active mask event. More...
 
struct  VTChangeNumericValueEvent
 A struct for storing information of a VT change numeric value event. More...
 
struct  VTChangeSoftKeyMaskEvent
 A struct for storing information of a VT change soft key mask event. More...
 
struct  VTChangeStringValueEvent
 A struct for storing information of a VT change string value event. More...
 
struct  VTESCMessageEvent
 A struct for storing information of a VT ESC message event. More...
 
struct  VTKeyEvent
 A struct for storing information of a VT key input event. More...
 
struct  VTPointingEvent
 A struct for storing information of a VT pointing event. More...
 
struct  VTSelectInputObjectEvent
 A struct for storing information of a VT input object selection event. More...
 
struct  VTUserLayoutHideShowEvent
 A struct for storing information of a VT on user-layout hide/show event. More...
 

Public Types

enum class  Function : std::uint8_t {
  SoftKeyActivationMessage = 0x00 , ButtonActivationMessage = 0x01 , PointingEventMessage = 0x02 , VTSelectInputObjectMessage = 0x03 ,
  VTESCMessage = 0x04 , VTChangeNumericValueMessage = 0x05 , VTChangeActiveMaskMessage = 0x06 , VTChangeSoftKeyMaskMessage = 0x07 ,
  VTChangeStringValueMessage = 0x08 , VTOnUserLayoutHideShowMessage = 0x09 , VTControlAudioSignalTerminationMessage = 0x0A , ObjectPoolTransferMessage = 0x11 ,
  EndOfObjectPoolMessage = 0x12 , AuxiliaryAssignmentTypeOneCommand = 0x20 , AuxiliaryInputTypeOneStatus = 0x21 , PreferredAssignmentCommand = 0x22 ,
  AuxiliaryInputTypeTwoMaintenanceMessage = 0x23 , AuxiliaryAssignmentTypeTwoCommand = 0x24 , AuxiliaryInputStatusTypeTwoEnableCommand = 0x25 , AuxiliaryInputTypeTwoStatusMessage = 0x26 ,
  AuxiliaryCapabilitiesRequest = 0x27 , SelectActiveWorkingSet = 0x90 , ESCCommand = 0x92 , HideShowObjectCommand = 0xA0 ,
  EnableDisableObjectCommand = 0xA1 , SelectInputObjectCommand = 0xA2 , ControlAudioSignalCommand = 0xA3 , SetAudioVolumeCommand = 0xA4 ,
  ChangeChildLocationCommand = 0xA5 , ChangeSizeCommand = 0xA6 , ChangeBackgroundColourCommand = 0xA7 , ChangeNumericValueCommand = 0xA8 ,
  ChangeEndPointCommand = 0xA9 , ChangeFontAttributesCommand = 0xAA , ChangeLineAttributesCommand = 0xAB , ChangeFillAttributesCommand = 0xAC ,
  ChangeActiveMaskCommand = 0xAD , ChangeSoftKeyMaskCommand = 0xAE , ChangeAttributeCommand = 0xAF , ChangePriorityCommand = 0xB0 ,
  ChangeListItemCommand = 0xB1 , DeleteObjectPoolCommand = 0xB2 , ChangeStringValueCommand = 0xB3 , ChangeChildPositionCommand = 0xB4 ,
  ChangeObjectLabelCommand = 0xB5 , ChangePolygonPointCommand = 0xB6 , ChangePolygonScaleCommand = 0xB7 , GraphicsContextCommand = 0xB8 ,
  GetAttributeValueMessage = 0xB9 , SelectColourMapCommand = 0xBA , IdentifyVTMessage = 0xBB , ExecuteExtendedMacroCommand = 0xBC ,
  LockUnlockMaskCommand = 0xBD , ExecuteMacroCommand = 0xBE , GetMemoryMessage = 0xC0 , GetSupportedWidecharsMessage = 0xC1 ,
  GetNumberOfSoftKeysMessage = 0xC2 , GetTextFontDataMessage = 0xC3 , GetWindowMaskDataMessage = 0xC4 , GetSupportedObjectsMessage = 0xC5 ,
  GetHardwareMessage = 0xC7 , StoreVersionCommand = 0xD0 , LoadVersionCommand = 0xD1 , DeleteVersionCommand = 0xD2 ,
  ExtendedGetVersionsMessage = 0xD3 , ExtendedStoreVersionCommand = 0xD4 , ExtendedLoadVersionCommand = 0xD5 , ExtendedDeleteVersionCommand = 0xD6 ,
  GetVersionsMessage = 0xDF , GetVersionsResponse = 0xE0 , UnsupportedVTFunctionMessage = 0xFD , VTStatusMessage = 0xFE ,
  WorkingSetMaintenanceMessage = 0xFF
}
 Enumerates the multiplexor byte values for VT commands. More...
 
enum class  HideShowObjectCommand : std::uint8_t { HideObject = 0 , ShowObject = 1 }
 Enumerates the states that can be sent with a hide/show object command. More...
 
enum class  EnableDisableObjectCommand : std::uint8_t { DisableObject = 0 , EnableObject = 1 }
 Enumerates the states that can be sent with an enable/disable object command. More...
 
enum class  SelectInputObjectOptions : std::uint8_t { ActivateObjectForDataInput = 0x00 , SetFocusToObject = 0xFF }
 Enumerates the states that can be sent with a select input object options command. More...
 
enum class  VTVersion {
  Version2OrOlder , Version3 , Version4 , Version5 ,
  Version6 , ReservedOrUnknown
}
 The different VT versions that a client or server might support. More...
 
enum class  LineDirection : std::uint8_t { TopLeftToBottomRightOfEnclosingVirtualRectangle = 0 , BottomLeftToTopRightOfEnclosingVirtualRectangle = 1 }
 Enumerates the different line directions that can be used when changing an endpoint of an object. More...
 
enum class  FontSize : std::uint8_t {
  Size6x8 = 0 , Size8x8 = 1 , Size8x12 = 2 , Size12x16 = 3 ,
  Size16x16 = 4 , Size16x24 = 5 , Size24x32 = 6 , Size32x32 = 7 ,
  Size32x48 = 8 , Size48x64 = 9 , Size64x64 = 10 , Size64x96 = 11 ,
  Size96x128 = 12 , Size128x128 = 13 , Size128x192 = 14
}
 Enumerates the different font sizes. More...
 
enum class  FontStyleBits : std::uint8_t {
  Bold = 0 , CrossedOut = 1 , Underlined = 2 , Italic = 3 ,
  Inverted = 4 , Flashing = 5 , FlashingHidden = 6 , ProportionalFontRendering = 7
}
 Enumerates the font style options that can be encoded in a font style bitfield. More...
 
enum class  FontType : std::uint8_t {
  ISO8859_1 = 0 , ISO8859_15 = 1 , ISO8859_2 = 2 , Reserved_1 = 3 ,
  ISO8859_4 = 4 , ISO8859_5 = 5 , Reserved_2 = 6 , ISO8859_7 = 7 ,
  ReservedEnd = 239 , ProprietaryBegin = 240 , ProprietaryEnd = 255
}
 Enumerates the different font types. More...
 
enum class  FillType : std::uint8_t { NoFill = 0 , FillWithLineColour = 1 , FillWithSpecifiedColourInFillColourAttribute = 2 , FillWithPatternGivenByFillPatternAttribute = 3 }
 Enumerates the different fill types for an object. More...
 
enum class  MaskType : std::uint8_t { DataMask = 1 , AlarmMask = 2 }
 The types of object pool masks. More...
 
enum class  AlarmMaskPriority : std::uint8_t { High = 0 , Medium = 1 , Low = 2 }
 The allowable priorities of an alarm mask. More...
 
enum class  MaskLockState : std::uint8_t { UnlockMask = 0 , LockMask = 1 }
 Denotes the lock/unlock state of a mask. Used to freeze/unfreeze rendering of a mask. More...
 
enum class  KeyActivationCode : std::uint8_t { ButtonUnlatchedOrReleased = 0 , ButtonPressedOrLatched = 1 , ButtonStillHeld = 2 , ButtonPressAborted = 3 }
 The different key activation codes that a button press can generate. More...
 
enum class  ESCMessageErrorCode : std::uint8_t { NoError = 0 , NoInputFieldOpen = 1 , OtherError = 5 }
 Enumerates the errors that can be present in an ESC message. More...
 
enum class  MacroEventID : std::uint8_t {
  Reserved = 0 , OnActivate = 1 , OnDeactivate = 2 , OnShow = 3 ,
  OnHide = 4 , OnEnable = 5 , OnDisable = 6 , OnChangeActiveMask = 7 ,
  OnChangeSoftKeyMask = 8 , OnChangeAttribute = 9 , OnChangeBackgroundColour = 10 , OnChangeFontAttributes = 11 ,
  OnChangeLineAttributes = 12 , OnChangeFillAttributes = 13 , OnChangeChildLocation = 14 , OnChangeSize = 15 ,
  OnChangeValue = 16 , OnChangePriority = 17 , OnChangeEndPoint = 18 , OnInputFieldSelection = 19 ,
  OnInputFieldDeselection = 20 , OnESC = 21 , OnEntryOfValue = 22 , OnEntryOfNewValue = 23 ,
  OnKeyPress = 24 , OnKeyRelease = 25 , OnChangeChildPosition = 26 , OnPointingEventPress = 27 ,
  OnPointingEventRelease = 28 , ReservedBegin = 29 , ReservedEnd = 254 , UseExtendedMacroReference = 255
}
 Enumerates the different events that can be associated with a macro. More...
 
enum class  GraphicMode : std::uint8_t { Monochrome = 0 , SixteenColour = 1 , TwoHundredFiftySixColour = 2 }
 Enumerates the various VT server graphics modes. More...
 
enum class  AuxiliaryTypeTwoFunctionType : std::uint8_t {
  BooleanLatching = 0 , AnalogueLatching = 1 , BooleanMomentary = 2 , AnalogueMomentaryTwoWay = 3 ,
  AnalogueMomentaryOneWay = 4 , DualBooleanLatching = 5 , DualBooleanMomentary = 6 , DualBooleanLatchingUpOnly = 7 ,
  DualBooleanLatchingDownpOnly = 8 , AnalogueMomentaryBooleanLatching = 9 , AnalogueLatchingBooleanLatching = 10 , QuadratureBooleanMomentary = 11 ,
  QuadratureAnalogueLatching = 12 , QuadratureAnalogueMomentary = 13 , BidirectionalEncoder = 14 , Reserved = 30 ,
  ReservedRemoveAssignment = 31
}
 Enumerates the various auxiliary input function types. More...
 
enum class  StateMachineState : std::uint8_t {
  Disconnected , WaitForPartnerVTStatusMessage , SendWorkingSetMasterMessage , ReadyForObjectPool ,
  SendGetMemory , WaitForGetMemoryResponse , SendGetNumberSoftkeys , WaitForGetNumberSoftKeysResponse ,
  SendGetTextFontData , WaitForGetTextFontDataResponse , SendGetHardware , WaitForGetHardwareResponse ,
  SendGetVersions , WaitForGetVersionsResponse , SendStoreVersion , WaitForStoreVersionResponse ,
  SendLoadVersion , WaitForLoadVersionResponse , UploadObjectPool , SendEndOfObjectPool ,
  WaitForEndOfObjectPoolResponse , Connected , Failed
}
 The internal state machine state of the VT client, mostly just public so tests can access it. More...
 

Public Member Functions

 VirtualTerminalClient (std::shared_ptr< PartneredControlFunction > partner, std::shared_ptr< InternalControlFunction > clientSource)
 The constructor for a VirtualTerminalClient.
 
 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.
 
bool get_is_initialized () const
 Returns if the client has been initialized.
 
bool get_is_connected () const
 Check whether the client is connected to the VT server.
 
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< PartneredControlFunctionget_partner_control_function () const
 Returns the control function of the VT server with which this VT client communicates.
 
std::shared_ptr< InternalControlFunctionget_internal_control_function () const
 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.
 
EventDispatcher< VTKeyEvent > & get_vt_soft_key_event_dispatcher ()
 The event dispatcher for when a soft key is pressed or released.
 
EventDispatcher< VTKeyEvent > & get_vt_button_event_dispatcher ()
 The event dispatcher for when a button is pressed or released.
 
EventDispatcher< VTPointingEvent > & get_vt_pointing_event_dispatcher ()
 The event dispatcher for when a pointing event is "pressed or released".
 
EventDispatcher< VTSelectInputObjectEvent > & get_vt_select_input_object_event_dispatcher ()
 The event dispatcher for when an input object event is triggered.
 
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.
 
EventDispatcher< VTChangeNumericValueEvent > & get_vt_change_numeric_value_event_dispatcher ()
 The event dispatcher for when a numeric value is changed in an input object.
 
EventDispatcher< VTChangeActiveMaskEvent > & get_vt_change_active_mask_event_dispatcher ()
 The event dispatcher for when the active mask is changed.
 
EventDispatcher< VTChangeSoftKeyMaskEvent > & get_vt_change_soft_key_mask_event_dispatcher ()
 The event dispatcher for when the soft key mask is changed.
 
EventDispatcher< VTChangeStringValueEvent > & get_vt_change_string_value_event_dispatcher ()
 The event dispatcher for when a string value is changed.
 
EventDispatcher< VTUserLayoutHideShowEvent > & get_vt_user_layout_hide_show_event_dispatcher ()
 The event dispatcher for when a user-layout object is hidden or shown.
 
EventDispatcher< VTAudioSignalTerminationEvent > & get_vt_control_audio_signal_termination_event_dispatcher ()
 The event dispatcher for when an audio signal is terminated.
 
EventDispatcher< AuxiliaryFunctionEvent > & get_auxiliary_function_event_dispatcher ()
 The event dispatcher for for when a change in auxiliary input for a function is received.
 
void set_auxiliary_input_model_identification_code (std::uint16_t modelIdentificationCode)
 Set the model identification code of our auxiliary input device.
 
bool get_auxiliary_input_learn_mode_enabled () const
 Get whether 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.
 
void remove_auxiliary_input_object_id (const std::uint16_t auxiliaryInputID)
 Remove an auxiliary input from the pool of managed auxiliary inputs.
 
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.
 
bool send_hide_show_object (std::uint16_t objectID, HideShowObjectCommand command)
 Sends a hide/show object command.
 
bool send_enable_disable_object (std::uint16_t objectID, EnableDisableObjectCommand command)
 Sends an enable/disable object command.
 
bool send_select_input_object (std::uint16_t objectID, SelectInputObjectOptions option)
 Sends a select input object command.
 
bool send_ESC ()
 Sends the ESC message (Escape)
 
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.
 
bool send_set_audio_volume (std::uint8_t volume_percent)
 Sends the set audio volume command.
 
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.
 
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.
 
bool send_change_size_command (std::uint16_t objectID, std::uint16_t newWidth, std::uint16_t newHeight)
 Sends the change size command.
 
bool send_change_background_colour (std::uint16_t objectID, std::uint8_t colour)
 Sends the change background colour command.
 
bool send_change_numeric_value (std::uint16_t objectID, std::uint32_t value)
 Sends the change numeric value command.
 
bool send_change_string_value (std::uint16_t objectID, uint16_t stringLength, const char *value)
 Sends the change string value command.
 
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)
 
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.
 
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.
 
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.
 
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.
 
bool send_change_active_mask (std::uint16_t workingSetObjectID, std::uint16_t newActiveMaskObjectID)
 Sends the change active mask command.
 
bool send_change_softkey_mask (MaskType type, std::uint16_t dataOrAlarmMaskObjectID, std::uint16_t newSoftKeyMaskObjectID)
 Sends the change softkey mask command.
 
bool send_change_attribute (std::uint16_t objectID, std::uint8_t attributeID, std::uint32_t value)
 Sends the change attribute command.
 
bool send_change_attribute (std::uint16_t objectID, std::uint8_t attributeID, float value)
 Sends the change attribute command (for float values)
 
bool send_change_priority (std::uint16_t alarmMaskObjectID, AlarmMaskPriority priority)
 Sends the change priority command.
 
bool send_change_list_item (std::uint16_t objectID, std::uint8_t listIndex, std::uint16_t newObjectID)
 Sends the change list item command.
 
bool send_lock_unlock_mask (MaskLockState state, std::uint16_t objectID, std::uint16_t timeout_ms)
 Sends the lock unlock mask command.
 
bool send_execute_macro (std::uint16_t objectID)
 Sends the execute macro command.
 
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.
 
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.
 
bool send_change_polygon_scale (std::uint16_t objectID, std::uint16_t widthAttribute, std::uint16_t heightAttribute)
 Sends the change polygon scale command.
 
bool send_select_colour_map_or_palette (std::uint16_t objectID)
 Sends the select colour map or palette command.
 
bool send_execute_extended_macro (std::uint16_t objectID)
 Sends the execute extended macro command.
 
bool send_select_active_working_set (std::uint64_t NAMEofWorkingSetMasterForDesiredWorkingSet)
 Sends the select active working set command.
 
bool send_set_graphics_cursor (std::uint16_t objectID, std::int16_t xPosition, std::int16_t yPosition)
 Sends the set graphics cursor command.
 
bool send_move_graphics_cursor (std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)
 Sends the move graphics cursor command.
 
bool send_set_foreground_colour (std::uint16_t objectID, std::uint8_t colour)
 Sends the set foreground colour command.
 
bool send_set_background_colour (std::uint16_t objectID, std::uint8_t colour)
 Sends the set background colour command.
 
bool send_set_line_attributes_object_id (std::uint16_t objectID, std::uint16_t lineAttributeobjectID)
 Sends the set line attributes object id.
 
bool send_set_fill_attributes_object_id (std::uint16_t objectID, std::uint16_t fillAttributeobjectID)
 Sends the fill attributes object id.
 
bool send_set_font_attributes_object_id (std::uint16_t objectID, std::uint16_t fontAttributesObjectID)
 Sends the set fill attributes object ID command.
 
bool send_erase_rectangle (std::uint16_t objectID, std::uint16_t width, std::uint16_t height)
 Sends the erase rectangle command.
 
bool send_draw_point (std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)
 Sends the draw point command.
 
bool send_draw_line (std::uint16_t objectID, std::int16_t xOffset, std::int16_t yOffset)
 Sends the draw line command.
 
bool send_draw_rectangle (std::uint16_t objectID, std::uint16_t width, std::uint16_t height)
 Sends the draw rectangle command.
 
bool send_draw_closed_ellipse (std::uint16_t objectID, std::uint16_t width, std::uint16_t height)
 Sends the draw closed ellipse message.
 
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.
 
bool send_draw_text (std::uint16_t objectID, bool transparent, std::uint8_t textLength, const char *value)
 Sends the draw text command.
 
bool send_pan_viewport (std::uint16_t objectID, std::int16_t xAttribute, std::int16_t yAttribute)
 Sends the pan viewport command.
 
bool send_zoom_viewport (std::uint16_t objectID, float zoom)
 Sends the zoom viewport command.
 
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.
 
bool send_change_viewport_size (std::uint16_t objectID, std::uint16_t width, std::uint16_t height)
 Sends the change viewport size command.
 
bool send_draw_vt_object (std::uint16_t graphicsContextObjectID, std::uint16_t VTObjectID)
 Sends the draw VT object command.
 
bool send_copy_canvas_to_picture_graphic (std::uint16_t graphicsContextObjectID, std::uint16_t objectID)
 Sends the copy canvas to picture graphic command.
 
bool send_copy_viewport_to_picture_graphic (std::uint16_t graphicsContextObjectID, std::uint16_t objectID)
 Sends the copy viewport to picture graphic command.
 
bool send_get_attribute_value (std::uint16_t objectID, std::uint8_t attributeID)
 Sends the get attribute value message.
 
std::uint8_t get_softkey_x_axis_pixels () const
 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.
 
std::uint8_t get_number_virtual_softkeys () const
 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.
 
bool get_font_size_supported (FontSize value) const
 Returns if the selected font is supported.
 
bool get_font_style_supported (FontStyleBits value) const
 Returns if the selected font style is supported.
 
GraphicMode get_graphic_mode () const
 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.
 
bool get_support_pointing_device_with_pointing_message () const
 Returns 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.
 
bool get_has_adjustable_volume_output () const
 Returns 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.
 
bool get_support_simultaneous_activation_buttons_and_softkeys () const
 Returns 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.
 
bool get_support_intermediate_coordinates_during_drag_operations () const
 Returns 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.
 
std::uint16_t get_number_y_pixels () const
 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.
 
bool is_vt_version_supported (VTVersion value) const
 Returns whether 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.
 
std::uint16_t get_visible_soft_key_mask () const
 Returns the current soft key mask displayed by the VT server.
 
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.
 
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.
 
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.
 
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.
 
void update ()
 Periodic Update Function (worker thread may call this)
 

Public Attributes

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

Protected Types

enum class  GraphicsContextSubCommandID : std::uint8_t {
  SetGraphicsCursor = 0x00 , MoveGraphicsCursor = 0x01 , SetForegroundColour = 0x02 , SetBackgroundColour = 0x03 ,
  SetLineAttributesObjectID = 0x04 , SetFillAttributesObjectID = 0x05 , SetFontAttributesObjectID = 0x06 , EraseRectangle = 0x07 ,
  DrawPoint = 0x08 , DrawLine = 0x09 , DrawRectangle = 0x0A , DrawClosedEllipse = 0x0B ,
  DrawPolygon = 0x0C , DrawText = 0x0D , PanViewport = 0x0E , ZoomViewport = 0x0F ,
  PanAndZoomViewport = 0x10 , ChangeViewportSize = 0x11 , DrawVTObject = 0x12 , CopyCanvasToPictureGraphic = 0x13 ,
  CopyViewportToPictureGraphic = 0x14
}
 Enumerates the command types for graphics context objects. More...
 
enum class  TransmitFlags : std::uint32_t { SendWorkingSetMaintenance = 0 , SendAuxiliaryMaintenance = 1 , NumberFlags }
 Flags used as a retry mechanism for sending important messages. More...
 
enum class  CurrentObjectPoolUploadState : std::uint8_t { Uninitialized , InProgress , Success , Failed }
 The different states of an object pool upload process. More...
 

Protected Member Functions

bool send_message_to_vt (const std::uint8_t *dataBuffer, std::uint32_t dataLength, CANIdentifier::CANPriority priority=CANIdentifier::CANPriority::Priority5) const
 Sends a message to the VT server.
 
bool send_delete_object_pool () const
 Sends the delete object pool message.
 
bool send_working_set_maintenance (bool initializing) const
 Sends the working set maintenance message.
 
bool send_get_memory (std::uint32_t requiredMemory) const
 Sends the get memory message.
 
bool send_get_number_of_softkeys () const
 Sends the get number of softkeys message.
 
bool send_get_text_font_data () const
 Sends the get text font data message.
 
bool send_get_hardware () const
 Sends the get hardware message.
 
bool send_get_supported_widechars () const
 Sends the get supported widechars message.
 
bool send_get_window_mask_data () const
 Sends the get window mask data message.
 
bool send_get_supported_objects () const
 Sends the get supported objects message.
 
bool send_get_versions () const
 Sends the get versions message.
 
bool send_store_version (std::array< std::uint8_t, 7 > versionLabel) const
 Sends the store version message.
 
bool send_load_version (std::array< std::uint8_t, 7 > versionLabel) const
 Sends the load version message.
 
bool send_delete_version (std::array< std::uint8_t, 7 > versionLabel) const
 Sends the delete version message.
 
bool send_extended_get_versions () const
 Sends the get extended versions message.
 
bool send_extended_store_version (std::array< std::uint8_t, 32 > versionLabel) const
 Sends the extended store version message.
 
bool send_extended_load_version (std::array< std::uint8_t, 32 > versionLabel) const
 Sends the extended load version message.
 
bool send_extended_delete_version (std::array< std::uint8_t, 32 > versionLabel) const
 Sends the extended delete version message.
 
bool send_end_of_object_pool () const
 Sends the end of object pool message.
 
bool send_working_set_master () const
 Sends the working set master message.
 
bool send_auxiliary_functions_preferred_assignment () const
 Send the preferred auxiliary control type 2 assignment command.
 
bool send_auxiliary_function_assignment_response (std::uint16_t functionObjectID, bool hasError, bool isAlreadyAssigned) const
 Send the auxiliary control type 2 assignment reponse message.
 
bool send_auxiliary_input_maintenance () const
 Send the auxiliary control type 2 maintenance message.
 
bool send_auxiliary_input_status_enable_response (std::uint16_t objectID, bool isEnabled, bool hasError) const
 Send the auxiliary input status type 2 enable response.
 
void update_auxiliary_input_status ()
 Send the auxiliary control type 2 status message for all inputs if applicable.
 
bool update_auxiliary_input_status (std::uint16_t objectID)
 Send the auxiliary control type 2 status message for a specific input if applicable.
 
void set_state (StateMachineState value)
 Sets the state machine state and updates the associated timestamp.
 
bool get_any_pool_needs_scaling () const
 Returns if any object pool had scaling configured.
 
bool scale_object_pools ()
 Iterates through each object pool and scales each object in the pool automatically.
 
FontSize get_font_or_next_smallest_font (FontSize originalFont) const
 Returns the closest font to the one you passed in, in decending order.
 
bool resize_object (std::uint8_t *buffer, float scaleFactor, VirtualTerminalObjectType type)
 Resizes a single VT object by some scale factor.
 
bool is_function_unsupported (Function function) const
 Extract from the cache whether a VT does not support a specific function.
 
bool is_function_unsupported (std::uint8_t functionCode) const
 Extract from the cache whether a VT does not support a specific function.
 
bool send_command (const std::vector< std::uint8_t > &data)
 Sends a command to the VT server.
 
bool queue_command (const std::vector< std::uint8_t > &data, bool replace=false)
 Tries to send a command to the VT server, and queues it if it fails.
 
bool replace_command (const std::vector< std::uint8_t > &data)
 Replaces the first message in the queue with the same function-code and priority, and removes the rest.
 
void process_command_queue ()
 Tries to send all messages in the queue.
 
void worker_thread_function ()
 The worker thread will execute this function when it runs, if applicable.
 

Static Protected Member Functions

static void process_flags (std::uint32_t flag, void *parent)
 Processes the internal Tx flags.
 
static void process_rx_message (const CANMessage &message, void *parentPointer)
 Processes a CAN message destined for any VT client.
 
static void process_callback (std::uint32_t parameterGroupNumber, std::uint32_t dataLength, std::shared_ptr< InternalControlFunction > sourceControlFunction, std::shared_ptr< ControlFunction > destinationControlFunction, bool successful, void *parentPointer)
 The callback passed to the network manager's send function to know when a Tx is completed.
 
static bool process_internal_object_pool_upload_callback (std::uint32_t callbackIndex, std::uint32_t bytesOffset, std::uint32_t numberOfBytesNeeded, std::uint8_t *chunkBuffer, void *parentPointer)
 The data callback passed to the network manger's send function for the transport layer messages.
 
static bool get_is_object_scalable (VirtualTerminalObjectType type)
 Returns if the specified object type can be scaled.
 
static FontSize remap_font_to_scale (FontSize originalFont, float scaleFactor)
 Remaps a font to some other font based on a scale factor This is not a one-size-fits-all solution, but should usually result in a compatible font.
 
static std::uint32_t get_minimum_object_length (VirtualTerminalObjectType type)
 Returns the minimum length that the specified object could possibly require in bytes.
 
static std::uint32_t get_number_bytes_in_object (std::uint8_t *buffer)
 Returns the total number of bytes in the VT object located at the specified memory location.
 
static void process_standard_object_height_and_width (std::uint8_t *buffer, float scaleFactor)
 Resizes the most common VT object format by some scale factor.
 

Protected Attributes

std::shared_ptr< PartneredControlFunctionpartnerControlFunction
 The partner control function this client will send to.
 
std::shared_ptr< InternalControlFunctionmyControlFunction
 The internal control function the client uses to send from.
 
ProcessingFlags txFlags
 A retry mechanism for internal Tx messages.
 
std::uint32_t lastVTStatusTimestamp_ms = 0
 The timestamp of the last VT status message.
 
std::uint16_t activeWorkingSetDataMaskObjectID = NULL_OBJECT_ID
 The active working set data mask object ID.
 
std::uint16_t activeWorkingSetSoftKeyMaskObjectID = NULL_OBJECT_ID
 The active working set's softkey mask object ID.
 
std::uint8_t activeWorkingSetMasterAddress = NULL_CAN_ADDRESS
 The active working set master address.
 
std::uint8_t busyCodesBitfield = 0
 The VT server's busy codes.
 
std::uint8_t currentCommandFunctionCode = 0
 The VT server's current command function code.
 
std::uint8_t connectedVTVersion = 0
 The VT server's supported max version.
 
std::uint8_t softKeyXAxisPixels = 0
 The size of a soft key X dimension as reported by the VT server.
 
std::uint8_t softKeyYAxisPixels = 0
 The size of a soft key Y dimension as reported by the VT server.
 
std::uint8_t numberVirtualSoftkeysPerSoftkeyMask = 0
 The number of virtual softkeys per softkey mask as reported by the VT server.
 
std::uint8_t numberPhysicalSoftkeys = 0
 The number of physical softkeys supported by the VT server.
 
std::uint8_t smallFontSizesBitfield = 0
 The small font sizes supported by the VT server.
 
std::uint8_t largeFontSizesBitfield = 0
 The large font sizes supported by the VT server.
 
std::uint8_t fontStylesBitfield = 0
 The text font capabilities supported by the VT server.
 
GraphicMode supportedGraphicsMode = GraphicMode::TwoHundredFiftySixColour
 The graphics mode reported by the VT server.
 
std::uint16_t xPixels = 0
 The x pixel dimension as reported by the VT server.
 
std::uint16_t yPixels = 0
 The y pixel dimension as reported by the VT server.
 
std::uint8_t hardwareFeaturesBitfield = 0
 The reported hardware features from the VT server.
 
StateMachineState state = StateMachineState::Disconnected
 The current client state machine state.
 
CurrentObjectPoolUploadState currentObjectPoolState = CurrentObjectPoolUploadState::Uninitialized
 The current upload state of the object pool being processed.
 
std::uint32_t stateMachineTimestamp_ms = 0
 Timestamp from the last state machine update.
 
std::uint32_t lastWorkingSetMaintenanceTimestamp_ms = 0
 The timestamp from the last time we sent the maintenance message.
 
std::uint32_t lastAuxiliaryMaintenanceTimestamp_ms = 0
 The timestamp from the last time we sent the maintenance message.
 
std::vector< ObjectPoolDataStructobjectPools
 A container to hold all object pools that have been assigned to the interface.
 
std::vector< std::uint8_t > unsupportedFunctions
 Holds the functions unsupported by the server.
 
std::vector< AssignedAuxiliaryInputDeviceassignedAuxiliaryInputDevices
 A container to hold all auxiliary input devices known.
 
std::uint16_t ourModelIdentificationCode = 1
 The model identification code of this input device.
 
std::map< std::uint16_t, AuxiliaryInputStateourAuxiliaryInputs
 The inputs on this auxiliary input device.
 
std::thread * workerThread = nullptr
 The worker thread that updates this interface.
 
bool firstTimeInState = false
 Stores if the current update cycle is the first time a state machine state has been processed.
 
bool initialized = false
 Stores the client initialization state.
 
bool sendWorkingSetMaintenance = false
 Used internally to enable and disable cyclic sending of the working set maintenance message.
 
bool sendAuxiliaryMaintenance = false
 Used internally to enable and disable cyclic sending of the auxiliary maintenance message.
 
bool shouldTerminate = false
 Used to determine if the client should exit and join the worker thread.
 
std::vector< std::vector< std::uint8_t > > commandQueue
 A queue of commands to send to the VT server.
 
bool commandAwaitingResponse = false
 Determines if we are currently waiting for a response to a command.
 
std::uint32_t lastCommandTimestamp_ms = 0
 The timestamp of the last command sent.
 
Mutex commandQueueMutex
 A mutex to protect the command queue.
 
EventDispatcher< VTKeyEventsoftKeyEventDispatcher
 A list of all soft key event callbacks.
 
EventDispatcher< VTKeyEventbuttonEventDispatcher
 A list of all button event callbacks.
 
EventDispatcher< VTPointingEventpointingEventDispatcher
 A list of all pointing event callbacks.
 
EventDispatcher< VTSelectInputObjectEventselectInputObjectEventDispatcher
 A list of all select input object callbacks.
 
EventDispatcher< VTESCMessageEventescMessageEventDispatcher
 A list of all ESC event callbacks.
 
EventDispatcher< VTChangeNumericValueEventchangeNumericValueEventDispatcher
 A list of all change numeric value callbacks.
 
EventDispatcher< VTChangeActiveMaskEventchangeActiveMaskEventDispatcher
 A list of all change active mask callbacks.
 
EventDispatcher< VTChangeSoftKeyMaskEventchangeSoftKeyMaskEventDispatcher
 A list of all change soft key mask callbacks.
 
EventDispatcher< VTChangeStringValueEventchangeStringValueEventDispatcher
 A list of all change string value callbacks.
 
EventDispatcher< VTUserLayoutHideShowEventuserLayoutHideShowEventDispatcher
 A list of all user layout hide/show callbacks.
 
EventDispatcher< VTAudioSignalTerminationEventaudioSignalTerminationEventDispatcher
 A list of all control audio signal termination callbacks.
 
EventDispatcher< AuxiliaryFunctionEventauxiliaryFunctionEventDispatcher
 A list of all auxiliary function callbacks.
 
DataChunkCallback objectPoolDataCallback = nullptr
 The callback to use to get pool data.
 
std::uint32_t lastObjectPoolIndex = 0
 The last object pool index that was processed.
 

Static Protected Attributes

static constexpr std::uint64_t AUXILIARY_INPUT_STATUS_DELAY = 1000
 The delay between the auxiliary input status messages, in milliseconds.
 
static constexpr std::uint64_t AUXILIARY_INPUT_STATUS_DELAY_INTERACTION = 50
 The delay between the auxiliary input status messages when the input is interacted with, in milliseconds.
 
static constexpr std::uint32_t VT_STATUS_TIMEOUT_MS = 3000
 The max allowable time between VT status messages before its considered offline.
 
static constexpr std::uint32_t WORKING_SET_MAINTENANCE_TIMEOUT_MS = 1000
 The delay between working set maintenance messages.
 
static constexpr std::uint32_t AUXILIARY_MAINTENANCE_TIMEOUT_MS = 100
 The delay between auxiliary maintenance messages.
 

Detailed Description

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.

Definition at line 43 of file isobus_virtual_terminal_client.hpp.

Member Enumeration Documentation

◆ AlarmMaskPriority

enum class isobus::VirtualTerminalClient::AlarmMaskPriority : std::uint8_t
strong

The allowable priorities of an alarm mask.

Enumerator
High 

Overrides lower priority alarm masks.

Medium 

Overrides low priority alarm masks.

Low 

Overrides data masks.

Definition at line 229 of file isobus_virtual_terminal_client.hpp.

◆ AuxiliaryTypeTwoFunctionType

Enumerates the various auxiliary input function types.

Enumerator
BooleanLatching 

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

AnalogueLatching 

Two-way analogue (Maintains position setting)

BooleanMomentary 

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

AnalogueMomentaryTwoWay 

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

AnalogueMomentaryOneWay 

One-way analogue (returns to 0%)

DualBooleanLatching 

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

DualBooleanMomentary 

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

DualBooleanLatchingUpOnly 

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

DualBooleanLatchingDownpOnly 

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

AnalogueMomentaryBooleanLatching 

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

AnalogueLatchingBooleanLatching 

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

QuadratureBooleanMomentary 

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

QuadratureAnalogueLatching 

Two Quadrature mounted Two-way analogue (maintains position)

QuadratureAnalogueMomentary 

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

BidirectionalEncoder 

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

Reserved 

15-30 Reserved

ReservedRemoveAssignment 

Used for Remove assignment command.

Definition at line 306 of file isobus_virtual_terminal_client.hpp.

◆ CurrentObjectPoolUploadState

enum class isobus::VirtualTerminalClient::CurrentObjectPoolUploadState : std::uint8_t
strongprotected

The different states of an object pool upload process.

Enumerator
Uninitialized 

The object pool upload has not been started.

InProgress 

The object pool upload is in progress.

Success 

The object pool was uploaded.

Failed 

The pool upload has failed.

Definition at line 1300 of file isobus_virtual_terminal_client.hpp.

◆ EnableDisableObjectCommand

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

Enumerator
DisableObject 

Disables a compatible object.

EnableObject 

Enables a compatible object.

Definition at line 132 of file isobus_virtual_terminal_client.hpp.

◆ ESCMessageErrorCode

enum class isobus::VirtualTerminalClient::ESCMessageErrorCode : std::uint8_t
strong

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

Enumerator
NoError 

No error occurred.

NoInputFieldOpen 

No input field is open.

OtherError 

Error is not one of the above.

Definition at line 253 of file isobus_virtual_terminal_client.hpp.

◆ FillType

enum class isobus::VirtualTerminalClient::FillType : std::uint8_t
strong

Enumerates the different fill types for an object.

Enumerator
NoFill 

No fill will be applied.

FillWithLineColour 

Fill with the colour of the outline of the shape.

FillWithSpecifiedColourInFillColourAttribute 

Fill with the colour specified by a fill attribute.

FillWithPatternGivenByFillPatternAttribute 

Fill with a patter provided by a fill pattern attribute.

Definition at line 213 of file isobus_virtual_terminal_client.hpp.

◆ FontSize

enum class isobus::VirtualTerminalClient::FontSize : std::uint8_t
strong

Enumerates the different font sizes.

Enumerator
Size6x8 

6x8 Font size

Size8x8 

8x8 Font size

Size8x12 

8x12 Font size

Size12x16 

12x16 Font size

Size16x16 

16x16 Font size

Size16x24 

16x24 Font size

Size24x32 

24x32 Font size

Size32x32 

32x32 Font size

Size32x48 

32x48 Font size

Size48x64 

48x64 Font size

Size64x64 

64x64 Font size

Size64x96 

64x96 Font size

Size96x128 

96x128 Font size

Size128x128 

128x128 Font size

Size128x192 

128x192 Font size

Definition at line 164 of file isobus_virtual_terminal_client.hpp.

◆ FontStyleBits

enum class isobus::VirtualTerminalClient::FontStyleBits : std::uint8_t
strong

Enumerates the font style options that can be encoded in a font style bitfield.

Enumerator
Bold 

Bold font style.

CrossedOut 

Crossed-out font style (strikethrough)

Underlined 

Underlined font style.

Italic 

Italic font style.

Inverted 

Inverted font style (upside down)

Flashing 

Flashing font style.

FlashingHidden 

Flashing between hidden and shown font style.

ProportionalFontRendering 

Enables proportional font rendering if supported by the server.

Definition at line 184 of file isobus_virtual_terminal_client.hpp.

◆ FontType

enum class isobus::VirtualTerminalClient::FontType : std::uint8_t
strong

Enumerates the different font types.

Enumerator
ISO8859_1 

ISO Latin 1.

ISO8859_15 

ISO Latin 9.

ISO8859_2 

ISO Latin 2.

Reserved_1 

Reserved.

ISO8859_4 

ISO Latin 4.

ISO8859_5 

Cyrillic.

Reserved_2 

Reserved.

ISO8859_7 

Greek.

ReservedEnd 

Reserved from ISO8859_7 to this value.

ProprietaryBegin 

The beginning of the proprietary range.

ProprietaryEnd 

The end of the proprietary region.

Definition at line 197 of file isobus_virtual_terminal_client.hpp.

◆ Function

enum class isobus::VirtualTerminalClient::Function : std::uint8_t
strong

Enumerates the multiplexor byte values for VT commands.

Definition at line 47 of file isobus_virtual_terminal_client.hpp.

◆ GraphicMode

enum class isobus::VirtualTerminalClient::GraphicMode : std::uint8_t
strong

Enumerates the various VT server graphics modes.

Enumerator
Monochrome 

Monochromatic graphics mode (1 bit)

SixteenColour 

16 Colour mode (4 bit)

TwoHundredFiftySixColour 

256 Colour mode (8 bit)

Definition at line 298 of file isobus_virtual_terminal_client.hpp.

◆ GraphicsContextSubCommandID

enum class isobus::VirtualTerminalClient::GraphicsContextSubCommandID : std::uint8_t
strongprotected

Enumerates the command types for graphics context objects.

Enumerator
SetGraphicsCursor 

Sets the graphics cursor x/y attributes.

MoveGraphicsCursor 

Moves the cursor relative to current location.

SetForegroundColour 

Sets the foreground colour.

SetBackgroundColour 

Sets the background colour.

SetLineAttributesObjectID 

Sets the line attribute object ID.

SetFillAttributesObjectID 

Sets the fill attribute object ID.

SetFontAttributesObjectID 

Sets the font attribute object ID.

EraseRectangle 

Erases a rectangle.

DrawPoint 

Draws a point.

DrawLine 

Draws a line.

DrawRectangle 

Draws a rectangle.

DrawClosedEllipse 

Draws a closed ellipse.

DrawPolygon 

Draws polygon.

DrawText 

Draws text.

PanViewport 

Pans viewport.

ZoomViewport 

Zooms the viewport.

PanAndZoomViewport 

Pan and zooms the viewport.

ChangeViewportSize 

Changes the viewport size.

DrawVTObject 

Draws a VT object.

CopyCanvasToPictureGraphic 

Copies the canvas to picture graphic object.

CopyViewportToPictureGraphic 

Copies the viewport to picture graphic object.

Definition at line 1265 of file isobus_virtual_terminal_client.hpp.

◆ HideShowObjectCommand

enum class isobus::VirtualTerminalClient::HideShowObjectCommand : std::uint8_t
strong

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

Enumerator
HideObject 

Hides the object.

ShowObject 

Shows an object.

Definition at line 125 of file isobus_virtual_terminal_client.hpp.

◆ KeyActivationCode

enum class isobus::VirtualTerminalClient::KeyActivationCode : std::uint8_t
strong

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

Enumerator
ButtonUnlatchedOrReleased 

Button is released.

ButtonPressedOrLatched 

Button is pressed.

ButtonStillHeld 

Button is being held down (sent cyclically)

ButtonPressAborted 

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

Definition at line 244 of file isobus_virtual_terminal_client.hpp.

◆ LineDirection

enum class isobus::VirtualTerminalClient::LineDirection : std::uint8_t
strong

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

Enumerator
TopLeftToBottomRightOfEnclosingVirtualRectangle 

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

BottomLeftToTopRightOfEnclosingVirtualRectangle 

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

Definition at line 157 of file isobus_virtual_terminal_client.hpp.

◆ MacroEventID

enum class isobus::VirtualTerminalClient::MacroEventID : std::uint8_t
strong

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

Enumerator
Reserved 

Reserved.

OnActivate 

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

OnDeactivate 

Event on deactivation of an object.

OnShow 

Event on an object being shown.

OnHide 

Event on an object being hidden.

OnEnable 

Event on enable of an object.

OnDisable 

Event on disabling an object.

OnChangeActiveMask 

Event on changing the active mask.

OnChangeSoftKeyMask 

Event on change of the soft key mask.

OnChangeAttribute 

Event on change of an attribute value.

OnChangeBackgroundColour 

Event on change of a background colour.

OnChangeFontAttributes 

Event on change of a font attribute.

OnChangeLineAttributes 

Event on change of a line attribute.

OnChangeFillAttributes 

Event on change of a fill attribute.

OnChangeChildLocation 

Event on change of a child objects location.

OnChangeSize 

Event on change of an object size.

OnChangeValue 

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

OnChangePriority 

Event on change of a mask's priority.

OnChangeEndPoint 

Event on change of an object endpoint.

OnInputFieldSelection 

Event when an input field is selected.

OnInputFieldDeselection 

Event on deselection of an input field.

OnESC 

Event on ESC (escape)

OnEntryOfValue 

Event on entry of a value.

OnEntryOfNewValue 

Event on entry of a new value.

OnKeyPress 

Event on the press of a key.

OnKeyRelease 

Event on the release of a key.

OnChangeChildPosition 

Event on changing a child object's position.

OnPointingEventPress 

Event on a pointing event press.

OnPointingEventRelease 

Event on a pointing event release.

ReservedBegin 

Beginning of the reserved range.

ReservedEnd 

End of the reserved range.

UseExtendedMacroReference 

Use extended macro reference.

Definition at line 261 of file isobus_virtual_terminal_client.hpp.

◆ MaskLockState

enum class isobus::VirtualTerminalClient::MaskLockState : std::uint8_t
strong

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

Enumerator
UnlockMask 

Renders the mask normally.

LockMask 

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

Definition at line 237 of file isobus_virtual_terminal_client.hpp.

◆ MaskType

enum class isobus::VirtualTerminalClient::MaskType : std::uint8_t
strong

The types of object pool masks.

Enumerator
DataMask 

A data mask, used in normal circumstances.

AlarmMask 

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

Definition at line 222 of file isobus_virtual_terminal_client.hpp.

◆ SelectInputObjectOptions

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

Enumerator
ActivateObjectForDataInput 

Activates an object for data input.

SetFocusToObject 

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

Definition at line 139 of file isobus_virtual_terminal_client.hpp.

◆ StateMachineState

enum class isobus::VirtualTerminalClient::StateMachineState : std::uint8_t
strong

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

Enumerator
Disconnected 

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

WaitForPartnerVTStatusMessage 

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

SendWorkingSetMasterMessage 

Client is sending the working state master message.

ReadyForObjectPool 

Client needs an object pool before connection can continue.

SendGetMemory 

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

WaitForGetMemoryResponse 

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

SendGetNumberSoftkeys 

Client is sending the "get number of soft keys" message.

WaitForGetNumberSoftKeysResponse 

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

SendGetTextFontData 

Client is sending the "get text font data" message.

WaitForGetTextFontDataResponse 

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

SendGetHardware 

Client is sending the "get hardware" message.

WaitForGetHardwareResponse 

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

SendGetVersions 

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

WaitForGetVersionsResponse 

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

SendStoreVersion 

Sending the store version command.

WaitForStoreVersionResponse 

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

SendLoadVersion 

Sending the load version command.

WaitForLoadVersionResponse 

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

UploadObjectPool 

Client is uploading the object pool.

SendEndOfObjectPool 

Client is sending the end of object pool message.

WaitForEndOfObjectPoolResponse 

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

Connected 

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

Failed 

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

Definition at line 328 of file isobus_virtual_terminal_client.hpp.

◆ TransmitFlags

enum class isobus::VirtualTerminalClient::TransmitFlags : std::uint32_t
strongprotected

Flags used as a retry mechanism for sending important messages.

Enumerator
SendWorkingSetMaintenance 

Flag to send the working set maintenenace message.

SendAuxiliaryMaintenance 

Flag to send the auxiliary maintenance message.

NumberFlags 

The number of flags in this enum.

Definition at line 1291 of file isobus_virtual_terminal_client.hpp.

◆ VTVersion

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

Enumerator
Version2OrOlder 

Client or server supports VT version 2 or lower.

Version3 

Client or server supports all of VT version 3.

Version4 

Client or server supports all of VT version 4.

Version5 

Client or server supports all of VT version 5.

Version6 

Client or server supports all of VT version 6.

ReservedOrUnknown 

Reserved value, not to be used.

Definition at line 146 of file isobus_virtual_terminal_client.hpp.

Constructor & Destructor Documentation

◆ VirtualTerminalClient()

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

The constructor for a VirtualTerminalClient.

Parameters
[in]partnerThe VT server control function
[in]clientSourceThe internal control function to communicate from

Definition at line 28 of file isobus_virtual_terminal_client.cpp.

◆ ~VirtualTerminalClient()

isobus::VirtualTerminalClient::~VirtualTerminalClient ( )

The destructor for the VirtualTerminalClient.

Definition at line 36 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ add_auxiliary_input_object_id()

void isobus::VirtualTerminalClient::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
[in]auxiliaryInputIDThe ID of the auxiliary input

Definition at line 218 of file isobus_virtual_terminal_client.cpp.

◆ get_active_working_set_master_address()

std::uint8_t isobus::VirtualTerminalClient::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

Definition at line 137 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ get_any_pool_needs_scaling()

bool isobus::VirtualTerminalClient::get_any_pool_needs_scaling ( ) const
protected

Returns if any object pool had scaling configured.

Returns
true if any pool has both data mask and softkey scaling configured

Definition at line 3351 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_auxiliary_function_event_dispatcher()

EventDispatcher< VirtualTerminalClient::AuxiliaryFunctionEvent > & isobus::VirtualTerminalClient::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

Definition at line 203 of file isobus_virtual_terminal_client.cpp.

◆ get_auxiliary_input_learn_mode_enabled()

bool isobus::VirtualTerminalClient::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

Definition at line 213 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_connected_vt_version()

VirtualTerminalClient::VTVersion isobus::VirtualTerminalClient::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

Definition at line 1158 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_font_or_next_smallest_font()

VirtualTerminalClient::FontSize isobus::VirtualTerminalClient::get_font_or_next_smallest_font ( FontSize originalFont) const
protected

Returns the closest font to the one you passed in, in decending order.

Parameters
[in]originalFontThe original font that you want to scale
Returns
The best available font that the VT reported it has available

Definition at line 3497 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_font_size_supported()

bool isobus::VirtualTerminalClient::get_font_size_supported ( FontSize value) const

Returns if the selected font is supported.

Parameters
[in]valueThe font to check against
Returns
true if the font is supported by the VT server

Definition at line 1064 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_font_style_supported()

bool isobus::VirtualTerminalClient::get_font_style_supported ( FontStyleBits value) const

Returns if the selected font style is supported.

Parameters
[in]valueThe font style to check against
Returns
true if the font style is supported by the VT server

Definition at line 1098 of file isobus_virtual_terminal_client.cpp.

◆ get_graphic_mode()

VirtualTerminalClient::GraphicMode isobus::VirtualTerminalClient::get_graphic_mode ( ) const

Returns the graphics mode supported by the VT server.

Returns
The graphics mode supported by the VT server

Definition at line 1103 of file isobus_virtual_terminal_client.cpp.

◆ get_has_adjustable_volume_output()

bool isobus::VirtualTerminalClient::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

Definition at line 1123 of file isobus_virtual_terminal_client.cpp.

◆ get_internal_control_function()

std::shared_ptr< InternalControlFunction > isobus::VirtualTerminalClient::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

Definition at line 132 of file isobus_virtual_terminal_client.cpp.

◆ get_is_connected()

bool isobus::VirtualTerminalClient::get_is_connected ( ) const

Check whether the client is connected to the VT server.

Returns
true if cconnected, false otherwise

Definition at line 78 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_is_initialized()

bool isobus::VirtualTerminalClient::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

Definition at line 73 of file isobus_virtual_terminal_client.cpp.

◆ get_is_object_scalable()

bool isobus::VirtualTerminalClient::get_is_object_scalable ( VirtualTerminalObjectType type)
staticprotected

Returns if the specified object type can be scaled.

Parameters
[in]typeThe object type to check
Returns
true if the object is inherently scalable

Definition at line 3446 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_minimum_object_length()

std::uint32_t isobus::VirtualTerminalClient::get_minimum_object_length ( VirtualTerminalObjectType type)
staticprotected

Returns the minimum length that the specified object could possibly require in bytes.

Parameters
[in]typeThe VT object type to check
Returns
The minimum number of bytes that the specified object might use

Definition at line 3722 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_multiple_frequency_audio_output()

bool isobus::VirtualTerminalClient::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

Definition at line 1118 of file isobus_virtual_terminal_client.cpp.

◆ get_number_bytes_in_object()

std::uint32_t isobus::VirtualTerminalClient::get_number_bytes_in_object ( std::uint8_t * buffer)
staticprotected

Returns the total number of bytes in the VT object located at the specified memory location.

Parameters
[in]bufferA pointer to the start of the VT object
Returns
The total number of bytes present in the VT object at the specified location

Definition at line 3882 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_number_physical_softkeys()

std::uint8_t isobus::VirtualTerminalClient::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

Definition at line 1059 of file isobus_virtual_terminal_client.cpp.

◆ get_number_virtual_softkeys()

std::uint8_t isobus::VirtualTerminalClient::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

Definition at line 1054 of file isobus_virtual_terminal_client.cpp.

◆ get_number_x_pixels()

std::uint16_t isobus::VirtualTerminalClient::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

Definition at line 1148 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_number_y_pixels()

std::uint16_t isobus::VirtualTerminalClient::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

Definition at line 1153 of file isobus_virtual_terminal_client.cpp.

◆ get_partner_control_function()

std::shared_ptr< PartneredControlFunction > isobus::VirtualTerminalClient::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

Definition at line 127 of file isobus_virtual_terminal_client.cpp.

◆ get_softkey_x_axis_pixels()

std::uint8_t isobus::VirtualTerminalClient::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

Definition at line 1044 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ get_softkey_y_axis_pixels()

std::uint8_t isobus::VirtualTerminalClient::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

Definition at line 1049 of file isobus_virtual_terminal_client.cpp.

◆ get_support_drag_operation()

bool isobus::VirtualTerminalClient::get_support_drag_operation ( ) const

Returns if the VT supports the drag operation.

Returns
true if the VT supports the drag operation

Definition at line 1138 of file isobus_virtual_terminal_client.cpp.

◆ get_support_intermediate_coordinates_during_drag_operations()

bool isobus::VirtualTerminalClient::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

Definition at line 1143 of file isobus_virtual_terminal_client.cpp.

◆ get_support_pointing_device_with_pointing_message()

bool isobus::VirtualTerminalClient::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

Definition at line 1113 of file isobus_virtual_terminal_client.cpp.

◆ get_support_simultaneous_activation_buttons_and_softkeys()

bool isobus::VirtualTerminalClient::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

Definition at line 1133 of file isobus_virtual_terminal_client.cpp.

◆ get_support_simultaneous_activation_physical_keys()

bool isobus::VirtualTerminalClient::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

Definition at line 1128 of file isobus_virtual_terminal_client.cpp.

◆ get_support_touchscreen_with_pointing_message()

bool isobus::VirtualTerminalClient::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

Definition at line 1108 of file isobus_virtual_terminal_client.cpp.

◆ get_visible_data_mask()

std::uint16_t isobus::VirtualTerminalClient::get_visible_data_mask ( ) const

Returns the current data mask displayed by the VT server.

Returns
The object ID of the data mask visible

Definition at line 1215 of file isobus_virtual_terminal_client.cpp.

◆ get_visible_soft_key_mask()

std::uint16_t isobus::VirtualTerminalClient::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

Definition at line 1220 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_button_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTKeyEvent > & isobus::VirtualTerminalClient::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

Definition at line 153 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_change_active_mask_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTChangeActiveMaskEvent > & isobus::VirtualTerminalClient::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

Definition at line 178 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_change_numeric_value_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTChangeNumericValueEvent > & isobus::VirtualTerminalClient::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

Definition at line 173 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_change_soft_key_mask_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTChangeSoftKeyMaskEvent > & isobus::VirtualTerminalClient::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

Definition at line 183 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_change_string_value_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTChangeStringValueEvent > & isobus::VirtualTerminalClient::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

Definition at line 188 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_control_audio_signal_termination_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTAudioSignalTerminationEvent > & isobus::VirtualTerminalClient::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

Definition at line 198 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_esc_message_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTESCMessageEvent > & isobus::VirtualTerminalClient::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

Definition at line 168 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_pointing_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTPointingEvent > & isobus::VirtualTerminalClient::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

Definition at line 158 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_select_input_object_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTSelectInputObjectEvent > & isobus::VirtualTerminalClient::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

Definition at line 163 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_soft_key_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTKeyEvent > & isobus::VirtualTerminalClient::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

Definition at line 148 of file isobus_virtual_terminal_client.cpp.

◆ get_vt_user_layout_hide_show_event_dispatcher()

EventDispatcher< VirtualTerminalClient::VTUserLayoutHideShowEvent > & isobus::VirtualTerminalClient::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

Definition at line 193 of file isobus_virtual_terminal_client.cpp.

◆ initialize()

void isobus::VirtualTerminalClient::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
[in]spawnThreadThe client will start a thread to manage itself if this parameter is true. Otherwise you must update it cyclically.

Definition at line 41 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_function_unsupported() [1/2]

bool isobus::VirtualTerminalClient::is_function_unsupported ( Function function) const
protected

Extract from the cache whether a VT does not support a specific function.

Parameters
[in]functionThe function to check
Returns
true if the VT doesn't support the function

Definition at line 4456 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_function_unsupported() [2/2]

bool isobus::VirtualTerminalClient::is_function_unsupported ( std::uint8_t functionCode) const
protected

Extract from the cache whether a VT does not support a specific function.

Parameters
[in]functionCodeThe code of the function to check
Returns
true if the VT doesn't support the function

Definition at line 4451 of file isobus_virtual_terminal_client.cpp.

◆ is_vt_version_supported()

bool isobus::VirtualTerminalClient::is_vt_version_supported ( VTVersion value) const

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

Parameters
[in]valueThe VT version to check against
Returns
true if the VT version is supported by the VT server

Definition at line 1203 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_callback()

void isobus::VirtualTerminalClient::process_callback ( std::uint32_t parameterGroupNumber,
std::uint32_t dataLength,
std::shared_ptr< InternalControlFunction > sourceControlFunction,
std::shared_ptr< ControlFunction > destinationControlFunction,
bool successful,
void * parentPointer )
staticprotected

The callback passed to the network manager's send function to know when a Tx is completed.

Parameters
[in]parameterGroupNumberThe parameter group number of the message that was sent
[in]dataLengthThe length of the data that was sent
[in]sourceControlFunctionThe control function that sent the message
[in]destinationControlFunctionThe control function that received the message or nullptr for a broadcast
[in]successfultrue if the message was sent successfully
[in]parentPointerA context variable to find the relevant VT client class

Definition at line 3240 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ process_command_queue()

void isobus::VirtualTerminalClient::process_command_queue ( )
protected

Tries to send all messages in the queue.

Definition at line 4542 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_flags()

void isobus::VirtualTerminalClient::process_flags ( std::uint32_t flag,
void * parent )
staticprotected

Processes the internal Tx flags.

Parameters
[in]flagThe flag to process
[in]parentA context variable to find the relevant VT client class

Definition at line 2146 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ process_internal_object_pool_upload_callback()

bool isobus::VirtualTerminalClient::process_internal_object_pool_upload_callback ( std::uint32_t callbackIndex,
std::uint32_t bytesOffset,
std::uint32_t numberOfBytesNeeded,
std::uint8_t * chunkBuffer,
void * parentPointer )
staticprotected

The data callback passed to the network manger's send function for the transport layer messages.

We upload the data with callbacks to avoid making a complete copy of the pool to accommodate the multiplexor that needs to get passed to the transport layer message's first byte.

Parameters
[in]callbackIndexThe number of times the callback has been called
[in]bytesOffsetThe byte offset at which to get pool data
[in]numberOfBytesNeededThe number of bytes the protocol needs to send another frame (usually 7)
[out]chunkBufferA pointer through which the data should be returned to the protocol
[in]parentPointerA context variable that is passed back through the callback
Returns
true if the data was successfully returned via the callback

Definition at line 3267 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ process_rx_message()

void isobus::VirtualTerminalClient::process_rx_message ( const CANMessage & message,
void * parentPointer )
staticprotected

Processes a CAN message destined for any VT client.

Parameters
[in]messageThe CAN message being received
[in]parentPointerA context variable to find the relevant VT client class
Todo
load the preferred assignment into parentVT->assignedAuxiliaryInputDevices
Todo
save preferred assignment to persistent configuration
Todo
save preferred assignment to persistent configuration
Todo
figure out how to best pass other status properties below to application
Todo
Todo
The standard requires us to not perform any auxiliary function when learn mode is active, so we probably want to let the application know about that somehow
Todo
maybe a better way available than relying on aux function callbacks registered?
Todo
maybe a better way available than relying on aux function callbacks registered?

Definition at line 2196 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_standard_object_height_and_width()

void isobus::VirtualTerminalClient::process_standard_object_height_and_width ( std::uint8_t * buffer,
float scaleFactor )
staticprotected

Resizes the most common VT object format by some scale factor.

Parameters
[in]bufferA pointer to the start of the VT object
[in]scaleFactorThe scale factor to use when scaling the object, with 1.0 being the original scale

Definition at line 4173 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ queue_command()

bool isobus::VirtualTerminalClient::queue_command ( const std::vector< std::uint8_t > & data,
bool replace = false )
protected

Tries to send a command to the VT server, and queues it if it fails.

Parameters
[in]dataThe data to send, including the function-code
[in]replaceIf true, the message will replace any existing message with the same priority and function-code
Returns
true if the message was sent/queued successfully

Definition at line 4493 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_object_pool_data_chunk_callback()

void isobus::VirtualTerminalClient::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
[in]poolIndexThe index of the pool you are assigning
[in]poolTotalSizeThe object pool size
[in]valueThe data callback that will be used to get object pool data to upload.
[in]versionAn optional version string. The stack will automatically store/load your pool from the VT if this is provided.

Definition at line 1293 of file isobus_virtual_terminal_client.cpp.

◆ remap_font_to_scale()

VirtualTerminalClient::FontSize isobus::VirtualTerminalClient::remap_font_to_scale ( FontSize originalFont,
float scaleFactor )
staticprotected

Remaps a font to some other font based on a scale factor This is not a one-size-fits-all solution, but should usually result in a compatible font.

Parameters
[in]originalFontThe font to scale
[in]scaleFactorThe factor by which to attempt scaling the font
Returns
A scaled font, depending on what the VT has available

Definition at line 3508 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ remove_auxiliary_input_object_id()

void isobus::VirtualTerminalClient::remove_auxiliary_input_object_id ( const std::uint16_t auxiliaryInputID)

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

Parameters
[in]auxiliaryInputIDThe ID of the auxiliary input

Definition at line 223 of file isobus_virtual_terminal_client.cpp.

◆ replace_command()

bool isobus::VirtualTerminalClient::replace_command ( const std::vector< std::uint8_t > & data)
protected

Replaces the first message in the queue with the same function-code and priority, and removes the rest.

Note
This will not queue a message if one does not already exist.
Parameters
[in]dataThe data to send, including the function-code
Returns
true if the message was replaced successfully

Definition at line 4515 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ resize_object()

bool isobus::VirtualTerminalClient::resize_object ( std::uint8_t * buffer,
float scaleFactor,
VirtualTerminalObjectType type )
protected

Resizes a single VT object by some scale factor.

Parameters
[in]bufferA pointer to the start of the VT object
[in]scaleFactorThe scale factor to scale the object by
[in]typeThe type of the object to resize. Must match the object located at buffer
Returns
true if the object was resized, otherwise false

Definition at line 4183 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restart_communication()

void isobus::VirtualTerminalClient::restart_communication ( )

Halts communication with the VT gracefully and restarts it.

Definition at line 115 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ scale_object_pools()

bool isobus::VirtualTerminalClient::scale_object_pools ( )
protected

Iterates through each object pool and scales each object in the pool automatically.

Returns
true if all object pools scaled with no error

Definition at line 3367 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_auxiliary_function_assignment_response()

bool isobus::VirtualTerminalClient::send_auxiliary_function_assignment_response ( std::uint16_t functionObjectID,
bool hasError,
bool isAlreadyAssigned ) const
protected

Send the auxiliary control type 2 assignment reponse message.

Parameters
[in]functionObjectIDThe object ID of the function
[in]hasErrortrue if the assignment failed
[in]isAlreadyAssignedtrue if the function is already assigned
Returns
true if the message was sent successfully

Definition at line 2007 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_auxiliary_functions_preferred_assignment()

bool isobus::VirtualTerminalClient::send_auxiliary_functions_preferred_assignment ( ) const
protected

Send the preferred auxiliary control type 2 assignment command.

Returns
true if the message was sent successfully
Todo
load preferred assignment from saved configuration

Definition at line 1996 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_auxiliary_input_maintenance()

bool isobus::VirtualTerminalClient::send_auxiliary_input_maintenance ( ) const
protected

Send the auxiliary control type 2 maintenance message.

Returns
true if the message was sent successfully

Definition at line 2029 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_auxiliary_input_status_enable_response()

bool isobus::VirtualTerminalClient::send_auxiliary_input_status_enable_response ( std::uint16_t objectID,
bool isEnabled,
bool hasError ) const
protected

Send the auxiliary input status type 2 enable response.

Parameters
[in]objectIDThe object ID of the input
[in]isEnabledtrue if the input is enabled
[in]hasErrortrue if the enable failed
Returns
true if the message was sent successfully

Definition at line 2047 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_change_active_mask()

bool isobus::VirtualTerminalClient::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
[in]workingSetObjectIDThe ID of the working set
[in]newActiveMaskObjectIDThe object ID of the new active mask
Returns
true if the message is being sent successfully

Definition at line 506 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_attribute() [1/2]

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]attributeIDThe attribute ID of the attribute being changed
[in]valueThe new attribute value
Returns
true if the message is being sent successfully

Definition at line 545 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_attribute() [2/2]

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]attributeIDThe attribute ID of the attribute being changed
[in]valueThe new attribute value
Returns
true if the message is being sent successfully

Definition at line 532 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_background_colour()

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

Sends the change background colour command.

Parameters
[in]objectIDThe ID of the target object
[in]colourThe new background colour of the object
Returns
true if the message is being sent successfully

Definition at line 394 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_child_location()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]parentObjectIDThe ID of the object's parent object
[in]relativeXPositionChangeThe amount to change the X position by (px)
[in]relativeYPositionChangeThe amount to change the Y position by (px)
Returns
true if the message is being sent successfully

Definition at line 352 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_child_position()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]parentObjectIDThe ID of the object's parent object
[in]xPositionThe new X position of the object (px)
[in]yPositionThe new Y position of the object (px)
Returns
true if the message is being sent successfully

Definition at line 365 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_endpoint()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]width_pxThe width to change the output line to
[in]height_pxThe height to change the output line to
[in]directionThe line direction (refer to output line object attributes)
Returns
true if the message is being sent successfully

Definition at line 454 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_fill_attributes()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]fillTypeThe fill type
[in]colourSee the standard VT colour palette for more details
[in]fillPatternObjectIDObject ID to a fill pattern or NULL_OBJECT_ID
Returns
true if the message is being sent successfully

Definition at line 493 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_font_attributes()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]colourSee the standard VT colour palette for more details
[in]sizeFont size
[in]typeFont Type
[in]styleBitfieldThe font style encoded as a bitfield
Returns
true if the message is being sent successfully

Definition at line 467 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_line_attributes()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]colourSee the standard VT colour palette for more details
[in]widthThe line width
[in]lineArtBitmaskThe line art, encoded as a bitfield (See ISO11783-6 for details)
Returns
true if the message is being sent successfully

Definition at line 480 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_list_item()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe object ID of the list
[in]listIndexThe index in the list to edit
[in]newObjectIDThe new object ID for the specified list index, or NULL_OBJECT_ID.
Returns
true if the message is being sent successfully

Definition at line 580 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_numeric_value()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]valueThe new numeric value of the object
Returns
true if the message is being sent successfully

Definition at line 407 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_object_label()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]labelStringObjectIDThe label's object ID
[in]fontTypeThe font type or NULL_OBJECT_ID
[in]graphicalDesignatorObjectIDObject 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

Definition at line 619 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_polygon_point()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]pointIndexThe index of the point in the polygon to edit
[in]newXValueThe new X axis value (px)
[in]newYValueThe new Y axis value (px)
Returns
true if the message is being sent successfully

Definition at line 632 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_polygon_scale()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]widthAttributeNew width attribute
[in]heightAttributeNew height attribute
Returns
true if the message is being sent successfully

Definition at line 645 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_priority()

bool isobus::VirtualTerminalClient::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
[in]alarmMaskObjectIDThe object ID of the target alarm mask
[in]priorityThe new priority for the mask
Returns
true if the message is being sent successfully

Definition at line 567 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_size_command()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]newWidthThe new width of the object
[in]newHeightThe new height of the object
Returns
true if the message is being sent successfully

Definition at line 381 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_softkey_mask()

bool isobus::VirtualTerminalClient::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
[in]typeThe mask type, alarm or data
[in]dataOrAlarmMaskObjectIDThe object ID of the target mask
[in]newSoftKeyMaskObjectIDThe object ID of the new softkey mask
Returns
true if the message is being sent successfully

Definition at line 519 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_string_value() [1/2]

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]valueThe string to be sent
Returns
true if the message is being sent successfully

Definition at line 449 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_change_string_value() [2/2]

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]stringLengthThe length of the string to be sent
[in]valueThe string to be sent
Returns
true if the message is being sent successfully

Definition at line 422 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_change_viewport_size()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]widthThe width of the viewport
[in]heightThe height of the viewport
Returns
true if the message is being sent successfully

Definition at line 971 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_command()

bool isobus::VirtualTerminalClient::send_command ( const std::vector< std::uint8_t > & data)
protected

Sends a command to the VT server.

Parameters
[in]dataThe data to send, including the function-code
Returns
true if the message was sent successfully

Definition at line 4461 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_control_audio_signal()

bool isobus::VirtualTerminalClient::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
[in]activationsNumber of times to activate the signal
[in]frequency_hzThe audio frequency to command in Hz
[in]duration_msDuration of the signal activation
[in]offTimeDuration_msThe amount of silent time in the signal
Returns
true if the message is being sent successfully

Definition at line 318 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_copy_canvas_to_picture_graphic()

bool isobus::VirtualTerminalClient::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
[in]graphicsContextObjectIDThe ID of the target graphics context object
[in]objectIDThe picture graphic's object ID to copy to
Returns
true if the message is being sent successfully

Definition at line 1005 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_copy_viewport_to_picture_graphic()

bool isobus::VirtualTerminalClient::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
[in]graphicsContextObjectIDThe ID of the target graphics context object
[in]objectIDThe picture graphic's object ID to copy to
Returns
true if the message is being sent successfully

Definition at line 1018 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_delete_object_pool()

bool isobus::VirtualTerminalClient::send_delete_object_pool ( ) const
protected

Sends the delete object pool message.

Returns
true if the message was sent

Definition at line 1755 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_delete_version()

bool isobus::VirtualTerminalClient::send_delete_version ( std::array< std::uint8_t, 7 > versionLabel) const
protected

Sends the delete version message.

Parameters
[in]versionLabelThe version label to delete
Returns
true if the message was sent

Definition at line 1915 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_draw_closed_ellipse()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]widthThe width of the ellipse (px)
[in]heightThe height of the ellipse (px)
Returns
true if the message is being sent successfully

Definition at line 841 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_line()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xOffsetThe pixel X offset relative to the cursor
[in]yOffsetThe pixel Y offset relative to the cursor
Returns
true if the message is being sent successfully

Definition at line 815 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_point()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xOffsetThe pixel X offset relative to the cursor
[in]yOffsetThe pixel Y offset relative to the cursor
Returns
true if the message is being sent successfully

Definition at line 802 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_polygon()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]numberOfPointsNumber of points in the polygon
[in]listOfXOffsetsRelativeToCursorA list of X offsets for the points, relative to the cursor
[in]listOfYOffsetsRelativeToCursorA list of Y offsets for the points, relative to the cursor
Returns
true if the message is being sent successfully

Definition at line 854 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_rectangle()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]widthThe width of the rectangle (px)
[in]heightThe height of the rectangle (px)
Returns
true if the message is being sent successfully

Definition at line 828 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_text()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]transparentDenotes if the text background is transparent
[in]textLengthString length
[in]valueA buffer to the text to draw with length textLength
Returns
true if the message is being sent successfully

Definition at line 883 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_draw_vt_object()

bool isobus::VirtualTerminalClient::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
[in]graphicsContextObjectIDThe ID of the target graphics context object
[in]VTObjectIDThe object ID to draw
Returns
true if the message is being sent successfully

Definition at line 992 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_enable_disable_object()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]commandThe target enable/disable state of the object
Returns
true if the message is being sent successfully

Definition at line 279 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_end_of_object_pool()

bool isobus::VirtualTerminalClient::send_end_of_object_pool ( ) const
protected

Sends the end of object pool message.

Returns
true if the message was sent

Definition at line 1965 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_erase_rectangle()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]widthThe width of the rectangle
[in]heightThe height of the rectangle
Returns
true if the message is being sent successfully

Definition at line 789 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_ESC()

bool isobus::VirtualTerminalClient::send_ESC ( )

Sends the ESC message (Escape)

Returns
true if the message is being sent successfully

Definition at line 305 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_execute_extended_macro()

bool isobus::VirtualTerminalClient::send_execute_extended_macro ( std::uint16_t objectID)

Sends the execute extended macro command.

Executes an extended macro

Parameters
[in]objectIDThe object ID of the extended macro to execute
Returns
true if the message is being sent successfully

Definition at line 671 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_execute_macro()

bool isobus::VirtualTerminalClient::send_execute_macro ( std::uint16_t objectID)

Sends the execute macro command.

This command is used to execute a Macro.

Parameters
[in]objectIDThe ID of the target object
Returns
true if the message is being sent successfully

Definition at line 606 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_extended_delete_version()

bool isobus::VirtualTerminalClient::send_extended_delete_version ( std::array< std::uint8_t, 32 > versionLabel) const
protected

Sends the extended delete version message.

Parameters
[in]versionLabelThe version label to delete
Returns
true if the message was sent

Definition at line 1957 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_extended_get_versions()

bool isobus::VirtualTerminalClient::send_extended_get_versions ( ) const
protected

Sends the get extended versions message.

Returns
true if the message was sent

Definition at line 1928 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_extended_load_version()

bool isobus::VirtualTerminalClient::send_extended_load_version ( std::array< std::uint8_t, 32 > versionLabel) const
protected

Sends the extended load version message.

Parameters
[in]versionLabelThe version label to load
Returns
true if the message was sent

Definition at line 1949 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_extended_store_version()

bool isobus::VirtualTerminalClient::send_extended_store_version ( std::array< std::uint8_t, 32 > versionLabel) const
protected

Sends the extended store version message.

Parameters
[in]versionLabelThe version label to store
Returns
true if the message was sent

Definition at line 1941 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_get_attribute_value()

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

Sends the get attribute value message.

Parameters
[in]objectIDThe object ID to query
[in]attributeIDThe attribute object to query
Returns
true if the message is being sent successfully

Definition at line 1031 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_get_hardware()

bool isobus::VirtualTerminalClient::send_get_hardware ( ) const
protected

Sends the get hardware message.

Returns
true if the message was sent

Definition at line 1824 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_get_memory()

bool isobus::VirtualTerminalClient::send_get_memory ( std::uint32_t requiredMemory) const
protected

Sends the get memory message.

This message checks to see if the VT has enough memory available to store your object pool(s)

Parameters
[in]requiredMemoryMemory in bytes to check for on the VT server
Returns
true if the message was sent

Definition at line 1785 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_get_number_of_softkeys()

bool isobus::VirtualTerminalClient::send_get_number_of_softkeys ( ) const
protected

Sends the get number of softkeys message.

Returns
true if the message was sent

Definition at line 1798 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_get_supported_objects()

bool isobus::VirtualTerminalClient::send_get_supported_objects ( ) const
protected

Sends the get supported objects message.

Returns
true if the message was sent

Definition at line 1863 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_get_supported_widechars()

bool isobus::VirtualTerminalClient::send_get_supported_widechars ( ) const
protected

Sends the get supported widechars message.

Returns
true if the message was sent

Definition at line 1837 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_get_text_font_data()

bool isobus::VirtualTerminalClient::send_get_text_font_data ( ) const
protected

Sends the get text font data message.

Returns
true if the message was sent

Definition at line 1811 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_get_versions()

bool isobus::VirtualTerminalClient::send_get_versions ( ) const
protected

Sends the get versions message.

Returns
true if the message was sent

Definition at line 1876 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_get_window_mask_data()

bool isobus::VirtualTerminalClient::send_get_window_mask_data ( ) const
protected

Sends the get window mask data message.

Returns
true if the message was sent

Definition at line 1850 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_hide_show_object()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]commandThe target hide/show state of the object
Returns
true if the message is being sent successfully

Definition at line 266 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_load_version()

bool isobus::VirtualTerminalClient::send_load_version ( std::array< std::uint8_t, 7 > versionLabel) const
protected

Sends the load version message.

Parameters
[in]versionLabelThe version label to load
Returns
true if the message was sent

Definition at line 1902 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_lock_unlock_mask()

bool isobus::VirtualTerminalClient::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
[in]stateThe target lock/unlock state
[in]objectIDThe object ID of the target mask
[in]timeout_msThe 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

Definition at line 593 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_message_to_vt()

bool isobus::VirtualTerminalClient::send_message_to_vt ( const std::uint8_t * dataBuffer,
std::uint32_t dataLength,
CANIdentifier::CANPriority priority = CANIdentifier::CANPriority::Priority5 ) const
protected

Sends a message to the VT server.

Parameters
[in]dataBufferA pointer to the data buffer to send
[in]dataLengthThe length of the data buffer
[in]priorityThe priority of the message (default is Priority5)
Returns
true if the message was sent successfully, false otherwise

Definition at line 1745 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_move_graphics_cursor()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xOffsetThe new relative X offset of the cursor
[in]yOffsetThe new relative Y offset of the cursor
Returns
true if the message was sent successfully

Definition at line 711 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_pan_and_zoom_viewport()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xAttributeThe viewport X attribute
[in]yAttributeThe viewport Y attribute
[in]zoomZoom value, -32.0 to 32.0
Returns
true if the message is being sent successfully

Definition at line 945 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_pan_viewport()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xAttributeThe viewport X attribute
[in]yAttributeThe viewport Y attribute
Returns
true if the message is being sent successfully

Definition at line 910 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_select_active_working_set()

bool isobus::VirtualTerminalClient::send_select_active_working_set ( std::uint64_t NAMEofWorkingSetMasterForDesiredWorkingSet)

Sends the select active working set command.

Parameters
[in]NAMEofWorkingSetMasterForDesiredWorkingSetThe NAME of the target working set master
Returns
true if the message is being sent successfully

Definition at line 684 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_select_colour_map_or_palette()

bool isobus::VirtualTerminalClient::send_select_colour_map_or_palette ( std::uint16_t objectID)

Sends the select colour map or palette command.

Parameters
[in]objectIDThe object to select
Returns
true if the message is being sent successfully

Definition at line 658 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_select_input_object()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]optionThe method by which the object will be selected
Returns
true if the message is being sent successfully

Definition at line 292 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_audio_volume()

bool isobus::VirtualTerminalClient::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
[in]volume_percentThe volume percentage to set the VT server to
Returns
true if the message is being sent successfully

Definition at line 331 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_background_colour()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]colourSee standard colour palette, 0-255
Returns
true if the message is being sent successfully

Definition at line 737 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_fill_attributes_object_id()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]fillAttributeobjectIDThe object ID of the fill attribute
Returns
true if the message is being sent successfully

Definition at line 763 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_font_attributes_object_id()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]fontAttributesObjectIDThe object ID of the font attribute
Returns
true if the message is being sent successfully

Definition at line 776 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_foreground_colour()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]colourSee standard colour palette, 0-255
Returns
true if the message is being sent successfully

Definition at line 724 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_graphics_cursor()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]xPositionThe new X position (px)
[in]yPositionThe new Y position (px)
Returns
true if the message is being sent successfully

Definition at line 698 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_set_line_attributes_object_id()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]lineAttributeobjectIDThe object ID of the line attribute
Returns
true if the message is being sent successfully

Definition at line 750 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ send_store_version()

bool isobus::VirtualTerminalClient::send_store_version ( std::array< std::uint8_t, 7 > versionLabel) const
protected

Sends the store version message.

Parameters
[in]versionLabelThe version label to store
Returns
true if the message was sent

Definition at line 1889 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_working_set_maintenance()

bool isobus::VirtualTerminalClient::send_working_set_maintenance ( bool initializing) const
protected

Sends the working set maintenance message.

Parameters
[in]initializingUsed to set the initializing bit
Returns
true if the message was sent

Definition at line 1768 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_working_set_master()

bool isobus::VirtualTerminalClient::send_working_set_master ( ) const
protected

Sends the working set master message.

Returns
true if the message was sent

Definition at line 1978 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_zoom_viewport()

bool isobus::VirtualTerminalClient::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
[in]objectIDThe ID of the target object
[in]zoomZoom value, -32.0 to 32.0
Returns
true if the message is being sent successfully

Definition at line 923 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ set_auxiliary_input_model_identification_code()

void isobus::VirtualTerminalClient::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
[in]modelIdentificationCodeThe model identification code

Definition at line 208 of file isobus_virtual_terminal_client.cpp.

◆ set_object_pool() [1/2]

void isobus::VirtualTerminalClient::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
[in]poolIndexThe index of the pool you are assigning
[in]poolA pointer to the object pool. Must remain valid until client is connected!
[in]sizeThe object pool size
[in]versionAn optional version string. The stack will automatically store/load your pool from the VT if this is provided.

Definition at line 1225 of file isobus_virtual_terminal_client.cpp.

◆ set_object_pool() [2/2]

void isobus::VirtualTerminalClient::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
[in]poolIndexThe index of the pool you are assigning
[in]poolA pointer to the object pool. Must remain valid until client is connected!
[in]versionAn optional version string. The stack will automatically store/load your pool from the VT if this is provided.

Definition at line 1254 of file isobus_virtual_terminal_client.cpp.

◆ set_object_pool_scaling()

void isobus::VirtualTerminalClient::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
[in]poolIndexThe index of the pool you want to auto-scale
[in]originalDataMaskDimensions_pxThe data mask width that your object pool was originally designed for
[in]originalSoftKyeDesignatorHeight_pxThe soft key designator width that your object pool was originally designed for

Definition at line 1283 of file isobus_virtual_terminal_client.cpp.

◆ set_state()

void isobus::VirtualTerminalClient::set_state ( StateMachineState value)
protected

Sets the state machine state and updates the associated timestamp.

Parameters
[in]valueThe new state for the state machine

Definition at line 2125 of file isobus_virtual_terminal_client.cpp.

Here is the caller graph for this function:

◆ terminate()

void isobus::VirtualTerminalClient::terminate ( )

Terminates the client and joins the worker thread if applicable.

Definition at line 83 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void isobus::VirtualTerminalClient::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.

Todo
We should make sure that when we disconnect/reconnect atleast 500ms has passed since the last auxiliary maintenance message

Definition at line 1322 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_auxiliary_input()

void isobus::VirtualTerminalClient::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
[in]auxiliaryInputIDThe ID of the auxiliary input
[in]value1The first value of the auxiliary input. See Table J.5 of Part 6 of the standard for details.
[in]value2The second value of the auxiliary input. See Table J.5 of Part 6 of the standard for details.
[in]controlLockedWhether the auxiliary input is locked

Definition at line 233 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ update_auxiliary_input_status() [1/2]

void isobus::VirtualTerminalClient::update_auxiliary_input_status ( )
protected

Send the auxiliary control type 2 status message for all inputs if applicable.

Definition at line 2060 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_auxiliary_input_status() [2/2]

bool isobus::VirtualTerminalClient::update_auxiliary_input_status ( std::uint16_t objectID)
protected

Send the auxiliary control type 2 status message for a specific input if applicable.

Parameters
[in]objectIDThe object ID of the input
Returns
true if the status message was sent
Todo
Change status message every 50ms to every 200ms for non-latched boolean inputs on interaction
Todo
Change values based on state of auxiliary input, e.g. for non-latched boolean inputs we have to change from value=1 (momentary) to value=2 (held)

Definition at line 2068 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:

◆ worker_thread_function()

void isobus::VirtualTerminalClient::worker_thread_function ( )
protected

The worker thread will execute this function when it runs, if applicable.

Definition at line 4562 of file isobus_virtual_terminal_client.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ activeWorkingSetDataMaskObjectID

std::uint16_t isobus::VirtualTerminalClient::activeWorkingSetDataMaskObjectID = NULL_OBJECT_ID
protected

The active working set data mask object ID.

Definition at line 1602 of file isobus_virtual_terminal_client.hpp.

◆ activeWorkingSetMasterAddress

std::uint8_t isobus::VirtualTerminalClient::activeWorkingSetMasterAddress = NULL_CAN_ADDRESS
protected

The active working set master address.

Definition at line 1604 of file isobus_virtual_terminal_client.hpp.

◆ activeWorkingSetSoftKeyMaskObjectID

std::uint16_t isobus::VirtualTerminalClient::activeWorkingSetSoftKeyMaskObjectID = NULL_OBJECT_ID
protected

The active working set's softkey mask object ID.

Definition at line 1603 of file isobus_virtual_terminal_client.hpp.

◆ assignedAuxiliaryInputDevices

std::vector<AssignedAuxiliaryInputDevice> isobus::VirtualTerminalClient::assignedAuxiliaryInputDevices
protected

A container to hold all auxiliary input devices known.

Definition at line 1635 of file isobus_virtual_terminal_client.hpp.

◆ audioSignalTerminationEventDispatcher

EventDispatcher<VTAudioSignalTerminationEvent> isobus::VirtualTerminalClient::audioSignalTerminationEventDispatcher
protected

A list of all control audio signal termination callbacks.

Definition at line 1664 of file isobus_virtual_terminal_client.hpp.

◆ AUXILIARY_INPUT_STATUS_DELAY

constexpr std::uint64_t isobus::VirtualTerminalClient::AUXILIARY_INPUT_STATUS_DELAY = 1000
staticconstexprprotected

The delay between the auxiliary input status messages, in milliseconds.

Definition at line 1342 of file isobus_virtual_terminal_client.hpp.

◆ AUXILIARY_INPUT_STATUS_DELAY_INTERACTION

constexpr std::uint64_t isobus::VirtualTerminalClient::AUXILIARY_INPUT_STATUS_DELAY_INTERACTION = 50
staticconstexprprotected

The delay between the auxiliary input status messages when the input is interacted with, in milliseconds.

Definition at line 1343 of file isobus_virtual_terminal_client.hpp.

◆ AUXILIARY_MAINTENANCE_TIMEOUT_MS

constexpr std::uint32_t isobus::VirtualTerminalClient::AUXILIARY_MAINTENANCE_TIMEOUT_MS = 100
staticconstexprprotected

The delay between auxiliary maintenance messages.

Definition at line 1593 of file isobus_virtual_terminal_client.hpp.

◆ auxiliaryFunctionEventDispatcher

EventDispatcher<AuxiliaryFunctionEvent> isobus::VirtualTerminalClient::auxiliaryFunctionEventDispatcher
protected

A list of all auxiliary function callbacks.

Definition at line 1665 of file isobus_virtual_terminal_client.hpp.

◆ busyCodesBitfield

std::uint8_t isobus::VirtualTerminalClient::busyCodesBitfield = 0
protected

The VT server's busy codes.

Definition at line 1605 of file isobus_virtual_terminal_client.hpp.

◆ buttonEventDispatcher

EventDispatcher<VTKeyEvent> isobus::VirtualTerminalClient::buttonEventDispatcher
protected

A list of all button event callbacks.

Definition at line 1655 of file isobus_virtual_terminal_client.hpp.

◆ changeActiveMaskEventDispatcher

EventDispatcher<VTChangeActiveMaskEvent> isobus::VirtualTerminalClient::changeActiveMaskEventDispatcher
protected

A list of all change active mask callbacks.

Definition at line 1660 of file isobus_virtual_terminal_client.hpp.

◆ changeNumericValueEventDispatcher

EventDispatcher<VTChangeNumericValueEvent> isobus::VirtualTerminalClient::changeNumericValueEventDispatcher
protected

A list of all change numeric value callbacks.

Definition at line 1659 of file isobus_virtual_terminal_client.hpp.

◆ changeSoftKeyMaskEventDispatcher

EventDispatcher<VTChangeSoftKeyMaskEvent> isobus::VirtualTerminalClient::changeSoftKeyMaskEventDispatcher
protected

A list of all change soft key mask callbacks.

Definition at line 1661 of file isobus_virtual_terminal_client.hpp.

◆ changeStringValueEventDispatcher

EventDispatcher<VTChangeStringValueEvent> isobus::VirtualTerminalClient::changeStringValueEventDispatcher
protected

A list of all change string value callbacks.

Definition at line 1662 of file isobus_virtual_terminal_client.hpp.

◆ commandAwaitingResponse

bool isobus::VirtualTerminalClient::commandAwaitingResponse = false
protected

Determines if we are currently waiting for a response to a command.

Definition at line 1649 of file isobus_virtual_terminal_client.hpp.

◆ commandQueue

std::vector<std::vector<std::uint8_t> > isobus::VirtualTerminalClient::commandQueue
protected

A queue of commands to send to the VT server.

Definition at line 1648 of file isobus_virtual_terminal_client.hpp.

◆ commandQueueMutex

Mutex isobus::VirtualTerminalClient::commandQueueMutex
protected

A mutex to protect the command queue.

Definition at line 1651 of file isobus_virtual_terminal_client.hpp.

◆ connectedVTVersion

std::uint8_t isobus::VirtualTerminalClient::connectedVTVersion = 0
protected

The VT server's supported max version.

Definition at line 1608 of file isobus_virtual_terminal_client.hpp.

◆ currentCommandFunctionCode

std::uint8_t isobus::VirtualTerminalClient::currentCommandFunctionCode = 0
protected

The VT server's current command function code.

Definition at line 1606 of file isobus_virtual_terminal_client.hpp.

◆ currentObjectPoolState

CurrentObjectPoolUploadState isobus::VirtualTerminalClient::currentObjectPoolState = CurrentObjectPoolUploadState::Uninitialized
protected

The current upload state of the object pool being processed.

Definition at line 1629 of file isobus_virtual_terminal_client.hpp.

◆ escMessageEventDispatcher

EventDispatcher<VTESCMessageEvent> isobus::VirtualTerminalClient::escMessageEventDispatcher
protected

A list of all ESC event callbacks.

Definition at line 1658 of file isobus_virtual_terminal_client.hpp.

◆ firstTimeInState

bool isobus::VirtualTerminalClient::firstTimeInState = false
protected

Stores if the current update cycle is the first time a state machine state has been processed.

Definition at line 1641 of file isobus_virtual_terminal_client.hpp.

◆ fontStylesBitfield

std::uint8_t isobus::VirtualTerminalClient::fontStylesBitfield = 0
protected

The text font capabilities supported by the VT server.

Definition at line 1619 of file isobus_virtual_terminal_client.hpp.

◆ hardwareFeaturesBitfield

std::uint8_t isobus::VirtualTerminalClient::hardwareFeaturesBitfield = 0
protected

The reported hardware features from the VT server.

Definition at line 1625 of file isobus_virtual_terminal_client.hpp.

◆ initialized

bool isobus::VirtualTerminalClient::initialized = false
protected

Stores the client initialization state.

Definition at line 1642 of file isobus_virtual_terminal_client.hpp.

◆ languageCommandInterface

LanguageCommandInterface isobus::VirtualTerminalClient::languageCommandInterface

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

Definition at line 1261 of file isobus_virtual_terminal_client.hpp.

◆ largeFontSizesBitfield

std::uint8_t isobus::VirtualTerminalClient::largeFontSizesBitfield = 0
protected

The large font sizes supported by the VT server.

Definition at line 1618 of file isobus_virtual_terminal_client.hpp.

◆ lastAuxiliaryMaintenanceTimestamp_ms

std::uint32_t isobus::VirtualTerminalClient::lastAuxiliaryMaintenanceTimestamp_ms = 0
protected

The timestamp from the last time we sent the maintenance message.

Definition at line 1632 of file isobus_virtual_terminal_client.hpp.

◆ lastCommandTimestamp_ms

std::uint32_t isobus::VirtualTerminalClient::lastCommandTimestamp_ms = 0
protected

The timestamp of the last command sent.

Definition at line 1650 of file isobus_virtual_terminal_client.hpp.

◆ lastObjectPoolIndex

std::uint32_t isobus::VirtualTerminalClient::lastObjectPoolIndex = 0
protected

The last object pool index that was processed.

Definition at line 1669 of file isobus_virtual_terminal_client.hpp.

◆ lastVTStatusTimestamp_ms

std::uint32_t isobus::VirtualTerminalClient::lastVTStatusTimestamp_ms = 0
protected

The timestamp of the last VT status message.

Definition at line 1601 of file isobus_virtual_terminal_client.hpp.

◆ lastWorkingSetMaintenanceTimestamp_ms

std::uint32_t isobus::VirtualTerminalClient::lastWorkingSetMaintenanceTimestamp_ms = 0
protected

The timestamp from the last time we sent the maintenance message.

Definition at line 1631 of file isobus_virtual_terminal_client.hpp.

◆ myControlFunction

std::shared_ptr<InternalControlFunction> isobus::VirtualTerminalClient::myControlFunction
protected

The internal control function the client uses to send from.

Definition at line 1596 of file isobus_virtual_terminal_client.hpp.

◆ numberPhysicalSoftkeys

std::uint8_t isobus::VirtualTerminalClient::numberPhysicalSoftkeys = 0
protected

The number of physical softkeys supported by the VT server.

Definition at line 1614 of file isobus_virtual_terminal_client.hpp.

◆ numberVirtualSoftkeysPerSoftkeyMask

std::uint8_t isobus::VirtualTerminalClient::numberVirtualSoftkeysPerSoftkeyMask = 0
protected

The number of virtual softkeys per softkey mask as reported by the VT server.

Definition at line 1613 of file isobus_virtual_terminal_client.hpp.

◆ objectPoolDataCallback

DataChunkCallback isobus::VirtualTerminalClient::objectPoolDataCallback = nullptr
protected

The callback to use to get pool data.

Definition at line 1668 of file isobus_virtual_terminal_client.hpp.

◆ objectPools

std::vector<ObjectPoolDataStruct> isobus::VirtualTerminalClient::objectPools
protected

A container to hold all object pools that have been assigned to the interface.

Definition at line 1633 of file isobus_virtual_terminal_client.hpp.

◆ ourAuxiliaryInputs

std::map<std::uint16_t, AuxiliaryInputState> isobus::VirtualTerminalClient::ourAuxiliaryInputs
protected

The inputs on this auxiliary input device.

Definition at line 1637 of file isobus_virtual_terminal_client.hpp.

◆ ourModelIdentificationCode

std::uint16_t isobus::VirtualTerminalClient::ourModelIdentificationCode = 1
protected

The model identification code of this input device.

Definition at line 1636 of file isobus_virtual_terminal_client.hpp.

◆ partnerControlFunction

std::shared_ptr<PartneredControlFunction> isobus::VirtualTerminalClient::partnerControlFunction
protected

The partner control function this client will send to.

Definition at line 1595 of file isobus_virtual_terminal_client.hpp.

◆ pointingEventDispatcher

EventDispatcher<VTPointingEvent> isobus::VirtualTerminalClient::pointingEventDispatcher
protected

A list of all pointing event callbacks.

Definition at line 1656 of file isobus_virtual_terminal_client.hpp.

◆ selectInputObjectEventDispatcher

EventDispatcher<VTSelectInputObjectEvent> isobus::VirtualTerminalClient::selectInputObjectEventDispatcher
protected

A list of all select input object callbacks.

Definition at line 1657 of file isobus_virtual_terminal_client.hpp.

◆ sendAuxiliaryMaintenance

bool isobus::VirtualTerminalClient::sendAuxiliaryMaintenance = false
protected

Used internally to enable and disable cyclic sending of the auxiliary maintenance message.

Definition at line 1644 of file isobus_virtual_terminal_client.hpp.

◆ sendWorkingSetMaintenance

bool isobus::VirtualTerminalClient::sendWorkingSetMaintenance = false
protected

Used internally to enable and disable cyclic sending of the working set maintenance message.

Definition at line 1643 of file isobus_virtual_terminal_client.hpp.

◆ shouldTerminate

bool isobus::VirtualTerminalClient::shouldTerminate = false
protected

Used to determine if the client should exit and join the worker thread.

Definition at line 1645 of file isobus_virtual_terminal_client.hpp.

◆ smallFontSizesBitfield

std::uint8_t isobus::VirtualTerminalClient::smallFontSizesBitfield = 0
protected

The small font sizes supported by the VT server.

Definition at line 1617 of file isobus_virtual_terminal_client.hpp.

◆ softKeyEventDispatcher

EventDispatcher<VTKeyEvent> isobus::VirtualTerminalClient::softKeyEventDispatcher
protected

A list of all soft key event callbacks.

Definition at line 1654 of file isobus_virtual_terminal_client.hpp.

◆ softKeyXAxisPixels

std::uint8_t isobus::VirtualTerminalClient::softKeyXAxisPixels = 0
protected

The size of a soft key X dimension as reported by the VT server.

Definition at line 1611 of file isobus_virtual_terminal_client.hpp.

◆ softKeyYAxisPixels

std::uint8_t isobus::VirtualTerminalClient::softKeyYAxisPixels = 0
protected

The size of a soft key Y dimension as reported by the VT server.

Definition at line 1612 of file isobus_virtual_terminal_client.hpp.

◆ state

StateMachineState isobus::VirtualTerminalClient::state = StateMachineState::Disconnected
protected

The current client state machine state.

Definition at line 1628 of file isobus_virtual_terminal_client.hpp.

◆ stateMachineTimestamp_ms

std::uint32_t isobus::VirtualTerminalClient::stateMachineTimestamp_ms = 0
protected

Timestamp from the last state machine update.

Definition at line 1630 of file isobus_virtual_terminal_client.hpp.

◆ supportedGraphicsMode

GraphicMode isobus::VirtualTerminalClient::supportedGraphicsMode = GraphicMode::TwoHundredFiftySixColour
protected

The graphics mode reported by the VT server.

Definition at line 1622 of file isobus_virtual_terminal_client.hpp.

◆ txFlags

ProcessingFlags isobus::VirtualTerminalClient::txFlags
protected

A retry mechanism for internal Tx messages.

Definition at line 1598 of file isobus_virtual_terminal_client.hpp.

◆ unsupportedFunctions

std::vector<std::uint8_t> isobus::VirtualTerminalClient::unsupportedFunctions
protected

Holds the functions unsupported by the server.

Definition at line 1634 of file isobus_virtual_terminal_client.hpp.

◆ userLayoutHideShowEventDispatcher

EventDispatcher<VTUserLayoutHideShowEvent> isobus::VirtualTerminalClient::userLayoutHideShowEventDispatcher
protected

A list of all user layout hide/show callbacks.

Definition at line 1663 of file isobus_virtual_terminal_client.hpp.

◆ VT_STATUS_TIMEOUT_MS

constexpr std::uint32_t isobus::VirtualTerminalClient::VT_STATUS_TIMEOUT_MS = 3000
staticconstexprprotected

The max allowable time between VT status messages before its considered offline.

Definition at line 1591 of file isobus_virtual_terminal_client.hpp.

◆ workerThread

std::thread* isobus::VirtualTerminalClient::workerThread = nullptr
protected

The worker thread that updates this interface.

Definition at line 1639 of file isobus_virtual_terminal_client.hpp.

◆ WORKING_SET_MAINTENANCE_TIMEOUT_MS

constexpr std::uint32_t isobus::VirtualTerminalClient::WORKING_SET_MAINTENANCE_TIMEOUT_MS = 1000
staticconstexprprotected

The delay between working set maintenance messages.

Definition at line 1592 of file isobus_virtual_terminal_client.hpp.

◆ xPixels

std::uint16_t isobus::VirtualTerminalClient::xPixels = 0
protected

The x pixel dimension as reported by the VT server.

Definition at line 1623 of file isobus_virtual_terminal_client.hpp.

◆ yPixels

std::uint16_t isobus::VirtualTerminalClient::yPixels = 0
protected

The y pixel dimension as reported by the VT server.

Definition at line 1624 of file isobus_virtual_terminal_client.hpp.


The documentation for this class was generated from the following files: