AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
An interface for sending and receiving common NMEA2000 messages on an ISO11783 network. More...
#include <nmea2000_message_interface.hpp>
Public Member Functions | |
NMEA2000MessageInterface (std::shared_ptr< InternalControlFunction > sendingControlFunction, bool enableSendingCogSogCyclically, bool enableSendingDatumCyclically, bool enableSendingGNSSPositionDataCyclically, bool enableSendingPositionDeltaHighPrecisionRapidUpdateCyclically, bool enableSendingPositionRapidUpdateCyclically, bool enableSendingRateOfTurnCyclically, bool enableSendingVesselHeadingCyclically) | |
Constructor for a NMEA2000MessageInterface. | |
~NMEA2000MessageInterface () | |
Destructor for a NMEA2000MessageInterface. | |
NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate & | get_cog_sog_transmit_message () |
Returns a CourseOverGroundSpeedOverGroundRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::Datum & | get_datum_transmit_message () |
Returns a Datum object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::GNSSPositionData & | get_gnss_position_data_transmit_message () |
Returns a GNSSPositionData object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate & | get_position_delta_high_precision_rapid_update_transmit_message () |
Returns a PositionDeltaHighPrecisionRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::PositionRapidUpdate & | get_position_rapid_update_transmit_message () |
Returns a PositionRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::RateOfTurn & | get_rate_of_turn_transmit_message () |
Returns a RateOfTurn object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
NMEA2000Messages::VesselHeading & | get_vessel_heading_transmit_message () |
Returns a VesselHeading object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so. | |
std::size_t | get_number_received_course_speed_over_ground_message_sources () const |
Returns the number of unique senders of the COG & SOG message. | |
std::size_t | get_number_received_datum_message_sources () const |
Returns the number of unique datum message senders. | |
std::size_t | get_number_received_gnss_position_data_message_sources () const |
Returns the number of unique GNSS position data message senders. | |
std::size_t | get_number_received_position_delta_high_precision_rapid_update_message_sources () const |
Returns the number of unique delta position message senders. | |
std::size_t | get_number_received_position_rapid_update_message_sources () const |
Returns the number of unique position rapid update message senders. | |
std::size_t | get_number_received_rate_of_turn_message_sources () const |
Returns the number of unique rate of turn message senders. | |
std::size_t | get_number_received_vessel_heading_message_sources () const |
Returns the number of unique vessel heading message senders. | |
std::shared_ptr< NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate > | get_received_course_speed_over_ground_message (std::size_t index) const |
Returns the content of the COG & SOG message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::Datum > | get_received_datum_message (std::size_t index) const |
Returns the content of the Datum message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::GNSSPositionData > | get_received_gnss_position_data_message (std::size_t index) const |
Returns the content of the GNSS position data message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate > | get_received_position_delta_high_precision_rapid_update_message (std::size_t index) const |
Returns the content of the position delta high precision rapid update message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::PositionRapidUpdate > | get_received_position_rapid_update_message (std::size_t index) const |
Returns the content of the position rapid update message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::RateOfTurn > | get_received_rate_of_turn_message (std::size_t index) const |
Returns the content of the rate of turn message based on the index of the sender. Use this to read the received messages' content. | |
std::shared_ptr< NMEA2000Messages::VesselHeading > | get_received_vessel_heading_message (std::size_t index) const |
Returns the content of the vessel heading message based on the index of the sender. Use this to read the received messages' content. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate >, bool > & | get_course_speed_over_ground_rapid_update_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated COG & SOG messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::Datum >, bool > & | get_datum_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated datum messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::GNSSPositionData >, bool > & | get_gnss_position_data_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated GNSS position data messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate >, bool > & | get_position_delta_high_precision_rapid_update_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated position delta high precision rapid update messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionRapidUpdate >, bool > & | get_position_rapid_update_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated position rapid update messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::RateOfTurn >, bool > & | get_rate_of_turn_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated rate of turn messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::VesselHeading >, bool > & | get_vessel_heading_event_publisher () |
Returns an event dispatcher which you can use to get callbacks when new/updated vessel heading messages are received. | |
bool | get_enable_sending_cog_sog_cyclically () const |
Returns if the interface has cyclic sending of the course/speed over ground message enabled. | |
void | set_enable_sending_cog_sog_cyclically (bool enable) |
Instructs the interface to enable or disable sending the course/speed over ground message cyclically. | |
bool | get_enable_sending_datum_cyclically () const |
Returns if the interface has cyclic sending of the datum message enabled. | |
void | set_enable_sending_datum_cyclically (bool enable) |
Instructs the interface to enable or disable sending the datum data message cyclically. | |
bool | get_enable_sending_gnss_position_data_cyclically () const |
Returns if the interface has cyclic sending of the GNSS position data message enabled. | |
void | set_enable_sending_gnss_position_data_cyclically (bool enable) |
Instructs the interface to enable or disable sending the GNSS position data message cyclically. | |
bool | get_enable_sending_position_delta_high_precision_rapid_update_cyclically () const |
Returns if the interface has cyclic sending of the position delta high precision rapid update message enabled. | |
void | set_enable_sending_position_delta_high_precision_rapid_update_cyclically (bool enable) |
Instructs the interface to enable or disable sending the position delta high precision rapid update message cyclically. | |
bool | get_enable_sending_position_rapid_update_cyclically () const |
Returns if the interface has cyclic sending of the position rapid update message enabled. | |
void | set_enable_sending_position_rapid_update_cyclically (bool enable) |
Instructs the interface to enable or disable sending the position rapid update message cyclically. | |
bool | get_enable_sending_rate_of_turn_cyclically () const |
Returns if the interface has cyclic sending of the rate of turn message enabled. | |
void | set_enable_sending_rate_of_turn_cyclically (bool enable) |
Instructs the interface to enable or disable sending the rate of turn message cyclically. | |
bool | get_enable_sending_vessel_heading_cyclically () const |
Returns if the interface has cyclic sending of the vessel heading message enabled. | |
void | set_enable_sending_vessel_heading_cyclically (bool enable) |
Instructs the interface to enable or disable sending the vessel heading message cyclically. | |
void | initialize () |
Initializes the interface. Registers it with the network manager. Must be called before the interface can work properly. | |
bool | get_initialized () const |
Returns if initialize has been called. | |
void | terminate () |
Unregisters the interface from the network manager. | |
void | update () |
Updates the diagnostic protocol. Must be called periodically. 50ms Is a good minimum interval for this object. | |
Private Types | |
enum class | TransmitFlags : std::uint32_t { CourseOverGroundSpeedOverGroundRapidUpdate = 0 , Datum , GNSSPositionData , PositionDeltaHighPrecisionRapidUpdate , PositionRapidUpdate , RateOfTurn , VesselHeading , NumberOfFlags } |
Enumerates a set of flags to manage sending various NMEA2000 messages from this interface. More... | |
Private Member Functions | |
void | check_receive_timeouts () |
Checks to see if any received messages are timed out and prunes them if needed. | |
void | check_transmit_timeouts () |
Checks to see if any transmit flags need to be set based on the last time the message was sent, if enabled. | |
Static Private Member Functions | |
static void | process_flags (std::uint32_t flag, void *parentPointer) |
A generic callback for a the class to process flags from the ProcessingFlags | |
static void | process_rx_message (const CANMessage &message, void *parentPointer) |
Processes a CAN message destined for an instance of this interface. | |
Private Attributes | |
ProcessingFlags | txFlags |
A set of flags used to track what messages need to be transmitted or retried. | |
NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate | cogSogTransmitMessage |
Stores a set of data specifically for transmitting the PGN 129026 (0x1F802) if enabled. | |
NMEA2000Messages::Datum | datumTransmitMessage |
Stores a set of data specifically for transmitting the PGN 129044 (0x1F814) if enabled. | |
NMEA2000Messages::GNSSPositionData | gnssPositionDataTransmitMessage |
Stores a set of data specifically for transmitting the PGN 129029 (0x1F805) if enabled. | |
NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate | positionDeltaHighPrecisionRapidUpdateTransmitMessage |
Stores a set of data specifically for transmitting the PGN 129027 (0x1F803) if enabled. | |
NMEA2000Messages::PositionRapidUpdate | positionRapidUpdateTransmitMessage |
Stores a set of data specifically for transmitting the PGN 129025 (0x1F801) if enabled. | |
NMEA2000Messages::RateOfTurn | rateOfTurnTransmitMessage |
Stores a set of data specifically for transmitting the PGN 127251 (0x1F113) if enabled. | |
NMEA2000Messages::VesselHeading | vesselHeadingTransmitMessage |
Stores a set of data specifically for transmitting the PGN 127250 (0x1F112) if enabled. | |
std::vector< std::shared_ptr< NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate > > | receivedCogSogMessages |
Stores all received (and not timed out) sources of the COG & SOG message. | |
std::vector< std::shared_ptr< NMEA2000Messages::Datum > > | receivedDatumMessages |
Stores all received (and not timed out) sources of the Datum message. | |
std::vector< std::shared_ptr< NMEA2000Messages::GNSSPositionData > > | receivedGNSSPositionDataMessages |
Stores all received (and not timed out) sources of the GNSS position data message. | |
std::vector< std::shared_ptr< NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate > > | receivedPositionDeltaHighPrecisionRapidUpdateMessages |
Stores all received (and not timed out) sources of the position delta message. | |
std::vector< std::shared_ptr< NMEA2000Messages::PositionRapidUpdate > > | receivedPositionRapidUpdateMessages |
Stores all received (and not timed out) sources of the position rapid update message. | |
std::vector< std::shared_ptr< NMEA2000Messages::RateOfTurn > > | receivedRateOfTurnMessages |
Stores all received (and not timed out) sources of the rate of turn message. | |
std::vector< std::shared_ptr< NMEA2000Messages::VesselHeading > > | receivedVesselHeadingMessages |
Stores all received (and not timed out) sources of the vessel heading message. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate >, bool > | cogSogEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::Datum >, bool > | datumEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::GNSSPositionData >, bool > | gnssPositionDataEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate >, bool > | positionDeltaHighPrecisionRapidUpdateEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionRapidUpdate >, bool > | positionRapidUpdateEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::RateOfTurn >, bool > | rateOfTurnEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
EventDispatcher< const std::shared_ptr< NMEA2000Messages::VesselHeading >, bool > | vesselHeadingEventPublisher |
An event dispatcher for notifying when new guidance machine info messages are received. | |
bool | sendCogSogCyclically |
Determines if the interface will try to send the COG & SOG message cyclically. | |
bool | sendDatumCyclically |
Determines if the interface will try to send the Datum message cyclically. | |
bool | sendGNSSPositionDataCyclically |
Determines if the interface will try to send the GNSS position data message cyclically. | |
bool | sendPositionDeltaHighPrecisionRapidUpdateCyclically |
Determines if the interface will try to send the position delta high precision rapid update message message cyclically. | |
bool | sendPositionRapidUpdateCyclically |
Determines if the interface will try to send the position rapid update message cyclically. | |
bool | sendRateOfTurnCyclically |
Determines if the interface will try to send the rate of turn message cyclically. | |
bool | sendVesselHeadingCyclically |
Determines if the interface will try to send the vessel heading message cyclically. | |
bool | initialized = false |
Tracks if initialize has been called. | |
An interface for sending and receiving common NMEA2000 messages on an ISO11783 network.
Definition at line 29 of file nmea2000_message_interface.hpp.
|
strongprivate |
Enumerates a set of flags to manage sending various NMEA2000 messages from this interface.
Definition at line 278 of file nmea2000_message_interface.hpp.
isobus::NMEA2000MessageInterface::NMEA2000MessageInterface | ( | std::shared_ptr< InternalControlFunction > | sendingControlFunction, |
bool | enableSendingCogSogCyclically, | ||
bool | enableSendingDatumCyclically, | ||
bool | enableSendingGNSSPositionDataCyclically, | ||
bool | enableSendingPositionDeltaHighPrecisionRapidUpdateCyclically, | ||
bool | enableSendingPositionRapidUpdateCyclically, | ||
bool | enableSendingRateOfTurnCyclically, | ||
bool | enableSendingVesselHeadingCyclically ) |
Constructor for a NMEA2000MessageInterface.
[in] | sendingControlFunction | The control function the interface should use to send messages, or nullptr optionally |
[in] | enableSendingCogSogCyclically | Set to true for the interface to attempt to send the COG & SOG message cyclically |
[in] | enableSendingDatumCyclically | Set to true for the interface to attempt to send the Datum message cyclically |
[in] | enableSendingGNSSPositionDataCyclically | Set to true for the interface to attempt to send the GNSS position data message message cyclically |
[in] | enableSendingPositionDeltaHighPrecisionRapidUpdateCyclically | Set to true for the interface to attempt to send the position delta message cyclically |
[in] | enableSendingPositionRapidUpdateCyclically | Set to true for the interface to attempt to send the position rapid update message cyclically |
[in] | enableSendingRateOfTurnCyclically | Set to true for the interface to attempt to send the rate of turn message cyclically |
[in] | enableSendingVesselHeadingCyclically | Set to true for the interface to attempt to send the vessel heading message cyclically |
Definition at line 32 of file nmea2000_message_interface.cpp.
isobus::NMEA2000MessageInterface::~NMEA2000MessageInterface | ( | ) |
Destructor for a NMEA2000MessageInterface.
Definition at line 58 of file nmea2000_message_interface.cpp.
|
private |
Checks to see if any received messages are timed out and prunes them if needed.
Definition at line 668 of file nmea2000_message_interface.cpp.
|
private |
Checks to see if any transmit flags need to be set based on the last time the message was sent, if enabled.
Definition at line 752 of file nmea2000_message_interface.cpp.
NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate & isobus::NMEA2000MessageInterface::get_cog_sog_transmit_message | ( | ) |
Returns a CourseOverGroundSpeedOverGroundRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 63 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::CourseOverGroundSpeedOverGroundRapidUpdate >, bool > & isobus::NMEA2000MessageInterface::get_course_speed_over_ground_rapid_update_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated COG & SOG messages are received.
Definition at line 210 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::Datum >, bool > & isobus::NMEA2000MessageInterface::get_datum_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated datum messages are received.
Definition at line 215 of file nmea2000_message_interface.cpp.
NMEA2000Messages::Datum & isobus::NMEA2000MessageInterface::get_datum_transmit_message | ( | ) |
Returns a Datum object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 68 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_cog_sog_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the course/speed over ground message enabled.
Definition at line 245 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_datum_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the datum message enabled.
Definition at line 255 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_gnss_position_data_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the GNSS position data message enabled.
Definition at line 265 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_position_delta_high_precision_rapid_update_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the position delta high precision rapid update message enabled.
Definition at line 275 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_position_rapid_update_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the position rapid update message enabled.
Definition at line 285 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_rate_of_turn_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the rate of turn message enabled.
Definition at line 295 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_enable_sending_vessel_heading_cyclically | ( | ) | const |
Returns if the interface has cyclic sending of the vessel heading message enabled.
Definition at line 305 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::GNSSPositionData >, bool > & isobus::NMEA2000MessageInterface::get_gnss_position_data_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated GNSS position data messages are received.
Definition at line 220 of file nmea2000_message_interface.cpp.
NMEA2000Messages::GNSSPositionData & isobus::NMEA2000MessageInterface::get_gnss_position_data_transmit_message | ( | ) |
Returns a GNSSPositionData object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 73 of file nmea2000_message_interface.cpp.
bool isobus::NMEA2000MessageInterface::get_initialized | ( | ) | const |
Returns if initialize has been called.
Definition at line 331 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_course_speed_over_ground_message_sources | ( | ) | const |
Returns the number of unique senders of the COG & SOG message.
Definition at line 98 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_datum_message_sources | ( | ) | const |
Returns the number of unique datum message senders.
Definition at line 103 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_gnss_position_data_message_sources | ( | ) | const |
Returns the number of unique GNSS position data message senders.
Definition at line 108 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_position_delta_high_precision_rapid_update_message_sources | ( | ) | const |
Returns the number of unique delta position message senders.
Definition at line 113 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_position_rapid_update_message_sources | ( | ) | const |
Returns the number of unique position rapid update message senders.
Definition at line 118 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_rate_of_turn_message_sources | ( | ) | const |
Returns the number of unique rate of turn message senders.
Definition at line 123 of file nmea2000_message_interface.cpp.
std::size_t isobus::NMEA2000MessageInterface::get_number_received_vessel_heading_message_sources | ( | ) | const |
Returns the number of unique vessel heading message senders.
Definition at line 128 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate >, bool > & isobus::NMEA2000MessageInterface::get_position_delta_high_precision_rapid_update_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated position delta high precision rapid update messages are received.
Definition at line 225 of file nmea2000_message_interface.cpp.
NMEA2000Messages::PositionDeltaHighPrecisionRapidUpdate & isobus::NMEA2000MessageInterface::get_position_delta_high_precision_rapid_update_transmit_message | ( | ) |
Returns a PositionDeltaHighPrecisionRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 78 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::PositionRapidUpdate >, bool > & isobus::NMEA2000MessageInterface::get_position_rapid_update_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated position rapid update messages are received.
Definition at line 230 of file nmea2000_message_interface.cpp.
NMEA2000Messages::PositionRapidUpdate & isobus::NMEA2000MessageInterface::get_position_rapid_update_transmit_message | ( | ) |
Returns a PositionRapidUpdate object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 83 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::RateOfTurn >, bool > & isobus::NMEA2000MessageInterface::get_rate_of_turn_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated rate of turn messages are received.
Definition at line 235 of file nmea2000_message_interface.cpp.
NMEA2000Messages::RateOfTurn & isobus::NMEA2000MessageInterface::get_rate_of_turn_transmit_message | ( | ) |
Returns a RateOfTurn object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 88 of file nmea2000_message_interface.cpp.
std::shared_ptr< CourseOverGroundSpeedOverGroundRapidUpdate > isobus::NMEA2000MessageInterface::get_received_course_speed_over_ground_message | ( | std::size_t | index | ) | const |
Returns the content of the COG & SOG message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 133 of file nmea2000_message_interface.cpp.
std::shared_ptr< Datum > isobus::NMEA2000MessageInterface::get_received_datum_message | ( | std::size_t | index | ) | const |
Returns the content of the Datum message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 144 of file nmea2000_message_interface.cpp.
std::shared_ptr< GNSSPositionData > isobus::NMEA2000MessageInterface::get_received_gnss_position_data_message | ( | std::size_t | index | ) | const |
Returns the content of the GNSS position data message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 155 of file nmea2000_message_interface.cpp.
std::shared_ptr< PositionDeltaHighPrecisionRapidUpdate > isobus::NMEA2000MessageInterface::get_received_position_delta_high_precision_rapid_update_message | ( | std::size_t | index | ) | const |
Returns the content of the position delta high precision rapid update message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 166 of file nmea2000_message_interface.cpp.
std::shared_ptr< PositionRapidUpdate > isobus::NMEA2000MessageInterface::get_received_position_rapid_update_message | ( | std::size_t | index | ) | const |
Returns the content of the position rapid update message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 177 of file nmea2000_message_interface.cpp.
std::shared_ptr< RateOfTurn > isobus::NMEA2000MessageInterface::get_received_rate_of_turn_message | ( | std::size_t | index | ) | const |
Returns the content of the rate of turn message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 188 of file nmea2000_message_interface.cpp.
std::shared_ptr< VesselHeading > isobus::NMEA2000MessageInterface::get_received_vessel_heading_message | ( | std::size_t | index | ) | const |
Returns the content of the vessel heading message based on the index of the sender. Use this to read the received messages' content.
[in] | index | An index of senders of the the message |
Definition at line 199 of file nmea2000_message_interface.cpp.
EventDispatcher< const std::shared_ptr< NMEA2000Messages::VesselHeading >, bool > & isobus::NMEA2000MessageInterface::get_vessel_heading_event_publisher | ( | ) |
Returns an event dispatcher which you can use to get callbacks when new/updated vessel heading messages are received.
Definition at line 240 of file nmea2000_message_interface.cpp.
NMEA2000Messages::VesselHeading & isobus::NMEA2000MessageInterface::get_vessel_heading_transmit_message | ( | ) |
Returns a VesselHeading object that you can use to set the message's individual signal values, which will then be transmitted if the interface is configured to do so.
Definition at line 93 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::initialize | ( | ) |
Initializes the interface. Registers it with the network manager. Must be called before the interface can work properly.
Definition at line 315 of file nmea2000_message_interface.cpp.
|
staticprivate |
A generic callback for a the class to process flags from the ProcessingFlags
[in] | flag | The flag to process |
[in] | parentPointer | A generic context pointer to reference a specific instance of this protocol in the callback |
Definition at line 366 of file nmea2000_message_interface.cpp.
|
staticprivate |
Processes a CAN message destined for an instance of this interface.
[in] | message | The CAN message being received |
[in] | parentPointer | A context variable to find the relevant class instance |
Definition at line 493 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_cog_sog_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the course/speed over ground message cyclically.
[in] | enable | Set to true to have the interface cyclically send the course/speed over ground message cyclically |
Definition at line 250 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_datum_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the datum data message cyclically.
[in] | enable | Set to true to have the interface cyclically send the datum message cyclically |
Definition at line 260 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_gnss_position_data_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the GNSS position data message cyclically.
[in] | enable | Set to true to have the interface cyclically send the GNSS position data message cyclically |
Definition at line 270 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_position_delta_high_precision_rapid_update_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the position delta high precision rapid update message cyclically.
[in] | enable | Set to true to have the interface cyclically send the position delta high precision rapid update message cyclically |
Definition at line 280 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_position_rapid_update_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the position rapid update message cyclically.
[in] | enable | Set to true to have the interface cyclically send the position rapid update message cyclically |
Definition at line 290 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_rate_of_turn_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the rate of turn message cyclically.
[in] | enable | Set to true to have the interface cyclically send the rate of turn message cyclically |
Definition at line 300 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::set_enable_sending_vessel_heading_cyclically | ( | bool | enable | ) |
Instructs the interface to enable or disable sending the vessel heading message cyclically.
[in] | enable | Set to true to have the interface cyclically send the vessel heading message cyclically |
Definition at line 310 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::terminate | ( | ) |
Unregisters the interface from the network manager.
Definition at line 336 of file nmea2000_message_interface.cpp.
void isobus::NMEA2000MessageInterface::update | ( | ) |
Updates the diagnostic protocol. Must be called periodically. 50ms Is a good minimum interval for this object.
Definition at line 352 of file nmea2000_message_interface.cpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 322 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 129026 (0x1F802) if enabled.
Definition at line 308 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 323 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 129044 (0x1F814) if enabled.
Definition at line 309 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 324 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 129029 (0x1F805) if enabled.
Definition at line 310 of file nmea2000_message_interface.hpp.
|
private |
Tracks if initialize has been called.
Definition at line 336 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 325 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 129027 (0x1F803) if enabled.
Definition at line 311 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 326 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 129025 (0x1F801) if enabled.
Definition at line 312 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 327 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 127251 (0x1F113) if enabled.
Definition at line 313 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the COG & SOG message.
Definition at line 315 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the Datum message.
Definition at line 316 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the GNSS position data message.
Definition at line 317 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the position delta message.
Definition at line 318 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the position rapid update message.
Definition at line 319 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the rate of turn message.
Definition at line 320 of file nmea2000_message_interface.hpp.
|
private |
Stores all received (and not timed out) sources of the vessel heading message.
Definition at line 321 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the COG & SOG message cyclically.
Definition at line 329 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the Datum message cyclically.
Definition at line 330 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the GNSS position data message cyclically.
Definition at line 331 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the position delta high precision rapid update message message cyclically.
Definition at line 332 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the position rapid update message cyclically.
Definition at line 333 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the rate of turn message cyclically.
Definition at line 334 of file nmea2000_message_interface.hpp.
|
private |
Determines if the interface will try to send the vessel heading message cyclically.
Definition at line 335 of file nmea2000_message_interface.hpp.
|
private |
A set of flags used to track what messages need to be transmitted or retried.
Definition at line 307 of file nmea2000_message_interface.hpp.
|
private |
An event dispatcher for notifying when new guidance machine info messages are received.
Definition at line 328 of file nmea2000_message_interface.hpp.
|
private |
Stores a set of data specifically for transmitting the PGN 127250 (0x1F112) if enabled.
Definition at line 314 of file nmea2000_message_interface.hpp.