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 | Static Protected Attributes | Private Types | Private Attributes | List of all members
isobus::TaskControllerClient Class Reference

A class to manage a client connection to a ISOBUS field computer's task controller or data logger. More...

#include <isobus_task_controller_client.hpp>

Collaboration diagram for isobus::TaskControllerClient:
[legend]

Classes

struct  ProcessDataCallbackInfo
 Stores data related to requests and commands from the TC. More...
 
struct  RequestValueCommandCallbackInfo
 Stores a TC value command callback along with its parent pointer. More...
 
struct  ValueCommandCallbackInfo
 Stores a TC value command callback along with its parent pointer. More...
 

Public Types

enum class  StateMachineState {
  Disconnected , WaitForStartUpDelay , WaitForServerStatusMessage , SendWorkingSetMaster ,
  SendStatusMessage , RequestVersion , WaitForRequestVersionResponse , WaitForRequestVersionFromServer ,
  SendRequestVersionResponse , RequestLanguage , WaitForLanguageResponse , ProcessDDOP ,
  RequestStructureLabel , WaitForStructureLabelResponse , RequestLocalizationLabel , WaitForLocalizationLabelResponse ,
  SendDeleteObjectPool , WaitForDeleteObjectPoolResponse , SendRequestTransferObjectPool , WaitForRequestTransferObjectPoolResponse ,
  BeginTransferDDOP , WaitForDDOPTransfer , WaitForObjectPoolTransferResponse , SendObjectPoolActivate ,
  WaitForObjectPoolActivateResponse , Connected , DeactivateObjectPool , WaitForObjectPoolDeactivateResponse
}
 Enumerates the different internal state machine states. More...
 
enum class  Version : std::uint8_t {
  DraftInternationalStandard = 0 , FinalDraftInternationalStandardFirstEdition = 1 , FirstPublishedEdition = 2 , SecondEditionDraft = 3 ,
  SecondPublishedEdition = 4 , Unknown = 0xFF
}
 Enumerates the different task controller versions. More...
 
enum class  ServerOptions : std::uint8_t {
  SupportsDocumentation = 0x01 , SupportsTCGEOWithoutPositionBasedControl = 0x02 , SupportsTCGEOWithPositionBasedControl = 0x04 , SupportsPeerControlAssignment = 0x08 ,
  SupportsImplementSectionControlFunctionality = 0x10 , ReservedOption1 = 0x20 , ReservedOption2 = 0x40 , ReservedOption3 = 0x80
}
 Enumerates the bits stored in our version data that we send to the TC when handshaking. More...
 
using RequestValueCommandCallback
 A callback for handling a value request command from the TC.
 
using ValueCommandCallback
 A callback for handling a set value command from the TC.
 

Public Member Functions

 TaskControllerClient (std::shared_ptr< PartneredControlFunction > partner, std::shared_ptr< InternalControlFunction > clientSource, std::shared_ptr< PartneredControlFunction > primaryVT)
 The constructor for a TaskControllerClient.
 
 ~TaskControllerClient ()
 Destructor for the client.
 
void initialize (bool spawnThread)
 This function starts the state machine. Call this once you have created your DDOP, set up the client capabilities, and are ready to connect.
 
void add_request_value_callback (RequestValueCommandCallback callback, void *parentPointer)
 This adds a callback that will be called when the TC requests the value of one of your variables.
 
void add_value_command_callback (ValueCommandCallback callback, void *parentPointer)
 Adds a callback that will be called when the TC commands a new value for one of your variables.
 
void remove_request_value_callback (RequestValueCommandCallback callback, void *parentPointer)
 Removes the specified callback from the list of value request callbacks.
 
void remove_value_command_callback (ValueCommandCallback callback, void *parentPointer)
 Removes the specified callback from the list of value command callbacks.
 
void configure (std::shared_ptr< DeviceDescriptorObjectPool > DDOP, std::uint8_t maxNumberBoomsSupported, std::uint8_t maxNumberSectionsSupported, std::uint8_t maxNumberChannelsSupportedForPositionBasedControl, bool reportToTCSupportsDocumentation, bool reportToTCSupportsTCGEOWithoutPositionBasedControl, bool reportToTCSupportsTCGEOWithPositionBasedControl, bool reportToTCSupportsPeerControlAssignment, bool reportToTCSupportsImplementSectionControl)
 A convenient way to set all client options at once instead of calling the individual setters.
 
void configure (std::uint8_t const *binaryDDOP, std::uint32_t DDOPSize, std::uint8_t maxNumberBoomsSupported, std::uint8_t maxNumberSectionsSupported, std::uint8_t maxNumberChannelsSupportedForPositionBasedControl, bool reportToTCSupportsDocumentation, bool reportToTCSupportsTCGEOWithoutPositionBasedControl, bool reportToTCSupportsTCGEOWithPositionBasedControl, bool reportToTCSupportsPeerControlAssignment, bool reportToTCSupportsImplementSectionControl)
 A convenient way to set all client options at once instead of calling the individual setters.
 
void configure (std::shared_ptr< std::vector< std::uint8_t > > binaryDDOP, std::uint8_t maxNumberBoomsSupported, std::uint8_t maxNumberSectionsSupported, std::uint8_t maxNumberChannelsSupportedForPositionBasedControl, bool reportToTCSupportsDocumentation, bool reportToTCSupportsTCGEOWithoutPositionBasedControl, bool reportToTCSupportsTCGEOWithPositionBasedControl, bool reportToTCSupportsPeerControlAssignment, bool reportToTCSupportsImplementSectionControl)
 A convenient way to set all client options at once instead of calling the individual setters.
 
void restart ()
 Calling this function will reset the task controller client's connection with the TC server, and cause it to reconnect after a short delay.
 
void terminate ()
 Terminates the client and joins the worker thread if applicable.
 
std::shared_ptr< InternalControlFunctionget_internal_control_function () const
 Returns the internal control function being used by the interface to send messages.
 
std::shared_ptr< PartneredControlFunctionget_partner_control_function () const
 Returns the control function of the TC server with which this TC client communicates.
 
std::uint8_t get_number_booms_supported () const
 Returns the previously configured number of booms supported by the client.
 
std::uint8_t get_number_sections_supported () const
 Returns the previously configured number of section supported by the client.
 
std::uint8_t get_number_channels_supported_for_position_based_control () const
 Returns the previously configured number of channels supported for position based control.
 
bool get_supports_documentation () const
 Returns if the client has been configured to report that it supports documentation to the TC.
 
bool get_supports_tcgeo_without_position_based_control () const
 Returns if the client has been configured to report that it supports TC-GEO without position based control to the TC.
 
bool get_supports_tcgeo_with_position_based_control () const
 Returns if the client has been configured to report that it supports TC-GEO with position based control to the TC.
 
bool get_supports_peer_control_assignment () const
 Returns if the client has been configured to report that it supports peer control assignment to the TC.
 
bool get_supports_implement_section_control () const
 Returns if the client has been configured to report that it supports implement section control to the TC.
 
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 TC server.
 
bool get_is_task_active () const
 Returns if a task is active as indicated by the TC.
 
StateMachineState get_state () const
 Returns the current state machine state.
 
std::uint8_t get_connected_tc_number_booms_supported () const
 Returns the number of booms that the connected TC supports for section control.
 
std::uint8_t get_connected_tc_number_sections_supported () const
 Returns the number of sections that the connected TC supports for section control.
 
std::uint8_t get_connected_tc_number_channels_supported () const
 Returns the number of channels that the connected TC supports for position control.
 
std::uint8_t get_connected_tc_max_boot_time () const
 Returns the maximum boot time in seconds reported by the connected TC.
 
bool get_connected_tc_option_supported (ServerOptions option) const
 Returns if the connected TC supports a certain option.
 
Version get_connected_tc_version () const
 Returns the version of the connected task controller.
 
void on_value_changed_trigger (std::uint16_t elementNumber, std::uint16_t DDI)
 Tells the TC client that a value was changed or the TC client needs to command a value to the TC server.
 
bool request_task_controller_identification () const
 Sends a broadcast request to TCs to identify themseleves.
 
bool reupload_device_descriptor_object_pool (std::shared_ptr< std::vector< std::uint8_t > > binaryDDOP)
 If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.
 
bool reupload_device_descriptor_object_pool (std::uint8_t const *binaryDDOP, std::uint32_t DDOPSize)
 If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.
 
bool reupload_device_descriptor_object_pool (std::shared_ptr< DeviceDescriptorObjectPool > DDOP)
 If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.
 
void update ()
 The cyclic update function for this interface.
 

Public Attributes

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

