ControlThreadOutputBuffer Struct Reference

#include <RobotAPI/components/units/RobotUnit/util/ControlThreadOutputBuffer.h>

Public Types

using ConsumerFunctor = std::function< void(const Entry &, std::size_t, std::size_t)>
 
using Entry = detail::ControlThreadOutputBufferEntry
 
using RtMessageLogEntryBase = detail::RtMessageLogEntryBase
 

Public Member Functions

template<class LoggingEntryT , class... Ts>
RtMessageLogEntryBaseaddMessageToLog (Ts &&... args)
 
void commitWrite ()
 
void forEachNewLoggingEntry (ConsumerFunctor consumer)
 
void forLatestLoggingEntry (ConsumerFunctor consumer, size_t numberOfEntriesToLog)
 
std::size_t getNumberOfBytes () const
 
const EntrygetReadBuffer () const
 
EntrygetWriteBuffer ()
 
std::size_t initialize (std::size_t numEntries, const KeyValueVector< std::string, ControlDevicePtr > &controlDevices, const KeyValueVector< std::string, SensorDevicePtr > &sensorDevices, std::size_t messageBufferSize, std::size_t messageBufferNumberEntries, std::size_t messageBufferMaxSize, std::size_t messageBufferMaxNumberEntries)
 
void resetLoggingPosition () const
 
bool updateReadBuffer () const
 
 ~ControlThreadOutputBuffer ()
 

Static Public Member Functions

static ControlThreadOutputBufferGetRtLoggingInstance ()
 

Friends

class RobotUnitModule::Logging
 

Detailed Description

Definition at line 216 of file ControlThreadOutputBuffer.h.

Member Typedef Documentation

◆ ConsumerFunctor

using ConsumerFunctor = std::function<void(const Entry&, std::size_t, std::size_t)>

Definition at line 220 of file ControlThreadOutputBuffer.h.

◆ Entry

◆ RtMessageLogEntryBase

Constructor & Destructor Documentation

◆ ~ControlThreadOutputBuffer()

Definition at line 216 of file ControlThreadOutputBuffer.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addMessageToLog()

ControlThreadOutputBuffer::RtMessageLogEntryBase * addMessageToLog ( Ts &&...  args)
inline

Definition at line 449 of file ControlThreadOutputBuffer.h.

+ Here is the call graph for this function:

◆ commitWrite()

void commitWrite ( )

Definition at line 41 of file ControlThreadOutputBuffer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forEachNewLoggingEntry()

void forEachNewLoggingEntry ( ConsumerFunctor  consumer)

Definition at line 82 of file ControlThreadOutputBuffer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forLatestLoggingEntry()

void forLatestLoggingEntry ( ConsumerFunctor  consumer,
size_t  numberOfEntriesToLog 
)

Definition at line 142 of file ControlThreadOutputBuffer.cpp.

+ Here is the call graph for this function:

◆ getNumberOfBytes()

std::size_t getNumberOfBytes ( ) const
inline

Definition at line 442 of file ControlThreadOutputBuffer.h.

◆ getReadBuffer()

const ControlThreadOutputBuffer::Entry & getReadBuffer ( ) const

Definition at line 49 of file ControlThreadOutputBuffer.cpp.

+ Here is the caller graph for this function:

◆ GetRtLoggingInstance()

static ControlThreadOutputBuffer* GetRtLoggingInstance ( )
inlinestatic

Definition at line 232 of file ControlThreadOutputBuffer.h.

◆ getWriteBuffer()

ControlThreadOutputBuffer::Entry & getWriteBuffer ( )

Definition at line 34 of file ControlThreadOutputBuffer.cpp.

+ Here is the caller graph for this function:

◆ initialize()

std::size_t initialize ( std::size_t  numEntries,
const KeyValueVector< std::string, ControlDevicePtr > &  controlDevices,
const KeyValueVector< std::string, SensorDevicePtr > &  sensorDevices,
std::size_t  messageBufferSize,
std::size_t  messageBufferNumberEntries,
std::size_t  messageBufferMaxSize,
std::size_t  messageBufferMaxNumberEntries 
)

Definition at line 186 of file ControlThreadOutputBuffer.cpp.

◆ resetLoggingPosition()

void resetLoggingPosition ( ) const

Definition at line 75 of file ControlThreadOutputBuffer.cpp.

+ Here is the caller graph for this function:

◆ updateReadBuffer()

bool updateReadBuffer ( ) const

Definition at line 61 of file ControlThreadOutputBuffer.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ RobotUnitModule::Logging

friend class RobotUnitModule::Logging
friend

Definition at line 256 of file ControlThreadOutputBuffer.h.


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