AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
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< ControlFunction > | controlFunction |
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. | |
This class is used to store information about a tracked heartbeat.
Definition at line 114 of file isobus_heartbeat.hpp.
|
explicit |
Constructor for a Heartbeat.
[in] | sendingControlFunction | The control function that is sending the heartbeat |
Definition at line 131 of file isobus_heartbeat.cpp.
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.
[in] | parent | The parent interface |
Definition at line 137 of file isobus_heartbeat.cpp.
std::shared_ptr<ControlFunction> isobus::HeartbeatInterface::Heartbeat::controlFunction |
The CF that is sending the message.
Definition at line 127 of file isobus_heartbeat.hpp.
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.
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.
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.