Protected Types

enum class  ProcessDataCommands : std::uint8_t {
  TechnicalCapabilities = 0x00 , DeviceDescriptor = 0x01 , RequestValue = 0x02 , Value = 0x03 ,
  MeasurementTimeInterval = 0x04 , MeasurementDistanceInterval = 0x05 , MeasurementMinimumWithinThreshold = 0x06 , MeasurementMaximumWithinThreshold = 0x07 ,
  MeasurementChangeThreshold = 0x08 , PeerControlAssignment = 0x09 , SetValueAndAcknowledge = 0x0A , Reserved1 = 0x0B ,
  Reserved2 = 0x0C , ProcessDataAcknowledge = 0x0D , StatusMessage = 0x0E , ClientTask = 0x0F
}
 Enumerates the different Process Data commands from ISO11783-10 Table B.1. More...
 
enum class  TechnicalDataMessageCommands : std::uint8_t { ParameterRequestVersion = 0x00 , ParameterVersion = 0x01 , IdentifyTaskController = 0x02 }
 Enumerates the subcommands within the technical data message group. More...
 
enum class  DeviceDescriptorCommands : std::uint8_t {
  RequestStructureLabel = 0x00 , StructureLabel = 0x01 , RequestLocalizationLabel = 0x02 , LocalizationLabel = 0x03 ,
  RequestObjectPoolTransfer = 0x04 , RequestObjectPoolTransferResponse = 0x05 , ObjectPoolTransfer = 0x06 , ObjectPoolTransferResponse = 0x07 ,
  ObjectPoolActivateDeactivate = 0x08 , ObjectPoolActivateDeactivateResponse = 0x09 , ObjectPoolDelete = 0x0A , ObjectPoolDeleteResponse = 0x0B ,
  ChangeDesignator = 0x0C , ChangeDesignatorResponse = 0x0D
}
 Enumerates the subcommands within the device descriptor command message group. More...
 

Protected Member Functions

void clear_queues ()
 Clears all queued TC commands and responses.
 
bool get_was_ddop_supplied () const
 Checks if a DDOP was provided via one of the configure functions.
 
void process_labels_from_ddop ()
 Searches the DDOP for a device object and stores that object's structure and localization labels.
 
void process_queued_commands ()
 Processes queued TC requests and commands. Calls the user's callbacks if needed.
 
void process_queued_threshold_commands ()
 Processes measurement threshold/interval commands.
 
bool send_delete_object_pool () const
 Sends the delete object pool command to the TC.
 
bool send_generic_process_data (std::uint8_t multiplexor) const
 Sends a process data message with 1 mux byte and all 0xFFs as payload.
 
bool send_object_pool_activate () const
 Sends the activate object pool message.
 
bool send_object_pool_deactivate () const
 Sends the deactivate object pool message.
 
bool send_pdack (std::uint16_t elementNumber, std::uint16_t ddi) const
 Sends a Process Data ACK.
 
bool send_request_localization_label () const
 Sends a request to the TC for its localization label.
 
bool send_request_object_pool_transfer () const
 Sends a request to the TC indicating we wish to transfer an object pool.
 
bool send_request_structure_label () const
 Sends a request to the TC for its structure label.
 
bool send_request_version_response () const
 Sends the response to a request for version from the TC.
 
bool send_status () const
 Sends the status message to the TC.
 
bool send_value_command (std::uint16_t elementNumber, std::uint16_t ddi, std::int32_t value) const
 Sends the value command message for a specific DDI/Element number combo.
 
bool send_version_request () const
 Sends the version request message to the TC.
 
bool send_working_set_master () const
 Sends the working set master message.
 
void set_common_config_items (std::uint8_t maxNumberBoomsSupported, std::uint8_t maxNumberSectionsSupported, std::uint8_t maxNumberChannelsSupportedForPositionBasedControl, bool reportToTCSupportsDocumentation, bool reportToTCSupportsTCGEOWithoutPositionBasedControl, bool reportToTCSupportsTCGEOWithPositionBasedControl, bool reportToTCSupportsPeerControlAssignment, bool reportToTCSupportsImplementSectionControl)
 Sets the common items found in all versions of configure
 
void set_state (StateMachineState newState)
 Changes the internal state machine state and updates the associated timestamp.
 
void set_state (StateMachineState newState, std::uint32_t timestamp)
 Changes the internal state machine state and updates the associated timestamp to the specified one.
 
void select_language_command_partner ()
 Sets the behavior of the language command interface based on the TC's reported version information.
 
void worker_thread_function ()
 The worker thread will execute this function when it runs, if applicable.
 

Static Protected Member Functions

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 void process_rx_message (const CANMessage &message, void *parentPointer)
 Processes a CAN message destined for any TC client.
 
static void process_tx_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 Protected Attributes

static constexpr std::uint32_t SIX_SECOND_TIMEOUT_MS = 6000
 The startup delay time defined in the standard.
 
static constexpr std::uint16_t TWO_SECOND_TIMEOUT_MS = 2000
 Used for sending the status message to the TC.
 

Private Types

enum class  DDOPUploadType { ProgramaticallyGenerated , UserProvidedBinaryPointer , UserProvidedVector }
 Enumerates the modes that the client may use when dealing with a DDOP. More...
 

Private 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.
 
std::shared_ptr< PartneredControlFunctionprimaryVirtualTerminal
 A pointer to the primary VT's control function. Used for TCs < version 4 and language command compatibility.
 
std::shared_ptr< DeviceDescriptorObjectPoolclientDDOP
 Stores the DDOP for upload to the TC (if needed)
 
std::uint8_t const * userSuppliedBinaryDDOP = nullptr
 Stores a client-provided DDOP if one was provided.
 
std::shared_ptr< std::vector< std::uint8_t > > userSuppliedVectorDDOP
 Stores a client-provided DDOP if one was provided.
 
std::vector< std::uint8_t > generatedBinaryDDOP
 Stores the DDOP in binary form after it has been generated.
 
std::vector< RequestValueCommandCallbackInforequestValueCallbacks
 A list of callbacks that will be called when the TC requests a process data value.
 
std::vector< ValueCommandCallbackInfovalueCommandsCallbacks
 A list of callbacks that will be called when the TC sets a process data value.
 
std::list< ProcessDataCallbackInfoqueuedValueRequests
 A list of queued value requests that will be processed on the next update.
 
std::list< ProcessDataCallbackInfoqueuedValueCommands
 A list of queued value commands that will be processed on the next update.
 
std::list< ProcessDataCallbackInfomeasurementTimeIntervalCommands
 A list of measurement commands that will be processed on a time interval.
 
std::list< ProcessDataCallbackInfomeasurementMinimumThresholdCommands
 A list of measurement commands that will be processed when the value drops below a threshold.
 
std::list< ProcessDataCallbackInfomeasurementMaximumThresholdCommands
 A list of measurement commands that will be processed when the value above a threshold.
 
std::list< ProcessDataCallbackInfomeasurementOnChangeThresholdCommands
 A list of measurement commands that will be processed when the value changes by the specified amount.
 
Mutex clientMutex
 A general mutex to protect data in the worker thread against data accessed by the app or the network manager.
 
std::thread * workerThread = nullptr
 The worker thread that updates this interface.
 
std::string ddopStructureLabel
 Stores a pre-parsed structure label, helps to avoid processing the whole DDOP during a CAN message callback.
 
std::string previousStructureLabel
 Stores the last structure label we used, helps to warn the user if they aren't updating the label properly.
 
std::array< std::uint8_t, 7 > ddopLocalizationLabel = { 0 }
 Stores a pre-parsed localization label, helps to avoid processing the whole DDOP during a CAN message callback.
 
DDOPUploadType ddopUploadMode = DDOPUploadType::ProgramaticallyGenerated
 Determines if DDOPs get generated or raw uploaded.
 
StateMachineState currentState = StateMachineState::Disconnected
 Tracks the internal state machine's current state.
 
std::uint32_t stateMachineTimestamp_ms = 0
 Timestamp that tracks when the state machine last changed states (in milliseconds)
 
std::uint32_t statusMessageTimestamp_ms = 0
 Timestamp corresponding to the last time we sent a status message to the TC.
 
std::uint32_t serverStatusMessageTimestamp_ms = 0
 Timestamp corresponding to the last time we received a status message from the TC.
 
std::uint32_t userSuppliedBinaryDDOPSize_bytes = 0
 The number of bytes in the user provided binary DDOP (if one was provided)
 
std::uint32_t languageCommandWaitingTimestamp_ms = 0
 Timestamp used to determine when to give up on waiting for a language command response.
 
