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::GuidanceMachineInfo Class Reference

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< 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 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)
 

Detailed Description

An interface for sending and receiving the ISOBUS agricultural guidance machine message.

Definition at line 122 of file isobus_guidance_interface.hpp.

Member Enumeration Documentation

◆ GenericSAEbs02SlotValue

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.

◆ GuidanceLimitStatus

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).

Enumerator
NotLimited 

Not limited.

OperatorLimitedControlled 

Request cannot be implemented.

LimitedHigh 

Only lower command values result in a change.

LimitedLow 

Only higher command values result in a change.

Reserved_1 

Reserved.

Reserved_2 

Reserved.

NonRecoverableFault 

Non-recoverable fault.

NotAvailable 

Parameter not supported.

Definition at line 157 of file isobus_guidance_interface.hpp.

◆ GuidanceSystemCommandExitReasonCode

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.

◆ MechanicalSystemLockout

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.

◆ RequestResetCommandStatus

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.

Constructor & Destructor Documentation

◆ GuidanceMachineInfo()

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

Constructor for a GuidanceMachineInfo.

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

Definition at line 107 of file isobus_guidance_interface.cpp.

Member Function Documentation

◆ get_estimated_curvature()

float isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_estimated_curvature ( ) const

Returns the estimated curvature that was previously set with set_estimated_curvature.

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

Definition at line 122 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_guidance_limit_status()

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).

Returns
The reported guidance limit status

Definition at line 197 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_guidance_steering_input_position_status()

AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_steering_input_position_status ( ) const

Returns the guidance steering input position state.

Returns
Guidance steering input position state

Definition at line 167 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_guidance_steering_system_readiness_state()

AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_steering_system_readiness_state ( ) const

Returns the guidance system's readiness state for steering.

Returns
The guidance system's readiness state for steering

Definition at line 152 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_guidance_system_command_exit_reason_code()

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.

Returns
The exit code for the guidance system

Definition at line 212 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_guidance_system_remote_engage_switch_status()

AgriculturalGuidanceInterface::GuidanceMachineInfo::GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_guidance_system_remote_engage_switch_status ( ) const

Returns the state for the steering engage switch.

Returns
The state for the steering engage switch

Definition at line 227 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_mechanical_system_lockout()

AgriculturalGuidanceInterface::GuidanceMachineInfo::MechanicalSystemLockout isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::get_mechanical_system_lockout ( ) const

Returns the mechanical system lockout state.

Returns
The mechanical system lockout state being reported

Definition at line 137 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_request_reset_command_status()

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".

Returns
The reported request reset command

Definition at line 182 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_sender_control_function()

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.

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

Definition at line 232 of file isobus_guidance_interface.cpp.

Here is the caller graph for this function:

◆ get_timestamp_ms()

std::uint32_t isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::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 242 of file isobus_guidance_interface.cpp.

◆ set_estimated_curvature()

bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_estimated_curvature ( float curvature)

Sets the estimated course curvature over ground for the machine.

Parameters
[in]curvatureThe 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 112 of file isobus_guidance_interface.cpp.

◆ set_guidance_limit_status()

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).

Parameters
[in]statusThe limit status to report
Returns
True if the guidance limit status changed, false otherwise

Definition at line 187 of file isobus_guidance_interface.cpp.

◆ set_guidance_steering_input_position_status()

bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_steering_input_position_status ( GenericSAEbs02SlotValue state)

Sets the guidance steering input position state.

Parameters
[in]stateThe state to set for the guidance steering input position
Returns
True if the guidance steering input position status changed, false otherwise

Definition at line 157 of file isobus_guidance_interface.cpp.

◆ set_guidance_steering_system_readiness_state()

bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_steering_system_readiness_state ( GenericSAEbs02SlotValue state)

Sets the guidance system's readiness state to report.

Parameters
[in]stateThe state to report. See definition of GenericSAEbs02SlotValue
Returns
True if the guidance steering system readiness state changed, false otherwise

Definition at line 142 of file isobus_guidance_interface.cpp.

◆ set_guidance_system_command_exit_reason_code()

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.

Parameters
[in]exitCodeThe exit code for the guidance system to report
Returns
The exit code for the guidance system

Definition at line 202 of file isobus_guidance_interface.cpp.

◆ set_guidance_system_remote_engage_switch_status()

bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_guidance_system_remote_engage_switch_status ( GenericSAEbs02SlotValue switchStatus)

Sets the state for the steering engage switch.

Parameters
[in]switchStatusThe engage switch state to report
Returns
True if the engage switch state changed, false otherwise

Definition at line 217 of file isobus_guidance_interface.cpp.

◆ set_mechanical_system_lockout_state()

bool isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::set_mechanical_system_lockout_state ( MechanicalSystemLockout state)

Sets the mechanical system lockout state.

Parameters
[in]stateThe mechanical system lockout state to report
Returns
True if the mechanical system lockout state changed, false otherwise

Definition at line 127 of file isobus_guidance_interface.cpp.

◆ set_request_reset_command_status()

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".

Parameters
[in]stateThe request reset command state to report
Returns
True if the request reset command status changed, false otherwise

Definition at line 172 of file isobus_guidance_interface.cpp.

◆ set_timestamp_ms()

void isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::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 237 of file isobus_guidance_interface.cpp.

Member Data Documentation

◆ controlFunction

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

The CF that is sending the message.

Definition at line 297 of file isobus_guidance_interface.hpp.

◆ estimatedCurvature

float isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::estimatedCurvature = 0.0f
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.

◆ guidanceLimitStatus

GuidanceLimitStatus isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::guidanceLimitStatus = GuidanceLimitStatus::NotAvailable
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.

◆ guidanceSteeringInputPositionStatus

GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::guidanceSteeringInputPositionStatus = GenericSAEbs02SlotValue::NotAvailableTakeNoAction
private

The reported state of the steering input position. (SPN 5241)

Definition at line 302 of file isobus_guidance_interface.hpp.

◆ guidanceSteeringSystemReadinessState

GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::guidanceSteeringSystemReadinessState = GenericSAEbs02SlotValue::NotAvailableTakeNoAction
private

The reported state of the steering system's readiness to steer (SPN 5242)

Definition at line 301 of file isobus_guidance_interface.hpp.

◆ guidanceSystemCommandExitReasonCode

std::uint8_t isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::guidanceSystemCommandExitReasonCode = static_cast<std::uint8_t>(GuidanceSystemCommandExitReasonCode::NotAvailable)
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.

◆ guidanceSystemRemoteEngageSwitchStatus

GenericSAEbs02SlotValue isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::guidanceSystemRemoteEngageSwitchStatus = GenericSAEbs02SlotValue::NotAvailableTakeNoAction
private

The reported state of the remote engage switch (SPN 9726)

Definition at line 303 of file isobus_guidance_interface.hpp.

◆ mechanicalSystemLockoutState

MechanicalSystemLockout isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::mechanicalSystemLockoutState = MechanicalSystemLockout::NotAvailable
private

The reported state of the mechanical system lockout switch (SPN 5243)

Definition at line 300 of file isobus_guidance_interface.hpp.

◆ requestResetCommandStatus

RequestResetCommandStatus isobus::AgriculturalGuidanceInterface::GuidanceMachineInfo::requestResetCommandStatus = RequestResetCommandStatus::NotAvailable
private

The reported state of the request reset command (SPN 5240)

Definition at line 304 of file isobus_guidance_interface.hpp.

◆ timestamp_ms

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

A timestamp for when the message was released in milliseconds.

Definition at line 299 of file isobus_guidance_interface.hpp.


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