AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
Represents the data sent in the NMEA2K PGN 129026 (0x1F802) More...
#include <nmea2000_message_definitions.hpp>
Public Types | |
enum class | CourseOverGroundReference : std::uint8_t { True = 0 , Magnetic = 1 , Error = 2 , NotApplicableOrNull = 3 } |
Enumerates the references to which the course may be relative to. More... | |
Public Member Functions | |
CourseOverGroundSpeedOverGroundRapidUpdate (std::shared_ptr< ControlFunction > source) | |
Constructor for a CourseOverGroundSpeedOverGroundRapidUpdate message data object. | |
std::shared_ptr< ControlFunction > | get_control_function () const |
Returns the control function sending this instance of this message. | |
std::uint32_t | get_timestamp () const |
Returns a timestamp in milliseconds corresponding to when the message was last sent or received. | |
bool | set_timestamp (std::uint32_t timestamp) |
Sets the time in milliseconds when the message was last sent or received. | |
std::uint16_t | get_raw_course_over_ground () const |
Returns the course over ground in its base units of 0.0001 radians (between 0 and 2 pi radians) | |
float | get_course_over_ground () const |
Returns the course over ground in units of radians. | |
bool | set_course_over_ground (std::uint16_t course) |
Sets the course over ground in units of 0.0001 radians. | |
std::uint16_t | get_raw_speed_over_ground () const |
Returns the speed over ground in units of 0.01 meters per second. | |
float | get_speed_over_ground () const |
Returns the speed over ground in units of meters per second. | |
bool | set_speed_over_ground (std::uint16_t speed) |
Sets the speed over ground in units of 0.01 meters per second. | |
std::uint8_t | get_sequence_id () const |
Returns the sequence ID. This is used to associate data within other PGNs with this message. | |
bool | set_sequence_id (std::uint8_t sequenceNumber) |
Sets the sequence ID for this message. | |
CourseOverGroundReference | get_course_over_ground_reference () const |
Returns the reference to which the course over ground is relative. | |
bool | set_course_over_ground_reference (CourseOverGroundReference reference) |
Sets the reference to which the course over ground is relative. | |
void | serialize (std::vector< std::uint8_t > &buffer) const |
Serializes the current state of this object into a buffer to be sent on the CAN bus. | |
bool | deserialize (const CANMessage &receivedMessage) |
Deserializes a CAN message to populate this object's contents. Updates the timestamp when called. | |
Static Public Member Functions | |
static std::uint32_t | get_timeout () |
Returns the timeout (the sending interval) for this message in milliseconds. | |
Private Attributes | |
std::shared_ptr< ControlFunction > | senderControlFunction |
The sender of the message data. | |
std::uint32_t | messageTimestamp_ms = 0 |
A timestamp in milliseconds when this message was last sent or received. | |
std::uint16_t | courseOverGround = 0 |
This field contains the direction of the path over ground actually followed by the vessel in 0.0001 radians between 0 and 2pi rad. | |
std::uint16_t | speedOverGround = 0 |
This field contains the speed of the vessel in 0.01 m/s. | |
std::uint8_t | sequenceID = 0 |
The sequence identifier field is used to tie related PGNs together. Somewhat arbitrary. | |
CourseOverGroundReference | cogReference = CourseOverGroundReference::NotApplicableOrNull |
Used to indicate the reference for the course over ground, ie true or magnetic north. | |
Static Private Attributes | |
static constexpr std::uint32_t | CYCLIC_MESSAGE_RATE_MS = 250 |
The transmit interval for this message as specified in NMEA2000. | |
Represents the data sent in the NMEA2K PGN 129026 (0x1F802)
Definition at line 278 of file nmea2000_message_definitions.hpp.
|
strong |
Enumerates the references to which the course may be relative to.
Enumerator | |
---|---|
True | True north. |
Magnetic | Magnetic North. |
Definition at line 282 of file nmea2000_message_definitions.hpp.
|
explicit |
Constructor for a CourseOverGroundSpeedOverGroundRapidUpdate message data object.
[in] | source | The control function sending/receiving this message |
Definition at line 351 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::deserialize | ( | const CANMessage & | receivedMessage | ) |
Deserializes a CAN message to populate this object's contents. Updates the timestamp when called.
[in] | receivedMessage | The CAN message to parse when deserializing |
Definition at line 445 of file nmea2000_message_definitions.cpp.
std::shared_ptr< ControlFunction > isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_control_function | ( | ) | const |
Returns the control function sending this instance of this message.
Definition at line 356 of file nmea2000_message_definitions.cpp.
float isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_course_over_ground | ( | ) | const |
Returns the course over ground in units of radians.
Definition at line 378 of file nmea2000_message_definitions.cpp.
CourseOverGroundSpeedOverGroundRapidUpdate::CourseOverGroundReference isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_course_over_ground_reference | ( | ) | const |
Returns the reference to which the course over ground is relative.
Definition at line 419 of file nmea2000_message_definitions.cpp.
std::uint16_t isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_raw_course_over_ground | ( | ) | const |
Returns the course over ground in its base units of 0.0001 radians (between 0 and 2 pi radians)
Definition at line 373 of file nmea2000_message_definitions.cpp.
std::uint16_t isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_raw_speed_over_ground | ( | ) | const |
Returns the speed over ground in units of 0.01 meters per second.
Definition at line 390 of file nmea2000_message_definitions.cpp.
std::uint8_t isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_sequence_id | ( | ) | const |
Returns the sequence ID. This is used to associate data within other PGNs with this message.
Definition at line 407 of file nmea2000_message_definitions.cpp.
float isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_speed_over_ground | ( | ) | const |
Returns the speed over ground in units of meters per second.
Definition at line 395 of file nmea2000_message_definitions.cpp.
|
static |
Returns the timeout (the sending interval) for this message in milliseconds.
Definition at line 464 of file nmea2000_message_definitions.cpp.
std::uint32_t isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::get_timestamp | ( | ) | const |
Returns a timestamp in milliseconds corresponding to when the message was last sent or received.
Definition at line 361 of file nmea2000_message_definitions.cpp.
void isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::serialize | ( | std::vector< std::uint8_t > & | buffer | ) | const |
Serializes the current state of this object into a buffer to be sent on the CAN bus.
[in] | buffer | A buffer to serialize the message data into |
Definition at line 431 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::set_course_over_ground | ( | std::uint16_t | course | ) |
Sets the course over ground in units of 0.0001 radians.
[in] | course | The course to set, in 0.0001 radians |
Definition at line 383 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::set_course_over_ground_reference | ( | CourseOverGroundReference | reference | ) |
Sets the reference to which the course over ground is relative.
[in] | reference | The reference to set (as enumerated in CourseOverGroundReference) |
Definition at line 424 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::set_sequence_id | ( | std::uint8_t | sequenceNumber | ) |
Sets the sequence ID for this message.
[in] | sequenceNumber | The sequence number to set. Max value is 252. |
Definition at line 412 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::set_speed_over_ground | ( | std::uint16_t | speed | ) |
Sets the speed over ground in units of 0.01 meters per second.
[in] | speed | The speed to set, in 0.01 m/s |
Definition at line 400 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate::set_timestamp | ( | std::uint32_t | timestamp | ) |
Sets the time in milliseconds when the message was last sent or received.
[in] | timestamp | The timestamp (in milliseconds) to set for when this message was sent or received |
Definition at line 366 of file nmea2000_message_definitions.cpp.
|
private |
Used to indicate the reference for the course over ground, ie true or magnetic north.
Definition at line 372 of file nmea2000_message_definitions.hpp.
|
private |
This field contains the direction of the path over ground actually followed by the vessel in 0.0001 radians between 0 and 2pi rad.
Definition at line 369 of file nmea2000_message_definitions.hpp.
|
staticconstexprprivate |
The transmit interval for this message as specified in NMEA2000.
Definition at line 365 of file nmea2000_message_definitions.hpp.
|
private |
A timestamp in milliseconds when this message was last sent or received.
Definition at line 368 of file nmea2000_message_definitions.hpp.
|
private |
The sender of the message data.
Definition at line 367 of file nmea2000_message_definitions.hpp.
|
private |
The sequence identifier field is used to tie related PGNs together. Somewhat arbitrary.
Definition at line 371 of file nmea2000_message_definitions.hpp.
|
private |
This field contains the speed of the vessel in 0.01 m/s.
Definition at line 370 of file nmea2000_message_definitions.hpp.