AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
Groups the data encoded in an ISO "Wheel-based Speed and Distance" message. More...
#include <isobus_speed_distance_messages.hpp>
Public Types | |
enum class | KeySwitchState : std::uint8_t { Off = 0 , NotOff = 1 , Error = 2 , NotAvailable = 3 } |
Enumerates the key switch states of the tractor or power unit. More... | |
enum class | ImplementStartStopOperations : std::uint8_t { StopDisableImplementOperations = 0 , StartEnableImplementOperations = 1 , Error = 2 , NotAvailable = 3 } |
Enumerates the states of a switch or operator input to start or enable implement operations. More... | |
enum class | OperatorDirectionReversed : std::uint8_t { NotReversed = 0 , Reversed = 1 , Error = 2 , NotAvailable = 3 } |
This parameter indicates whether the reported direction is reversed from the perspective of the operator. More... | |
Public Member Functions | |
WheelBasedMachineSpeedData (std::shared_ptr< ControlFunction > sender) | |
Constructor for a WheelBasedMachineSpeedData. | |
std::uint32_t | get_machine_distance () const |
Returns The distance traveled by a machine as calculated from wheel or tail-shaft speed. | |
bool | set_machine_distance (std::uint32_t distance) |
Sets the distance traveled by a machine as calculated from wheel or tail-shaft speed. | |
std::uint16_t | get_machine_speed () const |
Returns the value of the speed of a machine as calculated from the measured wheel or tail-shaft speed. | |
bool | set_machine_speed (std::uint16_t speed) |
Sets the value of the speed of a machine as calculated from the measured wheel or tail-shaft speed. | |
std::uint8_t | get_maximum_time_of_tractor_power () const |
Returns the maximum time (in minutes) of remaining tractor or power-unit-supplied electrical power at the current load. | |
bool | set_maximum_time_of_tractor_power (std::uint8_t maxTime) |
Sets the maximum time (in minutes) of remaining tractor or power-unit-supplied electrical power at the current load. | |
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 direction) |
Sets a measured signal indicating either forward or reverse as the direction of travel. | |
KeySwitchState | get_key_switch_state () const |
Returns the key switch state of the tractor or power unit. | |
bool | set_key_switch_state (KeySwitchState state) |
Sets the reported key switch state of the tractor or power unit. | |
ImplementStartStopOperations | get_implement_start_stop_operations_state () const |
Returns the state of a switch or other operator input to start or enable implement operations. | |
bool | set_implement_start_stop_operations_state (ImplementStartStopOperations state) |
Sets the state of a switch or other operator input to start or enable implement operations. | |
OperatorDirectionReversed | get_operator_direction_reversed_state () const |
Returns whether the reported direction is reversed from the perspective of the operator. | |
bool | set_operator_direction_reversed_state (OperatorDirectionReversed reverseState) |
Sets whether the reported direction is reversed from the perspective of the operator. | |
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 | wheelBasedMachineDistance_mm = 0 |
Stores the decoded machine wheel-based distance in millimeters. | |
std::uint16_t | wheelBasedMachineSpeed_mm_per_sec = 0 |
Stores the decoded wheel-based machine speed in mm/s. | |
std::uint8_t | maximumTimeOfTractorPower_min = 0 |
Stores the maximum time of remaining tractor or power-unit-supplied electrical power at the current load. | |
MachineDirection | machineDirectionState = MachineDirection::NotAvailable |
Stores direction of travel. | |
KeySwitchState | keySwitchState = KeySwitchState::NotAvailable |
Stores the key switch state of the tractor or power unit. | |
ImplementStartStopOperations | implementStartStopOperationsState = ImplementStartStopOperations::NotAvailable |
Stores the state of a switch or other operator input to start or enable implement operations. | |
OperatorDirectionReversed | operatorDirectionReversedState = OperatorDirectionReversed::NotAvailable |
Stores whether the reported direction is reversed from the perspective of the operator. | |
Groups the data encoded in an ISO "Wheel-based Speed and Distance" message.
Definition at line 56 of file isobus_speed_distance_messages.hpp.
|
strong |
Enumerates the states of a switch or operator input to start or enable implement operations.
Definition at line 69 of file isobus_speed_distance_messages.hpp.
|
strong |
Enumerates the key switch states of the tractor or power unit.
Enumerator | |
---|---|
Off | Key is off. |
NotOff | Key is not off (does not always mean that it's on!) |
Definition at line 60 of file isobus_speed_distance_messages.hpp.
|
strong |
This parameter indicates whether the reported direction is reversed from the perspective of the operator.
Definition at line 78 of file isobus_speed_distance_messages.hpp.
|
explicit |
Constructor for a WheelBasedMachineSpeedData.
[in] | sender | The control function that is sending this message |
Definition at line 55 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::WheelBasedMachineSpeedData::ImplementStartStopOperations isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_implement_start_stop_operations_state | ( | ) | const |
Returns the state of a switch or other operator input to start or enable implement operations.
The start or enabled state can be the result of the implement being positioned in an operating position. It can be generated by an operator placing a switch to an ON state. Also called "Master ON/OFF" switch.
Definition at line 133 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::WheelBasedMachineSpeedData::KeySwitchState isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_key_switch_state | ( | ) | const |
Returns the key switch state of the tractor or power unit.
Definition at line 121 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::MachineDirection isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_machine_direction_of_travel | ( | ) | const |
Returns A measured signal indicating either forward or reverse as the direction of travel.
Definition at line 109 of file isobus_speed_distance_messages.cpp.
std::uint32_t isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_machine_distance | ( | ) | const |
Returns The distance traveled by a machine as calculated from wheel or tail-shaft speed.
Definition at line 60 of file isobus_speed_distance_messages.cpp.
std::uint16_t isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_machine_speed | ( | ) | const |
Returns the value of the speed of a machine as calculated from the measured wheel or tail-shaft speed.
Definition at line 79 of file isobus_speed_distance_messages.cpp.
std::uint8_t isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_maximum_time_of_tractor_power | ( | ) | const |
Returns the maximum time (in minutes) of remaining tractor or power-unit-supplied electrical power at the current load.
Definition at line 97 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::WheelBasedMachineSpeedData::OperatorDirectionReversed isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_operator_direction_reversed_state | ( | ) | const |
Returns whether the reported direction is reversed from the perspective of the operator.
Definition at line 145 of file isobus_speed_distance_messages.cpp.
std::shared_ptr< ControlFunction > isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::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 157 of file isobus_speed_distance_messages.cpp.
std::uint32_t isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::get_timestamp_ms | ( | ) | const |
Returns the timestamp for when the message was received, in milliseconds.
Definition at line 167 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_implement_start_stop_operations_state | ( | ImplementStartStopOperations | state | ) |
Sets the state of a switch or other operator input to start or enable implement operations.
The start or enabled state can be the result of the implement being positioned in an operating position. It can be generated by an operator placing a switch to an ON state. Also called "Master ON/OFF" switch.
state | The state of a switch or other operator input to start or enable implement operations. |
Definition at line 138 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_key_switch_state | ( | KeySwitchState | state | ) |
Sets the reported key switch state of the tractor or power unit.
state | The key switch state of the tractor or power unit. |
Definition at line 126 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_machine_direction_of_travel | ( | MachineDirection | direction | ) |
Sets a measured signal indicating either forward or reverse as the direction of travel.
direction | The measured direction of travel for the machine |
Definition at line 114 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_machine_distance | ( | std::uint32_t | distance | ) |
Sets the distance traveled by a machine as calculated from wheel or tail-shaft speed.
distance | The distance traveled by a machine as calculated from wheel or tail-shaft speed. (millimeters) |
Definition at line 72 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_machine_speed | ( | std::uint16_t | speed | ) |
Sets the value of the speed of a machine as calculated from the measured wheel or tail-shaft speed.
speed | The value of the speed of a machine as calculated from the measured wheel or tail-shaft speed. |
Definition at line 90 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_maximum_time_of_tractor_power | ( | std::uint8_t | maxTime | ) |
Sets the maximum time (in minutes) of remaining tractor or power-unit-supplied electrical power at the current load.
maxTime | The maximum time of remaining tractor or power-unit-supplied electrical power at the current load (in minutes) |
Definition at line 102 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::set_operator_direction_reversed_state | ( | OperatorDirectionReversed | reverseState | ) |
Sets whether the reported direction is reversed from the perspective of the operator.
reverseState | The state of whether the reported direction is reversed from the perspective of the operator |
Definition at line 150 of file isobus_speed_distance_messages.cpp.
void isobus::SpeedMessagesInterface::WheelBasedMachineSpeedData::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 162 of file isobus_speed_distance_messages.cpp.
|
private |
The CF that is sending the message.
Definition at line 180 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the state of a switch or other operator input to start or enable implement operations.
Definition at line 187 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the key switch state of the tractor or power unit.
Definition at line 186 of file isobus_speed_distance_messages.hpp.
|
private |
Stores direction of travel.
Definition at line 185 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the maximum time of remaining tractor or power-unit-supplied electrical power at the current load.
Definition at line 184 of file isobus_speed_distance_messages.hpp.
|
private |
Stores whether the reported direction is reversed from the perspective of the operator.
Definition at line 188 of file isobus_speed_distance_messages.hpp.
|
private |
A timestamp for when the message was released in milliseconds.
Definition at line 181 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the decoded machine wheel-based distance in millimeters.
Definition at line 182 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the decoded wheel-based machine speed in mm/s.
Definition at line 183 of file isobus_speed_distance_messages.hpp.