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

This class is used to store information about a tracked heartbeat. More...

Public Member Functions

 Heartbeat (std::shared_ptr< ControlFunction > sendingControlFunction)
 Constructor for a Heartbeat.
 
bool send (const HeartbeatInterface &parent)
 Transmits a heartbeat message (for internal control functions only). Updates the sequence counter and timestamp if needed.
 

Public Attributes

std::shared_ptr< ControlFunctioncontrolFunction
 The CF that is sending the message.
 
std::uint32_t timestamp_ms
 The last time the message was sent by the associated control function.
 
std::uint32_t repetitionRate_ms = SEQUENCE_REPETITION_RATE_MS
 For internal control functions, this controls how often the heartbeat is sent. This should really stay at the standard 100ms defined in ISO11783-7.
 
std::uint8_t sequenceCounter = static_cast<std::uint8_t>(SequenceCounterSpecialValue::Initial)
 The sequence counter used to validate the heartbeat. Counts from 0-250 normally.
 

Detailed Description

This class is used to store information about a tracked heartbeat.

Definition at line 114 of file isobus_heartbeat.hpp.

Constructor & Destructor Documentation

◆ Heartbeat()

isobus::HeartbeatInterface::Heartbeat::Heartbeat ( std::shared_ptr< ControlFunction > sendingControlFunction)
explicit

Constructor for a Heartbeat.

Parameters
[in]sendingControlFunctionThe control function that is sending the heartbeat

Definition at line 131 of file isobus_heartbeat.cpp.

Member Function Documentation

◆ send()

bool isobus::HeartbeatInterface::Heartbeat::send ( const HeartbeatInterface & parent)

Transmits a heartbeat message (for internal control functions only). Updates the sequence counter and timestamp if needed.

Parameters
[in]parentThe parent interface
Returns
True if the message is sent, otherwise false.

Definition at line 137 of file isobus_heartbeat.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ controlFunction

std::shared_ptr<ControlFunction> isobus::HeartbeatInterface::Heartbeat::controlFunction

The CF that is sending the message.

Definition at line 127 of file isobus_heartbeat.hpp.

◆ repetitionRate_ms

std::uint32_t isobus::HeartbeatInterface::Heartbeat::repetitionRate_ms = SEQUENCE_REPETITION_RATE_MS

For internal control functions, this controls how often the heartbeat is sent. This should really stay at the standard 100ms defined in ISO11783-7.

Definition at line 129 of file isobus_heartbeat.hpp.

◆ sequenceCounter

std::uint8_t isobus::HeartbeatInterface::Heartbeat::sequenceCounter = static_cast<std::uint8_t>(SequenceCounterSpecialValue::Initial)

The sequence counter used to validate the heartbeat. Counts from 0-250 normally.

Definition at line 130 of file isobus_heartbeat.hpp.

◆ timestamp_ms

std::uint32_t isobus::HeartbeatInterface::Heartbeat::timestamp_ms

The last time the message was sent by the associated control function.

Definition at line 128 of file isobus_heartbeat.hpp.


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