std::uint8_t numberOfWorkingSetMembers = 1
 The number of working set members that will be reported in the working set master message.
 
std::uint8_t tcStatusBitfield = 0
 The last received TC/DL status from the status message.
 
std::uint8_t sourceAddressOfCommandBeingExecuted = 0
 Source address of client for which the current command is being executed.
 
std::uint8_t commandBeingExecuted = 0
 The current command the TC is executing as reported in the status message.
 
std::uint8_t serverVersion = 0
 The detected version of the TC Server.
 
std::uint8_t maxServerBootTime_s = 0
 Maximum number of seconds from a power cycle to transmission of first �Task Controller Status message� or 0xFF.
 
std::uint8_t serverOptionsByte1 = 0
 The options specified in ISO 11783-10 that this TC, DL, or client meets (The definition of this byte is introduced in ISO11783-10 version 3)
 
std::uint8_t serverOptionsByte2 = 0
 Reserved for ISO assignment, should be zero or 0xFF.
 
std::uint8_t serverNumberOfBoomsForSectionControl = 0
 When reported by the TC, this is the maximum number of section control booms that are supported.
 
std::uint8_t serverNumberOfSectionsForSectionControl = 0
 When reported by the TC, this is the maximum number of sections that are supported (or 0xFF for version 2 and earlier).
 
std::uint8_t serverNumberOfChannelsForPositionBasedControl = 0
 When reported by the TC, this is the maximum number of individual control channels that is supported.
 
std::uint8_t numberBoomsSupported = 0
 Stores the number of booms this client supports for section control.
 
std::uint8_t numberSectionsSupported = 0
 Stores the number of sections this client supports for section control.
 
std::uint8_t numberChannelsSupportedForPositionBasedControl = 0
 Stores the number of channels this client supports for position based control.
 
bool initialized = false
 Tracks the initialization state of the interface instance.
 
bool shouldTerminate = false
 This variable tells the worker thread to exit.
 
bool enableStatusMessage = false
 Enables sending the status message to the TC cyclically.
 
bool supportsDocumentation = false
 Determines if the client reports documentation support to the TC.
 
bool supportsTCGEOWithoutPositionBasedControl = false
 Determines if the client reports TC-GEO without position control capability to the TC.
 
bool supportsTCGEOWithPositionBasedControl = false
 Determines if the client reports TC-GEO with position control capability to the TC.
 
bool supportsPeerControlAssignment = false
 Determines if the client reports peer control assignment capability to the TC.
 
bool supportsImplementSectionControl = false
 Determines if the client reports implement section control capability to the TC.
 
bool shouldReuploadAfterDDOPDeletion = false
 Used to determine how the state machine should progress when updating a DDOP.
 

Detailed Description

A class to manage a client connection to a ISOBUS field computer's task controller or data logger.

Definition at line 26 of file isobus_task_controller_client.hpp.

Member Typedef Documentation

◆ RequestValueCommandCallback

Initial value:
bool (*)(std::uint16_t elementNumber,
std::uint16_t DDI,
std::int32_t &processVariableValue,
void *parentPointer)

A callback for handling a value request command from the TC.

Definition at line 87 of file isobus_task_controller_client.hpp.

◆ ValueCommandCallback

Initial value:
bool (*)(std::uint16_t elementNumber,
std::uint16_t DDI,
std::int32_t processVariableValue,
void *parentPointer)

A callback for handling a set value command from the TC.

Definition at line 93 of file isobus_task_controller_client.hpp.

Member Enumeration Documentation

◆ DDOPUploadType

Enumerates the modes that the client may use when dealing with a DDOP.

Enumerator
ProgramaticallyGenerated 

Using the AgIsoStack++ DeviceDescriptorObjectPool class.

UserProvidedBinaryPointer 

Using a raw pointer to a binary DDOP.

UserProvidedVector 

Uses a vector of bytes that comprise a binary DDOP.

Definition at line 609 of file isobus_task_controller_client.hpp.

◆ DeviceDescriptorCommands

enum class isobus::TaskControllerClient::DeviceDescriptorCommands : std::uint8_t
strongprotected

Enumerates the subcommands within the device descriptor command message group.

Enumerator
RequestStructureLabel 

Allows the client to determine the availability of the requested device descriptor structure.

StructureLabel 

The Structure Label message is sent by the TC or DL to inform the client about the availability of the requested version of the device descriptor structure.

RequestLocalizationLabel 

Allows the client to determine the availability of the requested device descriptor localization.

LocalizationLabel 

Sent by the TC or DL to inform the client about the availability of the requested localization version of the device descriptor.

RequestObjectPoolTransfer 

The Request Object-pool Transfer message allows the client to determine whether it is allowed to transfer(part of) the device descriptor object pool to the TC.

RequestObjectPoolTransferResponse 

Sent in response to Request Object-pool Transfer message.

ObjectPoolTransfer 

Enables the client to transfer (part of) the device descriptor object pool to the TC.

ObjectPoolTransferResponse 

Response to an object pool transfer.

ObjectPoolActivateDeactivate 

sent by a client to complete its connection procedure to a TC or DL or to disconnect from a TC or DL.

ObjectPoolActivateDeactivateResponse 

sent by a client to complete its connection procedure to a TC or DL or to disconnect from a TC or DL.

ObjectPoolDelete 

This is a message to delete the device descriptor object pool for the client that sends this message.

ObjectPoolDeleteResponse 

TC response to a Object-pool Delete message.

ChangeDesignator 

This message is used to update the designator of an object.

ChangeDesignatorResponse 

Sent in response to Change Designator message.

Definition at line 388 of file isobus_task_controller_client.hpp.

◆ ProcessDataCommands

enum class isobus::TaskControllerClient::ProcessDataCommands : std::uint8_t
strongprotected

Enumerates the different Process Data commands from ISO11783-10 Table B.1.

Enumerator
TechnicalCapabilities 

Used for determining the technical capabilities of a TC, DL, or client.

DeviceDescriptor 

Subcommand for the transfer and management of device descriptors.

RequestValue 

The value of the data entity specified by the data dictionary identifier is requested.

Value 

This command is used both to answer a request value command and to set the value of a process data entity.

MeasurementTimeInterval 

The process data value is the time interval for sending the data element specified by the data dictionary identifier.

MeasurementDistanceInterval 

The process data value is the distance interval for sending the data element specified by the data dictionary identifier.

MeasurementMinimumWithinThreshold 

The client has to send the value of this data element to the TC or DL when the value is higher than the threshold value.

MeasurementMaximumWithinThreshold 

The client has to send the value of this data element to the TC or DL when the value is lower than the threshold value.

MeasurementChangeThreshold 

The client has to send the value of this data element to the TC or DL when the value change is higher than or equal to the change threshold since last transmission.

PeerControlAssignment 

This message is used to establish a connection between a setpoint value source and a setpoint value user.

SetValueAndAcknowledge 

This command is used to set the value of a process data entity and request a reception acknowledgement from the recipient.

Reserved1 

Reserved.

Reserved2 

Reserved.

ProcessDataAcknowledge 

Message is a Process Data Acknowledge (PDACK).

StatusMessage 

Message is a Task Controller Status message.

ClientTask 

Sent by the client.

Definition at line 359 of file isobus_task_controller_client.hpp.

◆ ServerOptions

enum class isobus::TaskControllerClient::ServerOptions : std::uint8_t
strong

Enumerates the bits stored in our version data that we send to the TC when handshaking.

Definition at line 74 of file isobus_task_controller_client.hpp.

◆ StateMachineState

Enumerates the different internal state machine states.

Enumerator
Disconnected 

Not communicating with the TC.

WaitForStartUpDelay 

Client is waiting for the mandatory 6s startup delay.

WaitForServerStatusMessage 

Client is waiting to identify the TC via reception of a valid status message.

SendWorkingSetMaster 

Client initating communication with TC by sending the working set master message.

SendStatusMessage 

Enables sending the status message.

RequestVersion 

Requests the TC version and related data from the TC.

WaitForRequestVersionResponse 

Waiting for the TC to respond to a request for its version.

WaitForRequestVersionFromServer 

Waiting to see if the TC will request our version (optional)

SendRequestVersionResponse 

Sending our response to the TC's request for out version information.

RequestLanguage 

Client is requesting the language command PGN from the TC.

WaitForLanguageResponse 

Waiting for a response to our request for the language command PGN.

ProcessDDOP 

Client is processing the DDOP into a binary DDOP and validating object IDs in the pool.

RequestStructureLabel 

Client is requesting the DDOP structure label that the TC has (if any)

WaitForStructureLabelResponse 

