AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
Message that provides the current machine selected speed, direction and source parameters. More...
#include <isobus_speed_distance_messages.hpp>
Public Types | |
enum class | ExitReasonCode : std::uint8_t { NoReasonAllClear = 0 , RequiredLevelOfOperatorPresenceAwarenessNotDetected = 1 , ImplementReleasedControlOfFunction = 2 , OperatorOverrideOfFunction = 3 , OperatorControlNotInValidPosition = 4 , RemoteCommandTimeout = 5 , RemoteCommandOutOfRangeInvalid = 6 , FunctionNotCalibrated = 7 , OperatorControlFault = 8 , FunctionFault = 9 , VehicleTransmissionGearDoesNotAllowRemoteCommands = 22 , Error = 62 , NotAvailable = 63 } |
This parameter is used to indicate why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands. More... | |
enum class | SpeedSource : std::uint8_t { WheelBasedSpeed = 0 , GroundBasedSpeed = 1 , NavigationBasedSpeed = 2 , Blended = 3 , Simulated = 4 , Reserved_1 = 5 , Reserved_2 = 6 , NotAvailable = 7 } |
An indication of the speed source that is currently being reported in the machine selected speed parameter. More... | |
enum class | LimitStatus : std::uint8_t { NotLimited = 0 , OperatorLimitedControlled = 1 , LimitedHigh = 2 , LimitedLow = 3 , Reserved_1 = 4 , Reserved_2 = 5 , NonRecoverableFault = 6 , NotAvailable } |
This parameter is used to report the Tractor ECU's present limit status associated with a parameter whose commands are persistent. Similar to other SAEbs03 limit statuses. More... | |
Public Member Functions | |
MachineSelectedSpeedData (std::shared_ptr< ControlFunction > sender) | |
Constructor for a MachineSelectedSpeedData. | |
std::uint32_t | get_machine_distance () const |
Returns the Actual distance travelled by the machine based on the value of selected machine speed (SPN 4305). | |
bool | set_machine_distance (std::uint32_t distance) |
Sets the Actual distance travelled by the machine based on the value of selected machine speed (SPN 4305). | |
std::uint16_t | get_machine_speed () const |
Returns the current machine selected speed. | |
bool | set_machine_speed (std::uint16_t speed) |
Sets the machine selected speed. | |
std::uint8_t | get_exit_reason_code () const |
Returns the reason why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands. | |
bool | set_exit_reason_code (std::uint8_t exitCode) |
Sets the reason why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands. | |
SpeedSource | get_speed_source () const |
Returns the speed source that is currently being reported in the machine selected speed parameter (SPN-4305). | |
bool | set_speed_source (SpeedSource selectedSource) |
Sets the speed source that is currently being reported in the machine selected speed parameter (SPN-4305). | |
LimitStatus | get_limit_status () const |
Returns The Tractor ECU's present limit status associated with a parameter whose commands are persistent. | |
bool | set_limit_status (LimitStatus statusToSet) |
Sets the Tractor ECU's present limit status associated with a parameter whose commands are persistent. | |
MachineDirection | get_machine_direction_of_travel () const |
Returns A measured signal indicating either forward or reverse as the direction of travel. | |
bool | set_machine_direction_of_travel (MachineDirection directionOfTravel) |
Sets a measured signal indicating either forward or reverse as the direction of travel. | |
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. | |
std::uint32_t | timestamp_ms = 0 |
A timestamp for when the message was released in milliseconds. | |
std::uint32_t | machineSelectedSpeedDistance_mm = 0 |
Stores the machine selected speed distance in millimeters. | |
std::uint16_t | machineSelectedSpeed_mm_per_sec = 0 |
Stores the machine selected speed in mm/s. | |
std::uint8_t | exitReasonCode = static_cast<std::uint8_t>(ExitReasonCode::NotAvailable) |
Stores why the machine has most recently stopped accepting remote commands. | |
SpeedSource | source = SpeedSource::NotAvailable |
Stores the speed source that is currently being reported. | |
LimitStatus | limitStatus = LimitStatus::NotAvailable |
Stores the tractor ECU limit status. | |
MachineDirection | machineDirectionState = MachineDirection::NotAvailable |
Stores direction of travel. | |
Message that provides the current machine selected speed, direction and source parameters.
This is usually the best/authoritative source of speed information as chosen by the machine.
Definition at line 193 of file isobus_speed_distance_messages.hpp.
|
strong |
This parameter is used to indicate why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands.
Definition at line 199 of file isobus_speed_distance_messages.hpp.
|
strong |
This parameter is used to report the Tractor ECU's present limit status associated with a parameter whose commands are persistent. Similar to other SAEbs03 limit statuses.
Definition at line 236 of file isobus_speed_distance_messages.hpp.
|
strong |
An indication of the speed source that is currently being reported in the machine selected speed parameter.
This parameter is an indication of the speed source that is currently being reported in the machine selected speed parameter. Simulated speed is a system-generated speed message to permit implement operations when the machine is not actually moving. Blended speed is a speed message that uses a combination of the actual speed sources based on the operator's or the manufacturer's selected logic, i.e. when a ground-based speed source is less than 0.5 m/s, the speed message will then send the wheel speed source.
Definition at line 221 of file isobus_speed_distance_messages.hpp.
|
explicit |
Constructor for a MachineSelectedSpeedData.
[in] | sender | The control function that is sending this message |
Definition at line 172 of file isobus_speed_distance_messages.cpp.
std::uint8_t isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_exit_reason_code | ( | ) | const |
Returns the reason why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands.
Definition at line 214 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::MachineSelectedSpeedData::LimitStatus isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_limit_status | ( | ) | const |
Returns The Tractor ECU's present limit status associated with a parameter whose commands are persistent.
Definition at line 238 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::MachineDirection isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_machine_direction_of_travel | ( | ) | const |
Returns A measured signal indicating either forward or reverse as the direction of travel.
Definition at line 250 of file isobus_speed_distance_messages.cpp.
std::uint32_t isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_machine_distance | ( | ) | const |
Returns the Actual distance travelled by the machine based on the value of selected machine speed (SPN 4305).
Definition at line 177 of file isobus_speed_distance_messages.cpp.
std::uint16_t isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_machine_speed | ( | ) | const |
Returns the current machine selected speed.
The TECU sends this value as the authoritative speed for the machine.
Definition at line 196 of file isobus_speed_distance_messages.cpp.
std::shared_ptr< ControlFunction > isobus::SpeedMessagesInterface::MachineSelectedSpeedData::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 262 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::MachineSelectedSpeedData::SpeedSource isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_speed_source | ( | ) | const |
Returns the speed source that is currently being reported in the machine selected speed parameter (SPN-4305).
Definition at line 226 of file isobus_speed_distance_messages.cpp.
std::uint32_t isobus::SpeedMessagesInterface::MachineSelectedSpeedData::get_timestamp_ms | ( | ) | const |
Returns the timestamp for when the message was received, in milliseconds.
Definition at line 272 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_exit_reason_code | ( | std::uint8_t | exitCode | ) |
Sets the reason why the vehicle speed control unit cannot currently accept remote commands or has most recently stopped accepting remote commands.
exitCode | The exit/reason code to set |
Definition at line 219 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_limit_status | ( | LimitStatus | statusToSet | ) |
Sets the Tractor ECU's present limit status associated with a parameter whose commands are persistent.
statusToSet | The Tractor ECU's present limit status associated with a parameter whose commands are persistent |
Definition at line 243 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_machine_direction_of_travel | ( | MachineDirection | directionOfTravel | ) |
Sets a measured signal indicating either forward or reverse as the direction of travel.
directionOfTravel | The measured direction of travel for the machine |
Definition at line 255 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_machine_distance | ( | std::uint32_t | distance | ) |
Sets the Actual distance travelled by the machine based on the value of selected machine speed (SPN 4305).
[in] | distance | The Actual distance travelled by the machine based on the value of selected machine speed (millimeters) |
Definition at line 189 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_machine_speed | ( | std::uint16_t | speed | ) |
Sets the machine selected speed.
speed | The machine selected speed in mm/s |
Definition at line 207 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedData::set_speed_source | ( | SpeedSource | selectedSource | ) |
Sets the speed source that is currently being reported in the machine selected speed parameter (SPN-4305).
selectedSource | The speed source that is currently being reported in the machine selected speed parameter (SPN-4305). |
Definition at line 231 of file isobus_speed_distance_messages.cpp.
void isobus::SpeedMessagesInterface::MachineSelectedSpeedData::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 267 of file isobus_speed_distance_messages.cpp.
|
private |
The CF that is sending the message.
Definition at line 333 of file isobus_speed_distance_messages.hpp.
|
private |
Stores why the machine has most recently stopped accepting remote commands.
Definition at line 337 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the tractor ECU limit status.
Definition at line 339 of file isobus_speed_distance_messages.hpp.
|
private |
Stores direction of travel.
Definition at line 340 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the machine selected speed in mm/s.
Definition at line 336 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the machine selected speed distance in millimeters.
Definition at line 335 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the speed source that is currently being reported.
Definition at line 338 of file isobus_speed_distance_messages.hpp.
|
private |
A timestamp for when the message was released in milliseconds.
Definition at line 334 of file isobus_speed_distance_messages.hpp.