AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
An interface for sending and receiving the ISOBUS agricultural guidance machine message. More...
#include <isobus_guidance_interface.hpp>
Public Types | |
enum class | MechanicalSystemLockout : std::uint8_t { NotActive = 0 , Active = 1 , Error = 2 , NotAvailable = 3 } |
State of a lockout switch that allows operators to disable automatic steering system functions. More... | |
enum class | RequestResetCommandStatus : std::uint8_t { ResetNotRequired = 0 , ResetRequired = 1 , Error = 2 , NotAvailable = 3 } |
Machine steering system request to the automatic guidance system to change Curvature Command Status state from "Intended to steer" to "Not intended to steer". More... | |
enum class | GenericSAEbs02SlotValue : std::uint8_t { DisabledOffPassive = 0 , EnabledOnActive = 1 , ErrorIndication = 2 , NotAvailableTakeNoAction = 3 } |
A typical, generic 2 bit value in J1939 with no superseding definition in ISO 11783. More... | |
enum class | GuidanceLimitStatus : std::uint8_t { NotLimited = 0 , OperatorLimitedControlled = 1 , LimitedHigh = 2 , LimitedLow = 3 , Reserved_1 = 4 , Reserved_2 = 5 , NonRecoverableFault = 6 , NotAvailable = 7 } |
This parameter is used to report the steering system's present limit status associated with guidance commands that are persistent (i.e. not transient/temporary/one-shot). More... | |
enum class | GuidanceSystemCommandExitReasonCode { NoReasonAllClear = 0 , RequiredLevelOfOperatorPresenceAwarenessNotDetected = 1 , ImplementReleasedControlOfFunction = 2 , OperatorOverrideOfFunction = 3 , OperatorControlNotInValidPosition = 4 , RemoteCommandTimeout = 5 , RemoteCommandOutOfRangeInvalid = 6 , FunctionNotCalibrated = 7 , OperatorControlFault = 8 , FunctionFault = 9 , HydraulicOilLevelTooLow = 20 , HydraulicOilTemperatureTooLow = 21 , VehicleTransmissionGearDoesNotAllowRemoteCommands = 22 , VehicleSpeedTooLow = 23 , VehicleSpeedTooHigh = 24 , AlternateGuidanceSystemActive = 25 , ControlUnitInDiagnosticMode = 26 , Error = 62 , NotAvailable = 63 } |
This parameter is used to indicate why the guidance system cannot currently accept remote commands or has most recently stopped accepting remote commands. More... | |
Public Member Functions | |
GuidanceMachineInfo (std::shared_ptr< ControlFunction > sender) | |
Constructor for a GuidanceMachineInfo. | |
bool | set_estimated_curvature (float curvature) |
Sets the estimated course curvature over ground for the machine. | |
float | get_estimated_curvature () const |
Returns the estimated curvature that was previously set with set_estimated_curvature. | |
bool | set_mechanical_system_lockout_state (MechanicalSystemLockout state) |
Sets the mechanical system lockout state. | |
MechanicalSystemLockout | get_mechanical_system_lockout () const |
Returns the mechanical system lockout state. | |
bool | set_guidance_steering_system_readiness_state (GenericSAEbs02SlotValue state) |
Sets the guidance system's readiness state to report. | |
GenericSAEbs02SlotValue | get_guidance_steering_system_readiness_state () const |
Returns the guidance system's readiness state for steering. | |
bool | set_guidance_steering_input_position_status (GenericSAEbs02SlotValue state) |
Sets the guidance steering input position state. | |
GenericSAEbs02SlotValue | get_guidance_steering_input_position_status () const |
Returns the guidance steering input position state. | |
bool | set_request_reset_command_status (RequestResetCommandStatus state) |
Sets the request reset command to report. | |
RequestResetCommandStatus | get_request_reset_command_status () const |
Returns the reported request reset command. | |
bool | set_guidance_limit_status (GuidanceLimitStatus status) |
Sets the reported guidance limit status. | |
GuidanceLimitStatus | get_guidance_limit_status () const |
Returns the reported guidance limit status. | |
bool | set_guidance_system_command_exit_reason_code (std::uint8_t exitCode) |
Sets the exit code for the guidance system. | |
std::uint8_t | get_guidance_system_command_exit_reason_code () const |
Returns the exit code for the guidance system. | |
bool | set_guidance_system_remote_engage_switch_status (GenericSAEbs02SlotValue switchStatus) |
Sets the state for the steering engage switch. | |
GenericSAEbs02SlotValue | get_guidance_system_remote_engage_switch_status () const |
Returns the state for the steering engage switch. | |
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 | estimatedCurvature = 0.0f |
Curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1 (SPN 5238) | |
std::uint32_t | timestamp_ms = 0 |
A timestamp for when the message was released in milliseconds. | |
MechanicalSystemLockout | mechanicalSystemLockoutState = MechanicalSystemLockout::NotAvailable |
The reported state of the mechanical system lockout switch (SPN 5243) | |
GenericSAEbs02SlotValue | guidanceSteeringSystemReadinessState = GenericSAEbs02SlotValue::NotAvailableTakeNoAction |
The reported state of the steering system's readiness to steer (SPN 5242) | |
GenericSAEbs02SlotValue | guidanceSteeringInputPositionStatus = GenericSAEbs02SlotValue::NotAvailableTakeNoAction |
The reported state of the steering input position. (SPN 5241) | |
GenericSAEbs02SlotValue | guidanceSystemRemoteEngageSwitchStatus = GenericSAEbs02SlotValue::NotAvailableTakeNoAction |
The reported state of the remote engage switch (SPN 9726) | |
RequestResetCommandStatus | requestResetCommandStatus = RequestResetCommandStatus::NotAvailable |
The reported state of the request reset command (SPN 5240) | |
GuidanceLimitStatus | guidanceLimitStatus = GuidanceLimitStatus::NotAvailable |
The steering system's present limit status associated with guidance commands that are persistent (SPN 5726) | |
std::uint8_t | guidanceSystemCommandExitReasonCode = static_cast<std::uint8_t>(GuidanceSystemCommandExitReasonCode::NotAvailable) |
The exit code for guidance, stored as a u8 to preserve manufacturer specific values (SPN 5725) | |
An interface for sending and receiving the ISOBUS agricultural guidance machine message.
Definition at line 122 of file isobus_guidance_interface.hpp.
|
strong |
A typical, generic 2 bit value in J1939 with no superseding definition in ISO 11783.
Definition at line 147 of file isobus_guidance_interface.hpp.
|
strong |
This parameter is used to report the steering system's present limit status associated with guidance commands that are persistent (i.e. not transient/temporary/one-shot).
Definition at line 157 of file isobus_guidance_interface.hpp.
|
strong |
This parameter is used to indicate why the guidance system cannot currently accept remote commands or has most recently stopped accepting remote commands.
Enumerator | |
---|---|
VehicleTransmissionGearDoesNotAllowRemoteCommands | park, etc. |
NotAvailable | Parameter not supported. |
Definition at line 171 of file isobus_guidance_interface.hpp.
|
strong |
State of a lockout switch that allows operators to disable automatic steering system functions.
https://www.isobus.net/isobus/pGNAndSPN/1221?type=SPN
Definition at line 128 of file isobus_guidance_interface.hpp.
|
strong |
Machine steering system request to the automatic guidance system to change Curvature Command Status state from "Intended to steer" to "Not intended to steer".
Definition at line 138 of file isobus_guidance_interface.hpp.
|
explicit |
Constructor for a GuidanceMachineInfo.
[in] | sender | The control function that is sending this message |
Definition at line 107 of file isobus_guidance_interface.cpp.
float isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_estimated_curvature | ( | ) | const |
Returns the estimated curvature that was previously set with set_estimated_curvature.
Definition at line 122 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::GuidanceLimitStatus isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_limit_status | ( | ) | const |
Returns the reported guidance limit status.
This parameter is used to report the steering system's present limit status associated with guidance commands that are persistent (i.e. not transient/temporary/one-shot).
Definition at line 197 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_steering_input_position_status | ( | ) | const |
Returns the guidance steering input position state.
Definition at line 167 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_steering_system_readiness_state | ( | ) | const |
Returns the guidance system's readiness state for steering.
Definition at line 152 of file isobus_guidance_interface.cpp.
std::uint8_t isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_system_command_exit_reason_code | ( | ) | const |
Returns the exit code for the guidance system.
This parameter is used to indicate why the guidance system cannot currently accept remote commands or has most recently stopped accepting remote commands.
Definition at line 212 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_system_remote_engage_switch_status | ( | ) | const |
Returns the state for the steering engage switch.
Definition at line 227 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::MechanicalSystemLockout isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_mechanical_system_lockout | ( | ) | const |
Returns the mechanical system lockout state.
Definition at line 137 of file isobus_guidance_interface.cpp.
AgriculturalGuidanceInterface::GuidanceMachineInfo::RequestResetCommandStatus isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_request_reset_command_status | ( | ) | const |
Returns the reported request reset command.
Machine steering system request to the automatic guidance system to change Curvature Command Status state from "Intended to steer" to "Not intended to steer".
Definition at line 182 of file isobus_guidance_interface.cpp.
std::shared_ptr< ControlFunction > isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::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 232 of file isobus_guidance_interface.cpp.
std::uint32_t isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_timestamp_ms | ( | ) | const |
Returns the timestamp for when the message was received, in milliseconds.
Definition at line 242 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_estimated_curvature | ( | float | curvature | ) |
Sets the estimated course curvature over ground for the machine.
[in] | curvature | The curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1 |
Definition at line 112 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_limit_status | ( | GuidanceLimitStatus | status | ) |
Sets the reported guidance limit status.
This parameter is used to report the steering system's present limit status associated with guidance commands that are persistent (i.e. not transient/temporary/one-shot).
[in] | status | The limit status to report |
Definition at line 187 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_steering_input_position_status | ( | GenericSAEbs02SlotValue | state | ) |
Sets the guidance steering input position state.
[in] | state | The state to set for the guidance steering input position |
Definition at line 157 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_steering_system_readiness_state | ( | GenericSAEbs02SlotValue | state | ) |
Sets the guidance system's readiness state to report.
[in] | state | The state to report. See definition of GenericSAEbs02SlotValue |
Definition at line 142 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_system_command_exit_reason_code | ( | std::uint8_t | exitCode | ) |
Sets the exit code for the guidance system.
This parameter is used to indicate why the guidance system cannot currently accept remote commands or has most recently stopped accepting remote commands.
[in] | exitCode | The exit code for the guidance system to report |
Definition at line 202 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_system_remote_engage_switch_status | ( | GenericSAEbs02SlotValue | switchStatus | ) |
Sets the state for the steering engage switch.
[in] | switchStatus | The engage switch state to report |
Definition at line 217 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_mechanical_system_lockout_state | ( | MechanicalSystemLockout | state | ) |
Sets the mechanical system lockout state.
[in] | state | The mechanical system lockout state to report |
Definition at line 127 of file isobus_guidance_interface.cpp.
bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_request_reset_command_status | ( | RequestResetCommandStatus | state | ) |
Sets the request reset command to report.
Machine steering system request to the automatic guidance system to change Curvature Command Status state from "Intended to steer" to "Not intended to steer".
[in] | state | The request reset command state to report |
Definition at line 172 of file isobus_guidance_interface.cpp.
void isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::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 237 of file isobus_guidance_interface.cpp.
|
private |
The CF that is sending the message.
Definition at line 297 of file isobus_guidance_interface.hpp.
|
private |
Curvature in km^-1 (inverse kilometers). Range is -8032 to 8031.75 km-1 (SPN 5238)
Definition at line 298 of file isobus_guidance_interface.hpp.
|
private |
The steering system's present limit status associated with guidance commands that are persistent (SPN 5726)
Definition at line 305 of file isobus_guidance_interface.hpp.
|
private |
The reported state of the steering input position. (SPN 5241)
Definition at line 302 of file isobus_guidance_interface.hpp.
|
private |
The reported state of the steering system's readiness to steer (SPN 5242)
Definition at line 301 of file isobus_guidance_interface.hpp.
|
private |
The exit code for guidance, stored as a u8 to preserve manufacturer specific values (SPN 5725)
Definition at line 306 of file isobus_guidance_interface.hpp.
|
private |
The reported state of the remote engage switch (SPN 9726)
Definition at line 303 of file isobus_guidance_interface.hpp.
|
private |
The reported state of the mechanical system lockout switch (SPN 5243)
Definition at line 300 of file isobus_guidance_interface.hpp.
|
private |
The reported state of the request reset command (SPN 5240)
Definition at line 304 of file isobus_guidance_interface.hpp.
|
private |
A timestamp for when the message was released in milliseconds.
Definition at line 299 of file isobus_guidance_interface.hpp.