Client is waiting for the TC to respond to our request for its structure label.

RequestLocalizationLabel 

Client is requesting the DDOP localization label the TC has for us (if any)

WaitForLocalizationLabelResponse 

Waiting for a response to our request for the localization label from the TC.

SendDeleteObjectPool 

Client is sending a request to the TC to delete its current copy of our object pool.

WaitForDeleteObjectPoolResponse 

Waiting for a response to our request to delete our object pool off the TC.

SendRequestTransferObjectPool 

Client is requesting to transfer the DDOP to the TC.

WaitForRequestTransferObjectPoolResponse 

Waiting for a response to our request to transfer the DDOP to the TC.

BeginTransferDDOP 

Client is initiating the DDOP transfer.

WaitForDDOPTransfer 

The DDOP transfer in ongoing. Client is waiting for a callback from the transport layer.

WaitForObjectPoolTransferResponse 

DDOP has transferred. Waiting for a response to our object pool transfer.

SendObjectPoolActivate 

Client is sending the activate object pool message.

WaitForObjectPoolActivateResponse 

Client is waiting for a response to its request to activate the object pool.

Connected 

TC is connected.

DeactivateObjectPool 

Client is shutting down and is therefore sending the deactivate object pool message.

WaitForObjectPoolDeactivateResponse 

Client is waiting for a response to the deactivate object pool message.

Definition at line 30 of file isobus_task_controller_client.hpp.

◆ TechnicalDataMessageCommands

enum class isobus::TaskControllerClient::TechnicalDataMessageCommands : std::uint8_t
strongprotected

Enumerates the subcommands within the technical data message group.

Enumerator
ParameterRequestVersion 

The Request Version message allows the TC, DL, and the client to determine the ISO 11783-10 version of the implementation.

ParameterVersion 

The Version message is sent in response to the request version message and contains the ISO 11783-10 version information of the TC, DL, or client implementation.

IdentifyTaskController 

Upon receipt of this message, the TC shall display, for a period of 3 s, the TC Number.

Definition at line 380 of file isobus_task_controller_client.hpp.

◆ Version

enum class isobus::TaskControllerClient::Version : std::uint8_t
strong

Enumerates the different task controller versions.

Enumerator
DraftInternationalStandard 

The version of the DIS (draft International Standard).

FinalDraftInternationalStandardFirstEdition 

The version of the FDIS.1 (final draft International Standard, first edition).

FirstPublishedEdition 

The version of the FDIS.2 and the first edition published ss an International Standard.

SecondEditionDraft 

The version of the second edition published as a draft International Standard(E2.DIS).

SecondPublishedEdition 

The version of the second edition published as the final draft International Standard(E2.FDIS) and as the International Standard(E2.IS)

Definition at line 63 of file isobus_task_controller_client.hpp.

Constructor & Destructor Documentation

◆ TaskControllerClient()

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

The constructor for a TaskControllerClient.

Parameters
[in]partnerThe TC server control function
[in]clientSourceThe internal control function to communicate from
[in]primaryVTPointer to our primary VT. This is optional (can be nullptr), but should be provided if possible to provide the best compatibility to TC < version 4.

Definition at line 27 of file isobus_task_controller_client.cpp.

◆ ~TaskControllerClient()

isobus::TaskControllerClient::~TaskControllerClient ( )

Destructor for the client.

Definition at line 35 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ add_request_value_callback()

void isobus::TaskControllerClient::add_request_value_callback ( RequestValueCommandCallback callback,
void * parentPointer )

This adds a callback that will be called when the TC requests the value of one of your variables.

The task controller will often send a request for the value of a process data variable. When the stack receives those messages, it will call this callback to request the value from your application. You must provide the value at that time for the associated process data variable identified by its element number and DDI.

Parameters
[in]callbackThe callback to add
[in]parentPointerA generic context variable that will be passed into the associated callback when it gets called

Definition at line 73 of file isobus_task_controller_client.cpp.

◆ add_value_command_callback()

void isobus::TaskControllerClient::add_value_command_callback ( ValueCommandCallback callback,
void * parentPointer )

Adds a callback that will be called when the TC commands a new value for one of your variables.

The task controller will often send a command to set one of your process data variables to a new value. This callback will get called when that happens, and you will need to set the variable to the commanded value in your application.

Parameters
[in]callbackThe callback to add
[in]parentPointerA generic context variable that will be passed into the associated callback when it gets called

Definition at line 81 of file isobus_task_controller_client.cpp.

◆ clear_queues()

void isobus::TaskControllerClient::clear_queues ( )
protected

Clears all queued TC commands and responses.

Definition at line 889 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ configure() [1/3]

void isobus::TaskControllerClient::configure ( std::shared_ptr< DeviceDescriptorObjectPool > DDOP,
std::uint8_t maxNumberBoomsSupported,
std::uint8_t maxNumberSectionsSupported,
std::uint8_t maxNumberChannelsSupportedForPositionBasedControl,
bool reportToTCSupportsDocumentation,
bool reportToTCSupportsTCGEOWithoutPositionBasedControl,
bool reportToTCSupportsTCGEOWithPositionBasedControl,
bool reportToTCSupportsPeerControlAssignment,
bool reportToTCSupportsImplementSectionControl )

A convenient way to set all client options at once instead of calling the individual setters.

This function sets up the parameters that the client will report to the TC server. These parameters should be tailored to your specific application.

Note
This version of the configure function takes a DeviceDescriptorObjectPool. The other versions of the configure function take various other kinds of DDOP.
Parameters
[in]DDOPThe device descriptor object pool to upload to the TC
[in]maxNumberBoomsSupportedConfigures the max number of booms the client supports
[in]maxNumberSectionsSupportedConfigures the max number of sections supported by the client for section control
[in]maxNumberChannelsSupportedForPositionBasedControlConfigures the max number of channels supported by the client for position based control
[in]reportToTCSupportsDocumentationDenotes if your app supports documentation
[in]reportToTCSupportsTCGEOWithoutPositionBasedControlDenotes if your app supports TC-GEO without position based control
[in]reportToTCSupportsTCGEOWithPositionBasedControlDenotes if your app supports TC-GEO with position based control
[in]reportToTCSupportsPeerControlAssignmentDenotes if your app supports peer control assignment
[in]reportToTCSupportsImplementSectionControlDenotes if your app supports implement section control

Definition at line 115 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ configure() [2/3]

void isobus::TaskControllerClient::configure ( std::shared_ptr< std::vector< std::uint8_t > > binaryDDOP,
std::uint8_t maxNumberBoomsSupported,
std::uint8_t maxNumberSectionsSupported,
std::uint8_t maxNumberChannelsSupportedForPositionBasedControl,
bool reportToTCSupportsDocumentation,
bool reportToTCSupportsTCGEOWithoutPositionBasedControl,
bool reportToTCSupportsTCGEOWithPositionBasedControl,
bool reportToTCSupportsPeerControlAssignment,
bool reportToTCSupportsImplementSectionControl )

A convenient way to set all client options at once instead of calling the individual setters.

This function sets up the parameters that the client will report to the TC server. These parameters should be tailored to your specific application.

Note
This version of the configure function takes a vector of bytes, and stores a copy of it. The other versions of the configure function take various other kinds of DDOP.
Parameters
[in]binaryDDOPThe device descriptor object pool to upload to the TC
[in]maxNumberBoomsSupportedConfigures the max number of booms the client supports
[in]maxNumberSectionsSupportedConfigures the max number of sections supported by the client for section control
[in]maxNumberChannelsSupportedForPositionBasedControlConfigures the max number of channels supported by the client for position based control
[in]reportToTCSupportsDocumentationDenotes if your app supports documentation
[in]reportToTCSupportsTCGEOWithoutPositionBasedControlDenotes if your app supports TC-GEO without position based control
[in]reportToTCSupportsTCGEOWithPositionBasedControlDenotes if your app supports TC-GEO with position based control
[in]reportToTCSupportsPeerControlAssignmentDenotes if your app supports peer control assignment
[in]reportToTCSupportsImplementSectionControlDenotes if your app supports implement section control

Definition at line 190 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ configure() [3/3]

void isobus::TaskControllerClient::configure ( std::uint8_t const * binaryDDOP,
std::uint32_t DDOPSize,
std::uint8_t maxNumberBoomsSupported,
std::uint8_t maxNumberSectionsSupported,
std::uint8_t maxNumberChannelsSupportedForPositionBasedControl,
bool reportToTCSupportsDocumentation,
bool reportToTCSupportsTCGEOWithoutPositionBasedControl,
bool reportToTCSupportsTCGEOWithPositionBasedControl,
bool reportToTCSupportsPeerControlAssignment,
bool reportToTCSupportsImplementSectionControl )

