AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
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< ControlFunction > | 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. | |
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. | |
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.
|
strong |
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.
|
explicit |
Constructor for a GuidanceSystemCommand.
[in] | sender | The control function that is sending this message |
Definition at line 57 of file isobus_guidance_interface.cpp.
float isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_curvature | ( | ) | const |
Returns the curvature value that is currently be trying to be achieved by the guidance system.
Definition at line 87 of file isobus_guidance_interface.cpp.
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.
Definition at line 92 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceSystemCommand::CurvatureCommandStatus isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_status | ( | ) | const |
Returns the curvature command status that is active in the guidance system.
Definition at line 72 of file isobus_guidance_interface.cpp.
std::uint32_t isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::get_timestamp_ms | ( | ) | const |
Returns the timestamp for when the message was received, in milliseconds.
Definition at line 102 of file isobus_guidance_interface.cpp.
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
[in] | curvature | Commanded curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1 |
Definition at line 77 of file isobus_guidance_interface.cpp.
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.
[in] | newStatus | The status to encode into the message |
Definition at line 62 of file isobus_guidance_interface.cpp.
void isobus::AgriculturalGuidanceInterface::GuidanceSystemCommand::set_timestamp_ms | ( | std::uint32_t | timestamp | ) |
Sets the timestamp for when the message was received or sent.
[in] | timestamp | The timestamp, in milliseconds, when the message was sent or received |
Definition at line 97 of file isobus_guidance_interface.cpp.
|
private |
The commanded curvature in km^-1 (inverse kilometers)
Definition at line 116 of file isobus_guidance_interface.hpp.
|
private |
The current status for the command.
Definition at line 118 of file isobus_guidance_interface.hpp.
|
private |
The CF that is sending the message.
Definition at line 115 of file isobus_guidance_interface.hpp.
|
private |
A timestamp for when the message was released in milliseconds.
Definition at line 117 of file isobus_guidance_interface.hpp.