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

An interface for sending the agricultural guidance system command message. More...

#include <isobus_guidance_interface.hpp>

Public Types

enum class  CurvatureCommandStatus : std::uint8_t { NotIntendedToSteer = 0 , IntendedToSteer = 1 , Error = 2 , NotAvailable = 3 }
 This parameter indicates whether the guidance system is attempting to control steering with this command. More...
 

Public Member Functions

 GuidanceSystemCommand (std::shared_ptr< ControlFunction > sender)
 Constructor for a GuidanceSystemCommand.
 
bool set_status (CurvatureCommandStatus newStatus)
 Sets the curvature command status that will be encoded into the CAN message. This parameter indicates whether the guidance system is attempting to control steering with this command.
 
CurvatureCommandStatus get_status () const
 Returns the curvature command status that is active in the guidance system.
 
bool set_curvature (float curvature)
 Desired course curvature over ground that a machine's steering system is required to achieve.
 
float get_curvature () const
 Returns the curvature value that is currently be trying to be achieved by the guidance system.
 
std::shared_ptr< ControlFunctionget_sender_control_function () const
 Returns a pointer to the sender of the message. If an ICF is the sender, returns the ICF being used to transmit from.
 
void set_timestamp_ms (std::uint32_t timestamp)
 Sets the timestamp for when the message was received or sent.
 
std::uint32_t get_timestamp_ms () const
 Returns the timestamp for when the message was received, in milliseconds.
 

Private Attributes

std::shared_ptr< ControlFunction > const controlFunction
 The CF that is sending the message.
 
float commandedCurvature = 0.0f
 The commanded curvature in km^-1 (inverse kilometers)
 
std::uint32_t timestamp_ms = 0
 A timestamp for when the message was released in milliseconds.
 
CurvatureCommandStatus commandedStatus = CurvatureCommandStatus::NotAvailable
 The current status for the command.
 

Detailed Description

An interface for sending the agricultural guidance system command message.

This message is sent by an automatic guidance control system to the machine steering system. It provides steering commands and serves as heartbeat between guidance system and steering control system.

Definition at line 57 of file isobus_guidance_interface.hpp.

Member Enumeration Documentation

◆ CurvatureCommandStatus

This parameter indicates whether the guidance system is attempting to control steering with this command.

Enumerator
NotIntendedToSteer 

Steering Disengaged.

IntendedToSteer 

Steering Engaged.

Definition at line 62 of file isobus_guidance_interface.hpp.

Constructor & Destructor Documentation

◆ GuidanceSystemCommand()

isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::GuidanceSystemCommand ( std::shared_ptr< ControlFunction > sender)
explicit

Constructor for a GuidanceSystemCommand.

Parameters
[in]senderThe control function that is sending this message

Definition at line 57 of file isobus_guidance_interface.cpp.

Member Function Documentation

◆ get_curvature()

float isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_curvature ( ) const

Returns the curvature value that is currently be trying to be achieved by the guidance system.

Returns
Commanded curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1

Definition at line 87 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_sender_control_function()

std::shared_ptr< ControlFunction > isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_sender_control_function ( ) const

Returns a pointer to the sender of the message. If an ICF is the sender, returns the ICF being used to transmit from.

Returns
The control function sending this instance of the guidance system command message

Definition at line 92 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_status()

AgriculturalGuidanceInterface::GuidanceSystemCommand::CurvatureCommandStatus isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_status ( ) const

Returns the curvature command status that is active in the guidance system.

Returns
The curvature command status

Definition at line 72 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_timestamp_ms()

std::uint32_t isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_timestamp_ms ( ) const

Returns the timestamp for when the message was received, in milliseconds.

Returns
The timestamp for when the message was received, in milliseconds

Definition at line 102 of file isobus_guidance_interface.cpp.

◆ set_curvature()

bool isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::set_curvature ( float curvature)

Desired course curvature over ground that a machine's steering system is required to achieve.

The value you set here will be encoded into the guidance curvature command message.

The desired path is determined by the automatic guidance system expressed as the inverse of the instantaneous radius of curvature of the turn. Curvature is positive when the vehicle is moving forward and turning to the driver's right

Parameters
[in]curvatureCommanded curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1
Returns
True if the curvature changed, false otherwise

Definition at line 77 of file isobus_guidance_interface.cpp.

◆ set_status()

bool isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::set_status ( CurvatureCommandStatus newStatus)

Sets the curvature command status that will be encoded into the CAN message. This parameter indicates whether the guidance system is attempting to control steering with this command.

Parameters
[in]newStatusThe status to encode into the message
Returns
True if the status changed, false otherwise

Definition at line 62 of file isobus_guidance_interface.cpp.

◆ set_timestamp_ms()

void isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::set_timestamp_ms ( std::uint32_t timestamp)

Sets the timestamp for when the message was received or sent.

Parameters
[in]timestampThe timestamp, in milliseconds, when the message was sent or received

Definition at line 97 of file isobus_guidance_interface.cpp.

Member Data Documentation

◆ commandedCurvature

float isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::commandedCurvature = 0.0f
private

The commanded curvature in km^-1 (inverse kilometers)

Definition at line 116 of file isobus_guidance_interface.hpp.

◆ commandedStatus

CurvatureCommandStatus isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::commandedStatus = CurvatureCommandStatus::NotAvailable
private

The current status for the command.

Definition at line 118 of file isobus_guidance_interface.hpp.

◆ controlFunction

std::shared_ptr<ControlFunction> const isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::controlFunction
private

The CF that is sending the message.

Definition at line 115 of file isobus_guidance_interface.hpp.

◆ timestamp_ms

std::uint32_t isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::timestamp_ms = 0
private

A timestamp for when the message was released in milliseconds.

Definition at line 117 of file isobus_guidance_interface.hpp.


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