A convenient way to set all client options at once instead of calling the individual setters.

This function sets up the parameters that the client will report to the TC server. These parameters should be tailored to your specific application.

Note
This version of the configure function takes a pointer to an array of bytes. The other versions of the configure function take various other kinds of DDOP.
Parameters
[in]binaryDDOPThe device descriptor object pool to upload to the TC
[in]DDOPSizeThe number of bytes in the binary DDOP that will be uploaded
[in]maxNumberBoomsSupportedConfigures the max number of booms the client supports
[in]maxNumberSectionsSupportedConfigures the max number of sections supported by the client for section control
[in]maxNumberChannelsSupportedForPositionBasedControlConfigures the max number of channels supported by the client for position based control
[in]reportToTCSupportsDocumentationDenotes if your app supports documentation
[in]reportToTCSupportsTCGEOWithoutPositionBasedControlDenotes if your app supports TC-GEO without position based control
[in]reportToTCSupportsTCGEOWithPositionBasedControlDenotes if your app supports TC-GEO with position based control
[in]reportToTCSupportsPeerControlAssignmentDenotes if your app supports peer control assignment
[in]reportToTCSupportsImplementSectionControlDenotes if your app supports implement section control

Definition at line 152 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ get_connected_tc_max_boot_time()

std::uint8_t isobus::TaskControllerClient::get_connected_tc_max_boot_time ( ) const

Returns the maximum boot time in seconds reported by the connected TC.

Returns
Maximum boot time (seconds) reported by the connected TC, or 0xFF if that info is not available.

Definition at line 2130 of file isobus_task_controller_client.cpp.

◆ get_connected_tc_number_booms_supported()

std::uint8_t isobus::TaskControllerClient::get_connected_tc_number_booms_supported ( ) const

Returns the number of booms that the connected TC supports for section control.

Returns
Number of booms that the connected TC supports for section control

Definition at line 2115 of file isobus_task_controller_client.cpp.

◆ get_connected_tc_number_channels_supported()

std::uint8_t isobus::TaskControllerClient::get_connected_tc_number_channels_supported ( ) const

Returns the number of channels that the connected TC supports for position control.

Returns
Number of channels that the connected TC supports for position control

Definition at line 2125 of file isobus_task_controller_client.cpp.

◆ get_connected_tc_number_sections_supported()

std::uint8_t isobus::TaskControllerClient::get_connected_tc_number_sections_supported ( ) const

Returns the number of sections that the connected TC supports for section control.

Returns
Number of sections that the connected TC supports for section control

Definition at line 2120 of file isobus_task_controller_client.cpp.

◆ get_connected_tc_option_supported()

bool isobus::TaskControllerClient::get_connected_tc_option_supported ( ServerOptions option) const

Returns if the connected TC supports a certain option.

Parameters
[in]optionThe option to check against
Returns
true if the option was reported as "supported" by the TC, otherwise false

Definition at line 2135 of file isobus_task_controller_client.cpp.

◆ get_connected_tc_version()

TaskControllerClient::Version isobus::TaskControllerClient::get_connected_tc_version ( ) const

Returns the version of the connected task controller.

Returns
The version reported by the connected task controller

Definition at line 2140 of file isobus_task_controller_client.cpp.

◆ get_internal_control_function()

std::shared_ptr< InternalControlFunction > isobus::TaskControllerClient::get_internal_control_function ( ) const

Returns the internal control function being used by the interface to send messages.

Returns
The internal control function being used by the interface to send messages

Definition at line 259 of file isobus_task_controller_client.cpp.

◆ get_is_connected()

bool isobus::TaskControllerClient::get_is_connected ( ) const

Check whether the client is connected to the TC server.

Returns
true if cconnected, false otherwise

Definition at line 314 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ get_is_initialized()

bool isobus::TaskControllerClient::get_is_initialized ( ) const

Returns if the client has been initialized.

Note
This does not mean that the client is connected to the TC server
Returns
true if the client has been initialized

Definition at line 309 of file isobus_task_controller_client.cpp.

◆ get_is_task_active()

bool isobus::TaskControllerClient::get_is_task_active ( ) const

Returns if a task is active as indicated by the TC.

Attention
Some TCs will report they are always in a task rather than properly reporting this. For example, John Deere TCs have a bad habit of doing this. Use caution before relying on the TC's task status.
Returns
true if the TC is connected and the TC is reporting it is in a task, otherwise false

Definition at line 319 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ get_number_booms_supported()

std::uint8_t isobus::TaskControllerClient::get_number_booms_supported ( ) const

Returns the previously configured number of booms supported by the client.

Returns
The previously configured number of booms supported by the client

Definition at line 269 of file isobus_task_controller_client.cpp.

◆ get_number_channels_supported_for_position_based_control()

std::uint8_t isobus::TaskControllerClient::get_number_channels_supported_for_position_based_control ( ) const

Returns the previously configured number of channels supported for position based control.

Returns
The previously configured number of channels supported for position based control

Definition at line 279 of file isobus_task_controller_client.cpp.

◆ get_number_sections_supported()

std::uint8_t isobus::TaskControllerClient::get_number_sections_supported ( ) const

Returns the previously configured number of section supported by the client.

Returns
The previously configured number of booms supported by the client

Definition at line 274 of file isobus_task_controller_client.cpp.

◆ get_partner_control_function()

std::shared_ptr< PartneredControlFunction > isobus::TaskControllerClient::get_partner_control_function ( ) const

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

Returns
The partner control function for the TC server

Definition at line 264 of file isobus_task_controller_client.cpp.

◆ get_state()

TaskControllerClient::StateMachineState isobus::TaskControllerClient::get_state ( ) const

Returns the current state machine state.

Returns
The current internal state machine state

Definition at line 2110 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ get_supports_documentation()

bool isobus::TaskControllerClient::get_supports_documentation ( ) const

Returns if the client has been configured to report that it supports documentation to the TC.

Returns
true if the client has been configured to report that it supports documentation, otherwise false

Definition at line 284 of file isobus_task_controller_client.cpp.

◆ get_supports_implement_section_control()

bool isobus::TaskControllerClient::get_supports_implement_section_control ( ) const

Returns if the client has been configured to report that it supports implement section control to the TC.

Returns
true if the client has been configured to report that it supports implement section control, otherwise false

Definition at line 304 of file isobus_task_controller_client.cpp.

◆ get_supports_peer_control_assignment()

bool isobus::TaskControllerClient::get_supports_peer_control_assignment ( ) const

Returns if the client has been configured to report that it supports peer control assignment to the TC.

Returns
true if the client has been configured to report that it supports peer control assignment, otherwise false

Definition at line 299 of file isobus_task_controller_client.cpp.

◆ get_supports_tcgeo_with_position_based_control()

bool isobus::TaskControllerClient::get_supports_tcgeo_with_position_based_control ( ) const

Returns if the client has been configured to report that it supports TC-GEO with position based control to the TC.

Returns
true if the client has been configured to report that it supports TC-GEO with position based control, otherwise false

Definition at line 294 of file isobus_task_controller_client.cpp.

◆ get_supports_tcgeo_without_position_based_control()

bool isobus::TaskControllerClient::get_supports_tcgeo_without_position_based_control ( ) const

Returns if the client has been configured to report that it supports TC-GEO without position based control to the TC.

Returns
true if the client has been configured to report that it supports TC-GEO without position based control, otherwise false

Definition at line 289 of file isobus_task_controller_client.cpp.

◆ get_was_ddop_supplied()

bool isobus::TaskControllerClient::get_was_ddop_supplied ( ) const
protected

Checks if a DDOP was provided via one of the configure functions.

Returns
true if a DDOP was provided, otherwise false

Definition at line 899 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ initialize()

void isobus::TaskControllerClient::initialize ( bool spawnThread)

This function starts the state machine. Call this once you have created your DDOP, set up the client capabilities, 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 by calling the update function.

Definition at line 40 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ on_value_changed_trigger()

void isobus::TaskControllerClient::on_value_changed_trigger ( std::uint16_t elementNumber,
std::uint16_t DDI )

Tells the TC client that a value was changed or the TC client needs to command a value to the TC server.

If you provide on-change triggers in your DDOP, this is how you can request the TC client to update the TC server on the current value of your process data variables.

Parameters
[in]elementNumberThe element number of the process data variable that changed
[in]DDIThe DDI of the process data variable that changed

Definition at line 2151 of file isobus_task_controller_client.cpp.

