AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | List of all members
isobus::NMEA2000Messages::PositionRapidUpdate Class Reference

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< ControlFunctionget_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< ControlFunctionsenderControlFunction
 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.
 

Detailed Description

Represents the data sent in the NMEA2K PGN 129025 (0x1F801)

Definition at line 207 of file nmea2000_message_definitions.hpp.

Constructor & Destructor Documentation

◆ PositionRapidUpdate()

isobus::NMEA2000Messages::PositionRapidUpdate::PositionRapidUpdate ( std::shared_ptr< ControlFunction > source)
explicit

Constructor for a PositionRapidUpdate message data object.

Parameters
[in]sourceThe control function sending this message

Definition at line 251 of file nmea2000_message_definitions.cpp.

Member Function Documentation

◆ deserialize()

bool isobus::NMEA2000Messages::PositionRapidUpdate::deserialize ( const CANMessage & receivedMessage)

Deserializes a CAN message to populate this object's contents. Updates the timestamp when called.

Parameters
[in]receivedMessageThe CAN message to parse when deserializing
Returns
True if the message was successfully deserialized and the data content was different than the stored content.

Definition at line 321 of file nmea2000_message_definitions.cpp.

Here is the call graph for this function:

◆ get_control_function()

std::shared_ptr< ControlFunction > isobus::NMEA2000Messages::PositionRapidUpdate::get_control_function ( ) const

Returns the control function sending this instance of this message.

Returns
The control function sending this instance of this message

Definition at line 256 of file nmea2000_message_definitions.cpp.

◆ get_latitude()

double isobus::NMEA2000Messages::PositionRapidUpdate::get_latitude ( ) const
Attention
This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present.
Returns
The current vessel/vehicle longitude in 1*10E-7 degrees

Definition at line 278 of file nmea2000_message_definitions.cpp.

◆ get_longitude()

double isobus::NMEA2000Messages::PositionRapidUpdate::get_longitude ( ) const
Attention
This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present.
Returns
The current vessel/vehicle longitude in 1*10E-7 degrees

Definition at line 283 of file nmea2000_message_definitions.cpp.

◆ get_raw_latitude()

std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_raw_latitude ( ) const
Attention
This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present.
Returns
The current vessel/vehicle latitude in 1*10E-7 degrees

Definition at line 273 of file nmea2000_message_definitions.cpp.

◆ get_raw_longitude()

std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_raw_longitude ( ) const
Attention
This is MUCH less accurate than the position in PGN 1F805 (129029). Use that instead if present.
Returns
The current vessel/vehicle longitude in 1*10E-7 degrees

Definition at line 288 of file nmea2000_message_definitions.cpp.

◆ get_timeout()

std::uint32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_timeout ( )
static

Returns the timeout (the sending interval) for this message in milliseconds.

Returns
This message's timeout (the sending interval) in milliseconds

Definition at line 346 of file nmea2000_message_definitions.cpp.

Here is the caller graph for this function:

◆ get_timestamp()

std::uint32_t isobus::NMEA2000Messages::PositionRapidUpdate::get_timestamp ( ) const

Returns a timestamp in milliseconds corresponding to when the message was last sent or received.

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.

◆ serialize()

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.

Parameters
[in]bufferA buffer to serialize the message data into

Definition at line 307 of file nmea2000_message_definitions.cpp.

◆ set_latitude()

bool isobus::NMEA2000Messages::PositionRapidUpdate::set_latitude ( std::int32_t latitudeToSet)

Sets the current latitude in units of 1*10E-7 degrees.

Parameters
[in]latitudeToSetThe latitude to set in units of 1*10E-7 degrees
Returns
true if the value that was set was different from the stored value

Definition at line 293 of file nmea2000_message_definitions.cpp.

Here is the caller graph for this function:

◆ set_longitude()

bool isobus::NMEA2000Messages::PositionRapidUpdate::set_longitude ( std::int32_t longitudeToSet)

Sets the current longitude in units of 1*10E-7 degrees.

Parameters
[in]longitudeToSetThe latitude to set in units of 1*10E-7 degrees
Returns
true if the value that was set was different from the stored value

Definition at line 300 of file nmea2000_message_definitions.cpp.

Here is the caller graph for this function:

◆ set_timestamp()

bool isobus::NMEA2000Messages::PositionRapidUpdate::set_timestamp ( std::uint32_t timestamp)

Sets the time in milliseconds when the message was last sent or received.

Parameters
[in]timestampThe timestamp (in milliseconds) to set for when this message was sent or received
Returns
true if the value that was set was different from the stored value

Definition at line 266 of file nmea2000_message_definitions.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ CYCLIC_MESSAGE_RATE_MS

constexpr std::uint32_t isobus::NMEA2000Messages::PositionRapidUpdate::CYCLIC_MESSAGE_RATE_MS = 100
staticconstexprprivate

The transmit interval for this message as specified in NMEA2000.

Definition at line 269 of file nmea2000_message_definitions.hpp.

◆ latitude

std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::latitude = NOT_AVAILABLE
private

The latitude in 1*10E-7 degrees. Negative values indicate south latitudes.

Definition at line 272 of file nmea2000_message_definitions.hpp.

◆ longitude

std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::longitude = NOT_AVAILABLE
private

The longitude in 1*10E-7 degrees. Negative values indicate west longitudes.

Definition at line 273 of file nmea2000_message_definitions.hpp.

◆ messageTimestamp_ms

std::uint32_t isobus::NMEA2000Messages::PositionRapidUpdate::messageTimestamp_ms = 0
private

A timestamp in milliseconds when this message was last sent or received.

Definition at line 274 of file nmea2000_message_definitions.hpp.

◆ NOT_AVAILABLE

constexpr std::int32_t isobus::NMEA2000Messages::PositionRapidUpdate::NOT_AVAILABLE = 0x7FFFFFFF
staticconstexpr

A generic value that may be reported if the position solution is invalid.

Definition at line 214 of file nmea2000_message_definitions.hpp.

◆ senderControlFunction

std::shared_ptr<ControlFunction> isobus::NMEA2000Messages::PositionRapidUpdate::senderControlFunction
private

The sender of the message data.

Definition at line 271 of file nmea2000_message_definitions.hpp.


The documentation for this class was generated from the following files: