Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
icl_hardware::can::HardwareCanSinkCanfile Class Reference

#include <HardwareCanSinkCanfile.h>

List of all members.

Public Types

typedef boost::shared_ptr
< const HardwareCanSinkCanfile
ConstPtr
 Const shared pointer shorthand.
typedef boost::shared_ptr
< HardwareCanSinkCanfile
Ptr
 Shared pointer shorthand.

Public Member Functions

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

Static Public Member Functions

static icl_sourcesink::URISchemeMap supportedURISchemes ()

Protected Member Functions

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

Private Attributes

boost::posix_time::time_duration m_commit_timediff
std::ofstream m_data_file
 CAN data file stream.
boost::posix_time::ptime m_last_commit_time
 Time at which the last message was committed to disk.
boost::posix_time::ptime m_last_msg_time
 Timestamp of the last processed message.
std::vector
< CanMessageStamped::ConstPtr
m_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.
static const short cMINOR_FILEVERSION = 2
 Minor version number of the file format.

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.

Destructor.

Definition at line 55 of file HardwareCanSinkCanfile.cpp.


Member Function Documentation

Opens the output file and writes the file header.

Definition at line 58 of file HardwareCanSinkCanfile.cpp.

See also:
DataSink<T>::set()

Definition at line 96 of file HardwareCanSinkCanfile.cpp.

static icl_sourcesink::URISchemeMap icl_hardware::can::HardwareCanSinkCanfile::supportedURISchemes ( ) [inline, static]

Definition at line 58 of file HardwareCanSinkCanfile.h.


Member Data Documentation

Major version number of the file format.

Definition at line 113 of file HardwareCanSinkCanfile.h.

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.

CAN data file stream.

Definition at line 92 of file HardwareCanSinkCanfile.h.

Time at which the last message was committed to disk.

Definition at line 110 of file HardwareCanSinkCanfile.h.

Timestamp of the last processed message.

Definition at line 108 of file HardwareCanSinkCanfile.h.

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.

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 Tue Aug 8 2017 03:07:52