AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
Message that provides the control of the machine speed and direction. If you receive this message, you can sniff the speed commands being sent to the TECU or act as the TECU or propulsion interface yourself. More...
#include <isobus_speed_distance_messages.hpp>
Public Member Functions | |
MachineSelectedSpeedCommandData (std::shared_ptr< ControlFunction > sender) | |
Constructor for a MachineSelectedSpeedCommandData. | |
std::uint16_t | get_machine_speed_setpoint_command () const |
Returns the commanded setpoint value of the machine speed as measured by the selected source in mm/s. | |
bool | set_machine_speed_setpoint_command (std::uint16_t speed) |
Sets The commanded setpoint value of the machine speed as measured by the selected source in mm/s. | |
std::uint16_t | get_machine_selected_speed_setpoint_limit () const |
Returns the machine's maximum allowed speed in mm/s, which get's communicated to the tractor/machine. | |
bool | set_machine_selected_speed_setpoint_limit (std::uint16_t speedLimit) |
Sets the maximum allowed machine speed in mm/s, which gets communicated to the tractor/machine. | |
MachineDirection | get_machine_direction_command () const |
Returns The commanded direction of the machine. | |
bool | set_machine_direction_of_travel (MachineDirection commandedDirection) |
Sets the commanded direction of the machine. | |
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::uint16_t | speedCommandedSetpoint = 0 |
Stores the commanded speed setpoint in mm/s. | |
std::uint16_t | speedSetpointLimit = 0 |
Stores the maximum allowed speed in mm/s. | |
MachineDirection | machineDirectionCommand = MachineDirection::NotAvailable |
Stores commanded direction of travel. | |
Message that provides the control of the machine speed and direction. If you receive this message, you can sniff the speed commands being sent to the TECU or act as the TECU or propulsion interface yourself.
Definition at line 420 of file isobus_speed_distance_messages.hpp.
|
explicit |
Constructor for a MachineSelectedSpeedCommandData.
[in] | sender | The control function that is sending this message |
Definition at line 346 of file isobus_speed_distance_messages.cpp.
SpeedMessagesInterface::MachineDirection isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::get_machine_direction_command | ( | ) | const |
Returns The commanded direction of the machine.
Definition at line 389 of file isobus_speed_distance_messages.cpp.
std::uint16_t isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::get_machine_selected_speed_setpoint_limit | ( | ) | const |
Returns the machine's maximum allowed speed in mm/s, which get's communicated to the tractor/machine.
Definition at line 370 of file isobus_speed_distance_messages.cpp.
std::uint16_t isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::get_machine_speed_setpoint_command | ( | ) | const |
Returns the commanded setpoint value of the machine speed as measured by the selected source in mm/s.
Definition at line 351 of file isobus_speed_distance_messages.cpp.
std::shared_ptr< ControlFunction > isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::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 401 of file isobus_speed_distance_messages.cpp.
std::uint32_t isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::get_timestamp_ms | ( | ) | const |
Returns the timestamp for when the message was received, in milliseconds.
Definition at line 411 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::set_machine_direction_of_travel | ( | MachineDirection | commandedDirection | ) |
Sets the commanded direction of the machine.
commandedDirection | The commanded direction of travel for the machine |
Definition at line 394 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::set_machine_selected_speed_setpoint_limit | ( | std::uint16_t | speedLimit | ) |
Sets the maximum allowed machine speed in mm/s, which gets communicated to the tractor/machine.
[in] | speedLimit | The maximum allowed machine speed in mm/s |
Definition at line 382 of file isobus_speed_distance_messages.cpp.
bool isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::set_machine_speed_setpoint_command | ( | std::uint16_t | speed | ) |
Sets The commanded setpoint value of the machine speed as measured by the selected source in mm/s.
speed | The commanded setpoint value of the machine speed as measured by the selected source in mm/s |
Definition at line 363 of file isobus_speed_distance_messages.cpp.
void isobus::SpeedMessagesInterface::MachineSelectedSpeedCommandData::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 406 of file isobus_speed_distance_messages.cpp.
|
private |
The CF that is sending the message.
Definition at line 473 of file isobus_speed_distance_messages.hpp.
|
private |
Stores commanded direction of travel.
Definition at line 477 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the commanded speed setpoint in mm/s.
Definition at line 475 of file isobus_speed_distance_messages.hpp.
|
private |
Stores the maximum allowed speed in mm/s.
Definition at line 476 of file isobus_speed_distance_messages.hpp.
|
private |
A timestamp for when the message was released in milliseconds.
Definition at line 474 of file isobus_speed_distance_messages.hpp.