AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
Represents the data sent in the NMEA2K PGN 129025 (0x1F801) More...
#include <nmea2000_message_definitions.hpp>
Public Member Functions | |
PositionRapidUpdate (std::shared_ptr< ControlFunction > source) | |
Constructor for a PositionRapidUpdate 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::int32_t | get_raw_latitude () const |
double | get_latitude () const |
bool | set_latitude (std::int32_t latitudeToSet) |
Sets the current latitude in units of 1*10E-7 degrees. | |
std::int32_t | get_raw_longitude () const |
double | get_longitude () const |
bool | set_longitude (std::int32_t longitudeToSet) |
Sets the current longitude in units of 1*10E-7 degrees. | |
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. | |
Static Public Attributes | |
static constexpr std::int32_t | NOT_AVAILABLE = 0x7FFFFFFF |
A generic value that may be reported if the position solution is invalid. | |
Private Attributes | |
std::shared_ptr< ControlFunction > | senderControlFunction |
The sender of the message data. | |
std::int32_t | latitude = NOT_AVAILABLE |
The latitude in 1*10E-7 degrees. Negative values indicate south latitudes. | |
std::int32_t | longitude = NOT_AVAILABLE |
The longitude in 1*10E-7 degrees. Negative values indicate west longitudes. | |
std::uint32_t | messageTimestamp_ms = 0 |
A timestamp in milliseconds when this message was last sent or received. | |
Static Private Attributes | |
static constexpr std::uint32_t | CYCLIC_MESSAGE_RATE_MS = 100 |
The transmit interval for this message as specified in NMEA2000. | |
Represents the data sent in the NMEA2K PGN 129025 (0x1F801)
Definition at line 207 of file nmea2000_message_definitions.hpp.
|
explicit |
Constructor for a PositionRapidUpdate message data object.
[in] | source | The control function sending this message |
Definition at line 251 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::PositionRapidUpdate::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 321 of file nmea2000_message_definitions.cpp.
std::shared_ptr< ControlFunction > isobus::NMEA2000Messages::PositionRapidUpdate::get_control_function | ( | ) | const |
Returns the control function sending this instance of this message.
Definition at line 256 of file nmea2000_message_definitions.cpp.
double isobus::NMEA2000Messages::PositionRapidUpdate::get_latitude | ( | ) | const |
Definition at line 278 of file nmea2000_message_definitions.cpp.
double isobus::NMEA2000Messages::PositionRapidUpdate::get_longitude | ( | ) | const |
Definition at line 283 of file nmea2000_message_definitions.cpp.
std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_raw_latitude | ( | ) | const |
Definition at line 273 of file nmea2000_message_definitions.cpp.
std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_raw_longitude | ( | ) | const |
Definition at line 288 of file nmea2000_message_definitions.cpp.
|
static |
Returns the timeout (the sending interval) for this message in milliseconds.
Definition at line 346 of file nmea2000_message_definitions.cpp.
std::uint32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_timestamp | ( | ) | const |
Returns a timestamp in milliseconds corresponding to when the message was last sent or received.
Definition at line 261 of file nmea2000_message_definitions.cpp.
void isobus::NMEA2000Messages::PositionRapidUpdate::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 307 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::PositionRapidUpdate::set_latitude | ( | std::int32_t | latitudeToSet | ) |
Sets the current latitude in units of 1*10E-7 degrees.
[in] | latitudeToSet | The latitude to set in units of 1*10E-7 degrees |
Definition at line 293 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::PositionRapidUpdate::set_longitude | ( | std::int32_t | longitudeToSet | ) |
Sets the current longitude in units of 1*10E-7 degrees.
[in] | longitudeToSet | The latitude to set in units of 1*10E-7 degrees |
Definition at line 300 of file nmea2000_message_definitions.cpp.
bool isobus::NMEA2000Messages::PositionRapidUpdate::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 266 of file nmea2000_message_definitions.cpp.
|
staticconstexprprivate |
The transmit interval for this message as specified in NMEA2000.
Definition at line 269 of file nmea2000_message_definitions.hpp.
|
private |
The latitude in 1*10E-7 degrees. Negative values indicate south latitudes.
Definition at line 272 of file nmea2000_message_definitions.hpp.
|
private |
The longitude in 1*10E-7 degrees. Negative values indicate west longitudes.
Definition at line 273 of file nmea2000_message_definitions.hpp.
|
private |
A timestamp in milliseconds when this message was last sent or received.
Definition at line 274 of file nmea2000_message_definitions.hpp.
|
staticconstexpr |
A generic value that may be reported if the position solution is invalid.
Definition at line 214 of file nmea2000_message_definitions.hpp.
|
private |
The sender of the message data.
Definition at line 271 of file nmea2000_message_definitions.hpp.