◆ process_internal_object_pool_upload_callback()

bool isobus::TaskControllerClient::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 yet another 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 1777 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ process_labels_from_ddop()

void isobus::TaskControllerClient::process_labels_from_ddop ( )
protected

Searches the DDOP for a device object and stores that object's structure and localization labels.

Definition at line 931 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ process_queued_commands()

void isobus::TaskControllerClient::process_queued_commands ( )
protected

Processes queued TC requests and commands. Calls the user's callbacks if needed.

Todo
process PDACKs better

Definition at line 1032 of file isobus_task_controller_client.cpp.

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

◆ process_queued_threshold_commands()

void isobus::TaskControllerClient::process_queued_threshold_commands ( )
protected

Processes measurement threshold/interval commands.

Definition at line 1073 of file isobus_task_controller_client.cpp.

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

◆ process_rx_message()

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

Processes a CAN message destined for any TC client.

Parameters
[in]messageThe CAN message being received
[in]parentPointerA context variable to find the relevant TC client class
Todo
Localization label partial pool handling

Definition at line 1185 of file isobus_task_controller_client.cpp.

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

◆ process_tx_callback()

void isobus::TaskControllerClient::process_tx_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 number of bytes sent
[in]sourceControlFunctionThe control function that sent the message
[in]destinationControlFunctionThe control function that received the message
[in]successfulWhether the message was sent successfully
[in]parentPointerA context variable that is passed back through the callback

Definition at line 1831 of file isobus_task_controller_client.cpp.

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

◆ remove_request_value_callback()

void isobus::TaskControllerClient::remove_request_value_callback ( RequestValueCommandCallback callback,
void * parentPointer )

Removes the specified callback from the list of value request callbacks.

Parameters
[in]callbackThe callback to remove
[in]parentPointerparent pointer associated to the callback being removed

Definition at line 89 of file isobus_task_controller_client.cpp.

◆ remove_value_command_callback()

void isobus::TaskControllerClient::remove_value_command_callback ( ValueCommandCallback callback,
void * parentPointer )

Removes the specified callback from the list of value command callbacks.

Parameters
[in]callbackThe callback to remove
[in]parentPointerparent pointer associated to the callback being removed

Definition at line 102 of file isobus_task_controller_client.cpp.

◆ request_task_controller_identification()

bool isobus::TaskControllerClient::request_task_controller_identification ( ) const

Sends a broadcast request to TCs to identify themseleves.

Upon receipt of this message, the TC shall display, for a period of 3 s, the TC Number

Returns
true if the message was sent, otherwise false

Definition at line 2163 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ restart()

void isobus::TaskControllerClient::restart ( )

Calling this function will reset the task controller client's connection with the TC server, and cause it to reconnect after a short delay.

Definition at line 226 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ reupload_device_descriptor_object_pool() [1/3]

bool isobus::TaskControllerClient::reupload_device_descriptor_object_pool ( std::shared_ptr< DeviceDescriptorObjectPool > DDOP)

If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.

Parameters
[in]DDOPThe updated device descriptor object pool to upload to the TC
Returns
true if the interface accepted the command to reupload the pool, or false if the command cannot be handled right now

Definition at line 374 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ reupload_device_descriptor_object_pool() [2/3]

bool isobus::TaskControllerClient::reupload_device_descriptor_object_pool ( std::shared_ptr< std::vector< std::uint8_t > > binaryDDOP)

If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.

Parameters
[in]binaryDDOPThe updated device descriptor object pool to upload to the TC
Returns
true if the interface accepted the command to reupload the pool, or false if the command cannot be handled right now

Definition at line 324 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ reupload_device_descriptor_object_pool() [3/3]

bool isobus::TaskControllerClient::reupload_device_descriptor_object_pool ( std::uint8_t const * binaryDDOP,
std::uint32_t DDOPSize )

If the TC client is connected to a TC, calling this function will cause the TC client interface to delete the currently active DDOP, reupload it, then reactivate it using the pool passed into the parameter of this function. This process is faster than restarting the whole interface, and you have to call it if you change certain things in your DDOP at runtime after the DDOP has already been activated.

Parameters
[in]binaryDDOPThe updated device descriptor object pool to upload to the TC
[in]DDOPSizeThe number of bytes in the binary DDOP that will be uploaded
Returns
true if the interface accepted the command to reupload the pool, or false if the command cannot be handled right now

Definition at line 349 of file isobus_task_controller_client.cpp.

Here is the call graph for this function:

◆ select_language_command_partner()

void isobus::TaskControllerClient::select_language_command_partner ( )
protected

Sets the behavior of the language command interface based on the TC's reported version information.

Definition at line 2078 of file isobus_task_controller_client.cpp.

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

◆ send_delete_object_pool()

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

Sends the delete object pool command to the TC.

This is a message to delete the device descriptor object pool for the client that sends this message. The Object pool Delete message enables a client to delete the entire device descriptor object pool before sending an updated or changed device descriptor object pool with the object pool transfer message.

Returns
true if the message was sent, otherwise false

Definition at line 1859 of file isobus_task_controller_client.cpp.

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

◆ send_generic_process_data()

bool isobus::TaskControllerClient::send_generic_process_data ( std::uint8_t multiplexor) const
protected

Sends a process data message with 1 mux byte and all 0xFFs as payload.

This just reduces code duplication by consolidating common message formats

Parameters
[in]multiplexorThe multiplexor to use for the message
Returns
true if the message was sent, otherwise false

Definition at line 1865 of file isobus_task_controller_client.cpp.

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

◆ send_object_pool_activate()

bool isobus::TaskControllerClient::send_object_pool_activate ( ) const
protected

Sends the activate object pool message.

This message is sent by a client to complete its connection procedure to a TC

Returns
true if the message was sent, otherwise false

Definition at line 1883 of file isobus_task_controller_client.cpp.

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

◆ send_object_pool_deactivate()

bool isobus::TaskControllerClient::send_object_pool_deactivate ( ) const
protected

Sends the deactivate object pool message.

This message is sent by a client to disconnect from a TC

Returns
true if the message was sent otherwise false

Definition at line 1889 of file isobus_task_controller_client.cpp.

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

◆ send_pdack()

bool isobus::TaskControllerClient::send_pdack ( std::uint16_t elementNumber,
std::uint16_t ddi ) const
protected

Sends a Process Data ACK.

Parameters
[in]elementNumberThe element number being acked
[in]ddiThe DDI being acked
Returns
true if the message was sent, otherwise false

Definition at line 1908 of file isobus_task_controller_client.cpp.

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

◆ send_request_localization_label()

bool isobus::TaskControllerClient::send_request_localization_label ( ) const
protected

Sends a request to the TC for its localization label.

The Request Localization Label message allows the client to determine the availability of the requested device descriptor localization at the TC or DL.If the requested localization label is present, a localization label message with the requested localization label shall be transmitted by the TC or DL to the sender of the Request Localization Label message. Otherwise, a localization label message with all localization label bytes set to value = 0xFF shall be transmitted by the TC or DL to the sender of the Request Localization Label message.

Returns
true if the message was sent, otherwise false

Definition at line 1926 of file isobus_task_controller_client.cpp.

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

◆ send_request_object_pool_transfer()

bool isobus::TaskControllerClient::send_request_object_pool_transfer ( ) const
protected

Sends a request to the TC indicating we wish to transfer an object pool.

The Request Object-pool Transfer message allows the client to determine whether it is allowed to transfer(part of) the device descriptor object pool to the TC or DL.

Returns
true if the message was sent, otherwise false

Definition at line 1932 of file isobus_task_controller_client.cpp.

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

◆ send_request_structure_label()

bool isobus::TaskControllerClient::send_request_structure_label ( ) const
protected

Sends a request to the TC for its structure label.

The Request Structure Label message allows the client to determine the availability of the requested device descriptor structure at the TC. If the requested structure label is present, a structure label message with the requested structure label shall be transmitted by the TC or DL to the sender of the Request Structure Label message. Otherwise, a structure label message with 7 structure label bytes set to value = 0xFF shall be transmitted by the TC or DL to the sender of the Request Structure Label message

Returns
true if the message was sent, otherwise false

Definition at line 1958 of file isobus_task_controller_client.cpp.

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

◆ send_request_version_response()

bool isobus::TaskControllerClient::send_request_version_response ( ) const
protected

Sends the response to a request for version from the TC.

Returns
true if the message was sent, otherwise false

Definition at line 1965 of file isobus_task_controller_client.cpp.

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

◆ send_status()

bool isobus::TaskControllerClient::send_status ( ) const
protected

Sends the status message to the TC.

