SignalLogger
A library for signal logging.
signal_logger::LogElementInterface Class Referenceabstract

Basic interface of logger elements. More...

#include <LogElementInterface.hpp>

Inheritance diagram for signal_logger::LogElementInterface:
Inheritance graph

Public Member Functions

 LogElementInterface ()
 Default constructor. More...
 
virtual ~LogElementInterface ()
 Destructor. More...
 
virtual void collectData ()=0
 Reads pointer and pushes the data into the buffer. More...
 
virtual void publishData (const TimeElement &time, unsigned int noCollectDataCalls)=0
 
virtual void saveDataToLogFile (const TimeElement &times, unsigned int noCollectDataCalls, LogFileType type)=0
 
virtual void copy ()=0
 Stores a copy of the element, file is saved from this. More...
 
virtual void reset ()=0
 Reset logger element called before logger start. More...
 
virtual void cleanup ()=0
 Cleanup logger element. More...
 
virtual LogElementOptionsgetOptions ()=0
 
virtual const LogElementOptionsgetOptions () const =0
 
virtual const LogElementOptionsgetCopyOptions () const =0
 
virtual BufferInterfacegetBuffer ()=0
 
virtual const BufferInterfacegetBuffer () const =0
 
virtual bool isEnabled () const =0
 
virtual void setIsEnabled (const bool isEnabled)=0
 
virtual std::mutex & acquireMutex () const =0
 
virtual std::type_index getType () const =0
 

Detailed Description

Basic interface of logger elements.

A list of pointers to this class can be stored in the logger, since the class itself is not templated.A class that defines the basic interface of logger elements.

Constructor & Destructor Documentation

◆ LogElementInterface()

signal_logger::LogElementInterface::LogElementInterface ( )
inline

Default constructor.

◆ ~LogElementInterface()

virtual signal_logger::LogElementInterface::~LogElementInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ acquireMutex()

virtual std::mutex& signal_logger::LogElementInterface::acquireMutex ( ) const
pure virtual
Returns
mutex of the log element

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ cleanup()

virtual void signal_logger::LogElementInterface::cleanup ( )
pure virtual

◆ collectData()

virtual void signal_logger::LogElementInterface::collectData ( )
pure virtual

Reads pointer and pushes the data into the buffer.

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ copy()

virtual void signal_logger::LogElementInterface::copy ( )
pure virtual

Stores a copy of the element, file is saved from this.

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getBuffer() [1/2]

virtual BufferInterface& signal_logger::LogElementInterface::getBuffer ( )
pure virtual
Returns
buffer of the log element

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getBuffer() [2/2]

virtual const BufferInterface& signal_logger::LogElementInterface::getBuffer ( ) const
pure virtual
Returns
buffer of the log element

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getCopyOptions()

virtual const LogElementOptions& signal_logger::LogElementInterface::getCopyOptions ( ) const
pure virtual
Returns
options of the log element copy

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getOptions() [1/2]

virtual LogElementOptions& signal_logger::LogElementInterface::getOptions ( )
pure virtual
Returns
options of the log element

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getOptions() [2/2]

virtual const LogElementOptions& signal_logger::LogElementInterface::getOptions ( ) const
pure virtual
Returns
options of the log element

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ getType()

virtual std::type_index signal_logger::LogElementInterface::getType ( ) const
pure virtual
Returns
type_index

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ isEnabled()

virtual bool signal_logger::LogElementInterface::isEnabled ( ) const
pure virtual
Returns
is log element enabled

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ publishData()

virtual void signal_logger::LogElementInterface::publishData ( const TimeElement time,
unsigned int  noCollectDataCalls 
)
pure virtual

Reads buffer and processes data (probably called from different thread)

Parameters
timetime log element
noCollectDataCallsnumber of collectLoggerData calls, this allows time synchronization for publishing

Implemented in signal_logger_ros::LogElementRos< ValueType_ >, and signal_logger::LogElementBase< ValueType_ >.

◆ reset()

virtual void signal_logger::LogElementInterface::reset ( )
pure virtual

Reset logger element called before logger start.

Implemented in signal_logger::LogElementBase< ValueType_ >.

◆ saveDataToLogFile()

virtual void signal_logger::LogElementInterface::saveDataToLogFile ( const TimeElement times,
unsigned int  noCollectDataCalls,
LogFileType  type 
)
pure virtual

Reads buffer and writes data to a file

Parameters
timetime log element
noCollectDataCallsnumber of collectLoggerData calls, this allows time synchronization of the log file
typetype of the log file

Implemented in signal_logger::LogElementBase< ValueType_ >, signal_logger_ros::LogElementRos< ValueType_ >, and signal_logger_std::LogElementStd< ValueType_ >.

◆ setIsEnabled()

virtual void signal_logger::LogElementInterface::setIsEnabled ( const bool  isEnabled)
pure virtual
Parameters
enabledlog element

Implemented in signal_logger::LogElementBase< ValueType_ >.


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