Public Member Functions | Private Member Functions | Private Attributes | List of all members
psen_scan_v2_standalone::protocol_layer::ScanBuffer Class Reference

Buffers and validates monitoring frames for a scan round. More...

#include <scan_buffer.h>

Public Member Functions

void add (const data_conversion_layer::monitoring_frame::MessageStamped &stamped_msg)
 Adds the message to the current scan round. More...
 
std::vector< data_conversion_layer::monitoring_frame::MessageStampedcurrentRound ()
 
bool isRoundComplete ()
 
void reset ()
 Readies the validator for a new validation round. This function has to be called whenever there is an expected brake in the receiving of MonitoringFrames. More...
 
 ScanBuffer (const uint32_t &num_expected_msgs)
 

Private Member Functions

void startNewRound (const data_conversion_layer::monitoring_frame::MessageStamped &stamped_msg)
 

Private Attributes

std::vector< data_conversion_layer::monitoring_frame::MessageStampedcurrent_round_ {}
 
bool first_scan_round_ = true
 
const uint32_t & num_expected_msgs_
 

Detailed Description

Buffers and validates monitoring frames for a scan round.

Discovers if there are to many monitoring frames in a scan round. Informs when a scan round ended incomplete. Discovers and omits old messages.

Definition at line 79 of file scan_buffer.h.

Constructor & Destructor Documentation

◆ ScanBuffer()

psen_scan_v2_standalone::protocol_layer::ScanBuffer::ScanBuffer ( const uint32_t &  num_expected_msgs)
inline

Definition at line 115 of file scan_buffer.h.

Member Function Documentation

◆ add()

void psen_scan_v2_standalone::protocol_layer::ScanBuffer::add ( const data_conversion_layer::monitoring_frame::MessageStamped stamped_msg)
inline

Adds the message to the current scan round.

Note
: A scan round is considered to be complete whenever the next scan round starts or the expected number of messages arrived.
Parameters
stamped_msgCurrent received MonitoringFrame.
Exceptions
data_conversion_layer::monitoring_frame::AdditionalFieldMissingif scan_counter is not set in stamped_msg.msg_.

Definition at line 134 of file scan_buffer.h.

◆ currentRound()

std::vector< data_conversion_layer::monitoring_frame::MessageStamped > psen_scan_v2_standalone::protocol_layer::ScanBuffer::currentRound ( )
inline

Definition at line 124 of file scan_buffer.h.

◆ isRoundComplete()

bool psen_scan_v2_standalone::protocol_layer::ScanBuffer::isRoundComplete ( )
inline

Definition at line 129 of file scan_buffer.h.

◆ reset()

void psen_scan_v2_standalone::protocol_layer::ScanBuffer::reset ( )
inline

Readies the validator for a new validation round. This function has to be called whenever there is an expected brake in the receiving of MonitoringFrames.

Definition at line 119 of file scan_buffer.h.

◆ startNewRound()

void psen_scan_v2_standalone::protocol_layer::ScanBuffer::startNewRound ( const data_conversion_layer::monitoring_frame::MessageStamped stamped_msg)
inlineprivate

Definition at line 154 of file scan_buffer.h.

Member Data Documentation

◆ current_round_

std::vector<data_conversion_layer::monitoring_frame::MessageStamped> psen_scan_v2_standalone::protocol_layer::ScanBuffer::current_round_ {}
private

Definition at line 110 of file scan_buffer.h.

◆ first_scan_round_

bool psen_scan_v2_standalone::protocol_layer::ScanBuffer::first_scan_round_ = true
private

Definition at line 112 of file scan_buffer.h.

◆ num_expected_msgs_

const uint32_t& psen_scan_v2_standalone::protocol_layer::ScanBuffer::num_expected_msgs_
private

Definition at line 111 of file scan_buffer.h.


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


psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Nov 25 2023 03:46:26