Returns
true if the message was sent, otherwise false

Definition at line 1987 of file isobus_task_controller_client.cpp.

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

◆ send_value_command()

bool isobus::TaskControllerClient::send_value_command ( std::uint16_t elementNumber,
std::uint16_t ddi,
std::int32_t value ) const
protected

Sends the value command message for a specific DDI/Element number combo.

Parameters
[in]elementNumberThe element number for the command
[in]ddiThe DDI for the command
[in]valueThe value to send
Returns
true if the message was sent, otherwise false

Definition at line 2005 of file isobus_task_controller_client.cpp.

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

◆ send_version_request()

bool isobus::TaskControllerClient::send_version_request ( ) const
protected

Sends the version request message to the TC.

Returns
true if the message was sent, otherwise false

Definition at line 2023 of file isobus_task_controller_client.cpp.

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

◆ send_working_set_master()

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

Sends the working set master message.

Returns
true if the message was sent, otherwise false

Definition at line 2028 of file isobus_task_controller_client.cpp.

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

◆ set_common_config_items()

void isobus::TaskControllerClient::set_common_config_items ( std::uint8_t maxNumberBoomsSupported,
std::uint8_t maxNumberSectionsSupported,
std::uint8_t maxNumberChannelsSupportedForPositionBasedControl,
bool reportToTCSupportsDocumentation,
bool reportToTCSupportsTCGEOWithoutPositionBasedControl,
bool reportToTCSupportsTCGEOWithPositionBasedControl,
bool reportToTCSupportsPeerControlAssignment,
bool reportToTCSupportsImplementSectionControl )
protected

Sets the common items found in all versions of configure

Parameters
[in]maxNumberBoomsSupportedConfigures the max number of booms the client supports
[in]maxNumberSectionsSupportedConfigures the max number of sections supported by the client for section control
[in]maxNumberChannelsSupportedForPositionBasedControlConfigures the max number of channels supported by the client for position based control
[in]reportToTCSupportsDocumentationDenotes if your app supports documentation
[in]reportToTCSupportsTCGEOWithoutPositionBasedControlDenotes if your app supports TC-GEO without position based control
[in]reportToTCSupportsTCGEOWithPositionBasedControlDenotes if your app supports TC-GEO with position based control
[in]reportToTCSupportsPeerControlAssignmentDenotes if your app supports peer control assignment
[in]reportToTCSupportsImplementSectionControlDenotes if your app supports implement section control

Definition at line 2039 of file isobus_task_controller_client.cpp.

Here is the caller graph for this function:

◆ set_state() [1/2]

void isobus::TaskControllerClient::set_state ( StateMachineState newState)
protected

Changes the internal state machine state and updates the associated timestamp.

Parameters
[in]newStateThe new state for the state machine

Definition at line 2058 of file isobus_task_controller_client.cpp.

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

◆ set_state() [2/2]

void isobus::TaskControllerClient::set_state ( StateMachineState newState,
std::uint32_t timestamp )
protected

Changes the internal state machine state and updates the associated timestamp to the specified one.

Note
This is intended for testing purposes only
Parameters
[in]newStateThe new state for the state machine
[in]timestampThe new value for the state machine timestamp (in milliseconds)

Definition at line 2072 of file isobus_task_controller_client.cpp.

◆ terminate()

void isobus::TaskControllerClient::terminate ( )

Terminates the client and joins the worker thread if applicable.

Definition at line 235 of file isobus_task_controller_client.cpp.

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

◆ update()

void isobus::TaskControllerClient::update ( )

The cyclic update function for this interface.

Note
This function may be called by the TC worker thread if you called initialize with a parameter of true, otherwise you must call it yourself at some interval.

Definition at line 399 of file isobus_task_controller_client.cpp.

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

◆ worker_thread_function()

void isobus::TaskControllerClient::worker_thread_function ( )
protected

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

Definition at line 2095 of file isobus_task_controller_client.cpp.

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

Member Data Documentation

◆ clientDDOP

std::shared_ptr<DeviceDescriptorObjectPool> isobus::TaskControllerClient::clientDDOP
private

Stores the DDOP for upload to the TC (if needed)

Definition at line 619 of file isobus_task_controller_client.hpp.

◆ clientMutex

Mutex isobus::TaskControllerClient::clientMutex
private

A general mutex to protect data in the worker thread against data accessed by the app or the network manager.

Definition at line 631 of file isobus_task_controller_client.hpp.

◆ commandBeingExecuted

std::uint8_t isobus::TaskControllerClient::commandBeingExecuted = 0
private

The current command the TC is executing as reported in the status message.

Definition at line 648 of file isobus_task_controller_client.hpp.

◆ currentState

StateMachineState isobus::TaskControllerClient::currentState = StateMachineState::Disconnected
private

Tracks the internal state machine's current state.

Definition at line 639 of file isobus_task_controller_client.hpp.

◆ ddopLocalizationLabel

std::array<std::uint8_t, 7> isobus::TaskControllerClient::ddopLocalizationLabel = { 0 }
private

Stores a pre-parsed localization label, helps to avoid processing the whole DDOP during a CAN message callback.

Definition at line 637 of file isobus_task_controller_client.hpp.

◆ ddopStructureLabel

std::string isobus::TaskControllerClient::ddopStructureLabel
private

Stores a pre-parsed structure label, helps to avoid processing the whole DDOP during a CAN message callback.

Definition at line 635 of file isobus_task_controller_client.hpp.

◆ ddopUploadMode

DDOPUploadType isobus::TaskControllerClient::ddopUploadMode = DDOPUploadType::ProgramaticallyGenerated
private

Determines if DDOPs get generated or raw uploaded.

Definition at line 638 of file isobus_task_controller_client.hpp.

◆ enableStatusMessage

bool isobus::TaskControllerClient::enableStatusMessage = false
private

Enables sending the status message to the TC cyclically.

Definition at line 661 of file isobus_task_controller_client.hpp.

◆ generatedBinaryDDOP

std::vector<std::uint8_t> isobus::TaskControllerClient::generatedBinaryDDOP
private

Stores the DDOP in binary form after it has been generated.

Definition at line 622 of file isobus_task_controller_client.hpp.

◆ initialized

bool isobus::TaskControllerClient::initialized = false
private

Tracks the initialization state of the interface instance.

Definition at line 659 of file isobus_task_controller_client.hpp.

◆ languageCommandInterface

LanguageCommandInterface isobus::TaskControllerClient::languageCommandInterface

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

Definition at line 355 of file isobus_task_controller_client.hpp.

◆ languageCommandWaitingTimestamp_ms

std::uint32_t isobus::TaskControllerClient::languageCommandWaitingTimestamp_ms = 0
private

Timestamp used to determine when to give up on waiting for a language command response.

Definition at line 644 of file isobus_task_controller_client.hpp.

◆ maxServerBootTime_s

std::uint8_t isobus::TaskControllerClient::maxServerBootTime_s = 0
private

Maximum number of seconds from a power cycle to transmission of first �Task Controller Status message� or 0xFF.

Definition at line 650 of file isobus_task_controller_client.hpp.

◆ measurementMaximumThresholdCommands

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::measurementMaximumThresholdCommands
private

A list of measurement commands that will be processed when the value above a threshold.

Definition at line 629 of file isobus_task_controller_client.hpp.

◆ measurementMinimumThresholdCommands

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::measurementMinimumThresholdCommands
private

A list of measurement commands that will be processed when the value drops below a threshold.

Definition at line 628 of file isobus_task_controller_client.hpp.

◆ measurementOnChangeThresholdCommands

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::measurementOnChangeThresholdCommands
private

A list of measurement commands that will be processed when the value changes by the specified amount.

Definition at line 630 of file isobus_task_controller_client.hpp.

◆ measurementTimeIntervalCommands

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::measurementTimeIntervalCommands
private

A list of measurement commands that will be processed on a time interval.

Definition at line 627 of file isobus_task_controller_client.hpp.

◆ myControlFunction

std::shared_ptr<InternalControlFunction> isobus::TaskControllerClient::myControlFunction
private

The internal control function the client uses to send from.

Definition at line 617 of file isobus_task_controller_client.hpp.

◆ numberBoomsSupported

std::uint8_t isobus::TaskControllerClient::numberBoomsSupported = 0
private

Stores the number of booms this client supports for section control.

Definition at line 656 of file isobus_task_controller_client.hpp.

◆ numberChannelsSupportedForPositionBasedControl

std::uint8_t isobus::TaskControllerClient::numberChannelsSupportedForPositionBasedControl = 0
private

Stores the number of channels this client supports for position based control.

