Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
icl_hardware::can::HardwareCanSinkCanfile Class Reference

#include <HardwareCanSinkCanfile.h>

Inheritance diagram for icl_hardware::can::HardwareCanSinkCanfile:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< const HardwareCanSinkCanfileConstPtr
 Const shared pointer shorthand. More...
 
typedef boost::shared_ptr< HardwareCanSinkCanfilePtr
 Shared pointer shorthand. More...
 

Public Member Functions

 HardwareCanSinkCanfile (const std::string &uri="HardwareCanSinkCanfile", const std::string &name="UnnamedHardwareCanSinkCanfile")
 Constructor. More...
 
virtual void set (const CanMessageStamped::Ptr &msg)
 
virtual ~HardwareCanSinkCanfile ()
 Destructor. More...
 

Static Public Member Functions

static icl_sourcesink::URISchemeMap supportedURISchemes ()
 

Protected Member Functions

bool prepareFile ()
 Opens the output file and writes the file header. More...
 

Private Attributes

boost::posix_time::time_duration m_commit_timediff
 
std::ofstream m_data_file
 CAN data file stream. More...
 
boost::posix_time::ptime m_last_commit_time
 Time at which the last message was committed to disk. More...
 
boost::posix_time::ptime m_last_msg_time
 Timestamp of the last processed message. More...
 
std::vector< CanMessageStamped::ConstPtrm_msg_container
 
std::size_t m_msg_container_size
 

Static Private Attributes

static const short cMAJOR_FILEVERSION = 1
 Major version number of the file format. More...
 
static const short cMINOR_FILEVERSION = 2
 Minor version number of the file format. More...
 

Detailed Description

This Sink writes CAN data in the FZI CAN file format (version 1), formatted as follows: timestamp msg_id dlc data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] An example line is given below: 1302866616.057185 55 8 0 0 0 0 1b f5 21 7a

Definition at line 50 of file HardwareCanSinkCanfile.h.

Member Typedef Documentation

Const shared pointer shorthand.

Definition at line 56 of file HardwareCanSinkCanfile.h.

Shared pointer shorthand.

Definition at line 54 of file HardwareCanSinkCanfile.h.

Constructor & Destructor Documentation

icl_hardware::can::HardwareCanSinkCanfile::HardwareCanSinkCanfile ( const std::string &  uri = "HardwareCanSinkCanfile",
const std::string &  name = "UnnamedHardwareCanSinkCanfile" 
)

Constructor.

Definition at line 37 of file HardwareCanSinkCanfile.cpp.

icl_hardware::can::HardwareCanSinkCanfile::~HardwareCanSinkCanfile ( )
virtual

Destructor.

Definition at line 55 of file HardwareCanSinkCanfile.cpp.

Member Function Documentation

bool icl_hardware::can::HardwareCanSinkCanfile::prepareFile ( )
protected

Opens the output file and writes the file header.

Definition at line 58 of file HardwareCanSinkCanfile.cpp.

void icl_hardware::can::HardwareCanSinkCanfile::set ( const CanMessageStamped::Ptr msg)
virtual
See also
DataSink<T>::set()

Definition at line 96 of file HardwareCanSinkCanfile.cpp.

static icl_sourcesink::URISchemeMap icl_hardware::can::HardwareCanSinkCanfile::supportedURISchemes ( )
inlinestatic

Definition at line 58 of file HardwareCanSinkCanfile.h.

Member Data Documentation

const short icl_hardware::can::HardwareCanSinkCanfile::cMAJOR_FILEVERSION = 1
staticprivate

Major version number of the file format.

Definition at line 113 of file HardwareCanSinkCanfile.h.

const short icl_hardware::can::HardwareCanSinkCanfile::cMINOR_FILEVERSION = 2
staticprivate

Minor version number of the file format.

Definition at line 115 of file HardwareCanSinkCanfile.h.

boost::posix_time::time_duration icl_hardware::can::HardwareCanSinkCanfile::m_commit_timediff
private

Maximum time difference between two commits. When this is reached, data is written out to disk.

Definition at line 105 of file HardwareCanSinkCanfile.h.

std::ofstream icl_hardware::can::HardwareCanSinkCanfile::m_data_file
private

CAN data file stream.

Definition at line 92 of file HardwareCanSinkCanfile.h.

boost::posix_time::ptime icl_hardware::can::HardwareCanSinkCanfile::m_last_commit_time
private

Time at which the last message was committed to disk.

Definition at line 110 of file HardwareCanSinkCanfile.h.

boost::posix_time::ptime icl_hardware::can::HardwareCanSinkCanfile::m_last_msg_time
private

Timestamp of the last processed message.

Definition at line 108 of file HardwareCanSinkCanfile.h.

std::vector<CanMessageStamped::ConstPtr> icl_hardware::can::HardwareCanSinkCanfile::m_msg_container
private

Message container which buffers data before writing it to disk, in order to reduce unnecessary disk accesses.

Definition at line 97 of file HardwareCanSinkCanfile.h.

std::size_t icl_hardware::can::HardwareCanSinkCanfile::m_msg_container_size
private

Maximum size of the message container. When this is reached, data is written out to disk.

Definition at line 101 of file HardwareCanSinkCanfile.h.


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


fzi_icl_can
Author(s):
autogenerated on Mon Jun 10 2019 13:17:02