Definition at line 658 of file isobus_task_controller_client.hpp.

◆ numberOfWorkingSetMembers

std::uint8_t isobus::TaskControllerClient::numberOfWorkingSetMembers = 1
private

The number of working set members that will be reported in the working set master message.

Definition at line 645 of file isobus_task_controller_client.hpp.

◆ numberSectionsSupported

std::uint8_t isobus::TaskControllerClient::numberSectionsSupported = 0
private

Stores the number of sections this client supports for section control.

Definition at line 657 of file isobus_task_controller_client.hpp.

◆ partnerControlFunction

std::shared_ptr<PartneredControlFunction> isobus::TaskControllerClient::partnerControlFunction
private

The partner control function this client will send to.

Definition at line 616 of file isobus_task_controller_client.hpp.

◆ previousStructureLabel

std::string isobus::TaskControllerClient::previousStructureLabel
private

Stores the last structure label we used, helps to warn the user if they aren't updating the label properly.

Definition at line 636 of file isobus_task_controller_client.hpp.

◆ primaryVirtualTerminal

std::shared_ptr<PartneredControlFunction> isobus::TaskControllerClient::primaryVirtualTerminal
private

A pointer to the primary VT's control function. Used for TCs < version 4 and language command compatibility.

Definition at line 618 of file isobus_task_controller_client.hpp.

◆ queuedValueCommands

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::queuedValueCommands
private

A list of queued value commands that will be processed on the next update.

Definition at line 626 of file isobus_task_controller_client.hpp.

◆ queuedValueRequests

std::list<ProcessDataCallbackInfo> isobus::TaskControllerClient::queuedValueRequests
private

A list of queued value requests that will be processed on the next update.

Definition at line 625 of file isobus_task_controller_client.hpp.

◆ requestValueCallbacks

std::vector<RequestValueCommandCallbackInfo> isobus::TaskControllerClient::requestValueCallbacks
private

A list of callbacks that will be called when the TC requests a process data value.

Definition at line 623 of file isobus_task_controller_client.hpp.

◆ serverNumberOfBoomsForSectionControl

std::uint8_t isobus::TaskControllerClient::serverNumberOfBoomsForSectionControl = 0
private

When reported by the TC, this is the maximum number of section control booms that are supported.

Definition at line 653 of file isobus_task_controller_client.hpp.

◆ serverNumberOfChannelsForPositionBasedControl

std::uint8_t isobus::TaskControllerClient::serverNumberOfChannelsForPositionBasedControl = 0
private

When reported by the TC, this is the maximum number of individual control channels that is supported.

Definition at line 655 of file isobus_task_controller_client.hpp.

◆ serverNumberOfSectionsForSectionControl

std::uint8_t isobus::TaskControllerClient::serverNumberOfSectionsForSectionControl = 0
private

When reported by the TC, this is the maximum number of sections that are supported (or 0xFF for version 2 and earlier).

Definition at line 654 of file isobus_task_controller_client.hpp.

◆ serverOptionsByte1

std::uint8_t isobus::TaskControllerClient::serverOptionsByte1 = 0
private

The options specified in ISO 11783-10 that this TC, DL, or client meets (The definition of this byte is introduced in ISO11783-10 version 3)

Definition at line 651 of file isobus_task_controller_client.hpp.

◆ serverOptionsByte2

std::uint8_t isobus::TaskControllerClient::serverOptionsByte2 = 0
private

Reserved for ISO assignment, should be zero or 0xFF.

Definition at line 652 of file isobus_task_controller_client.hpp.

◆ serverStatusMessageTimestamp_ms

std::uint32_t isobus::TaskControllerClient::serverStatusMessageTimestamp_ms = 0
private

Timestamp corresponding to the last time we received a status message from the TC.

Definition at line 642 of file isobus_task_controller_client.hpp.

◆ serverVersion

std::uint8_t isobus::TaskControllerClient::serverVersion = 0
private

The detected version of the TC Server.

Definition at line 649 of file isobus_task_controller_client.hpp.

◆ shouldReuploadAfterDDOPDeletion

bool isobus::TaskControllerClient::shouldReuploadAfterDDOPDeletion = false
private

Used to determine how the state machine should progress when updating a DDOP.

Definition at line 667 of file isobus_task_controller_client.hpp.

◆ shouldTerminate

bool isobus::TaskControllerClient::shouldTerminate = false
private

This variable tells the worker thread to exit.

Definition at line 660 of file isobus_task_controller_client.hpp.

◆ SIX_SECOND_TIMEOUT_MS

constexpr std::uint32_t isobus::TaskControllerClient::SIX_SECOND_TIMEOUT_MS = 6000
staticconstexprprotected

The startup delay time defined in the standard.

Definition at line 567 of file isobus_task_controller_client.hpp.

◆ sourceAddressOfCommandBeingExecuted

std::uint8_t isobus::TaskControllerClient::sourceAddressOfCommandBeingExecuted = 0
private

Source address of client for which the current command is being executed.

Definition at line 647 of file isobus_task_controller_client.hpp.

◆ stateMachineTimestamp_ms

std::uint32_t isobus::TaskControllerClient::stateMachineTimestamp_ms = 0
private

Timestamp that tracks when the state machine last changed states (in milliseconds)

Definition at line 640 of file isobus_task_controller_client.hpp.

◆ statusMessageTimestamp_ms

std::uint32_t isobus::TaskControllerClient::statusMessageTimestamp_ms = 0
private

Timestamp corresponding to the last time we sent a status message to the TC.

Definition at line 641 of file isobus_task_controller_client.hpp.

◆ supportsDocumentation

bool isobus::TaskControllerClient::supportsDocumentation = false
private

Determines if the client reports documentation support to the TC.

Definition at line 662 of file isobus_task_controller_client.hpp.

◆ supportsImplementSectionControl

bool isobus::TaskControllerClient::supportsImplementSectionControl = false
private

Determines if the client reports implement section control capability to the TC.

Definition at line 666 of file isobus_task_controller_client.hpp.

◆ supportsPeerControlAssignment

bool isobus::TaskControllerClient::supportsPeerControlAssignment = false
private

Determines if the client reports peer control assignment capability to the TC.

Definition at line 665 of file isobus_task_controller_client.hpp.

◆ supportsTCGEOWithoutPositionBasedControl

bool isobus::TaskControllerClient::supportsTCGEOWithoutPositionBasedControl = false
private

Determines if the client reports TC-GEO without position control capability to the TC.

Definition at line 663 of file isobus_task_controller_client.hpp.

◆ supportsTCGEOWithPositionBasedControl

bool isobus::TaskControllerClient::supportsTCGEOWithPositionBasedControl = false
private

Determines if the client reports TC-GEO with position control capability to the TC.

Definition at line 664 of file isobus_task_controller_client.hpp.

◆ tcStatusBitfield

std::uint8_t isobus::TaskControllerClient::tcStatusBitfield = 0
private

The last received TC/DL status from the status message.

Definition at line 646 of file isobus_task_controller_client.hpp.

◆ TWO_SECOND_TIMEOUT_MS

constexpr std::uint16_t isobus::TaskControllerClient::TWO_SECOND_TIMEOUT_MS = 2000
staticconstexprprotected

Used for sending the status message to the TC.

Definition at line 568 of file isobus_task_controller_client.hpp.

◆ userSuppliedBinaryDDOP

std::uint8_t const* isobus::TaskControllerClient::userSuppliedBinaryDDOP = nullptr
private

Stores a client-provided DDOP if one was provided.

Definition at line 620 of file isobus_task_controller_client.hpp.

◆ userSuppliedBinaryDDOPSize_bytes

std::uint32_t isobus::TaskControllerClient::userSuppliedBinaryDDOPSize_bytes = 0
private

The number of bytes in the user provided binary DDOP (if one was provided)

Definition at line 643 of file isobus_task_controller_client.hpp.

◆ userSuppliedVectorDDOP

std::shared_ptr<std::vector<std::uint8_t> > isobus::TaskControllerClient::userSuppliedVectorDDOP
private

Stores a client-provided DDOP if one was provided.

Definition at line 621 of file isobus_task_controller_client.hpp.

◆ valueCommandsCallbacks

std::vector<ValueCommandCallbackInfo> isobus::TaskControllerClient::valueCommandsCallbacks
private

A list of callbacks that will be called when the TC sets a process data value.

Definition at line 624 of file isobus_task_controller_client.hpp.

◆ workerThread

std::thread* isobus::TaskControllerClient::workerThread = nullptr
private

The worker thread that updates this interface.

Definition at line 633 of file isobus_task_controller_client.hpp.


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