ERC CISST - cisst software

mtsCollectorBase Class Reference
[Multi Task Support]

#include <mtsCollectorBase.h>

Inheritance diagram for mtsCollectorBase:

Inheritance graph
[legend]
Collaboration diagram for mtsCollectorBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class provides a way to collect data from state table in real-time. Collected data can be either saved as a log file or displayed in GUI like an oscilloscope.

Definition at line 51 of file mtsCollectorBase.h.

Public Types

Public Member Functions

Public Attributes

Protected Types

Protected Member Functions

Protected Attributes

Static Protected Attributes

Friends

Classes


Member Typedef Documentation

typedef cmnNamedMap<SignalMapElement> mtsCollectorBase::SignalMapType [protected]

Container definition for tasks and signals. TaskMap: (taskName, SignalMap*) SignalMap: (SignalName, SignalMapElement)

Definition at line 91 of file mtsCollectorBase.h.


Member Enumeration Documentation

enum mtsCollectorBase::CollectorStatus [protected]

State definition of the collector

Definition at line 68 of file mtsCollectorBase.h.


Member Function Documentation

void mtsCollectorBase::SetDelimiter ( void   )  [protected]

Update the delimiter used in output files based on file format. Should be used everytime FileFormat is set.

void mtsCollectorBase::StartCollectionCommand ( void   )  [inline, protected]

Methods used to populate the component provided interface.

Definition at line 151 of file mtsCollectorBase.h.

void mtsCollectorBase::Init ( void   )  [protected]

Initialize this collector instance

void mtsCollectorBase::Cleanup ( void   )  [protected, virtual]

Clean up internal data.

Reimplemented from mtsTask.

void mtsCollectorBase::ClearTaskMap ( void   )  [protected]

Clear TaskMap

virtual void mtsCollectorBase::Startup ( void   )  [protected, pure virtual]

Set some initial values

Reimplemented from mtsTask.

void mtsCollectorBase::SetupControlInterface ( void   )  [protected]

Create the provided interface for control.

virtual std::string mtsCollectorBase::GetDefaultOutputName ( void   )  [pure virtual]

Generate default file name, without the prefix (txt, csv, cdat)

void mtsCollectorBase::SetOutput ( const std::string &  fileName,
const CollectorFileFormat  fileFormat 
)

Define the output file and format. If a file is already in use, this method will close the current one.

void mtsCollectorBase::SetOutput ( std::ostream &  outputStream,
const CollectorFileFormat  fileFormat 
)

Define the output using an existing ostream, the collector will not open nor close the stream.

void mtsCollectorBase::SetOutput ( std::ostream &  outputStream  ) 

Define the output using an existing ostream, the collector will not open nor close the stream. If this method is called for the first time, the format will be COLLECTOR_FILE_FORMAT_CSV, otherwise it will use the previously used format.

void mtsCollectorBase::SetOutputToDefault ( const CollectorFileFormat  fileFormat  ) 

Creates a default file name using the task name, table name and date. The suffix depends on the file format.

void mtsCollectorBase::SetOutputToDefault ( void   ) 

Creates a default file name using the task name, table name and date. If this method is called for the first time, the format will be COLLECTOR_FILE_FORMAT_CSV, otherwise it will use the previously used format.

void mtsCollectorBase::OpenFileIfNeeded ( void   ) 

Files are not created or opened when SetOutput is called, this method will open the file if needed.

virtual void mtsCollectorBase::StartCollection ( const mtsDouble delayInSeconds  )  [pure virtual]

Begin collecting data. Data collection will begin after delayedStart second(s). If it is zero (by default), it means 'start now'.

virtual void mtsCollectorBase::StopCollection ( const mtsDouble delayInSeconds  )  [pure virtual]

End collecting data. Data collection will end after delayedStop second(s). If it is zero (by default), it means 'stop now'.

void mtsCollectorBase::SetWorkingDirectory ( const mtsStdString directory  ) 

Set working directory, usable with commands as well

void mtsCollectorBase::GetWorkingDirectory ( mtsStdString placeHolder  )  const

Get working directory, usable with commands as well


Member Data Documentation

mtsTaskManager* mtsCollectorBase::TaskManager [static, protected]

Static member variables

Definition at line 96 of file mtsCollectorBase.h.

bool mtsCollectorBase::ConnectedFlag [protected]

Flag to determine if the collector is connected. Once the collector is connected, it becomes impossible to change the observed state table, components, ...

Definition at line 101 of file mtsCollectorBase.h.

bool mtsCollectorBase::FirstRunningFlag [protected]

Flag for PrintHeader() method.

Definition at line 104 of file mtsCollectorBase.h.

unsigned int mtsCollectorBase::SampleCounter [protected]

Counter for number of samples since the output has been set.

Definition at line 107 of file mtsCollectorBase.h.

unsigned int mtsCollectorBase::SampleCounterForEvent [protected]

Counter for number of sample since the last CollectionStopped event

Definition at line 110 of file mtsCollectorBase.h.

double mtsCollectorBase::TimeIntervalForProgressEvent [protected]

Interval between two progress events (in seconds)

Definition at line 113 of file mtsCollectorBase.h.

double mtsCollectorBase::TimeOfLastProgressEvent [protected]

Time of last progress event

Definition at line 116 of file mtsCollectorBase.h.

std::string mtsCollectorBase::OutputFileName [protected]

Output file name, including working directory.

Definition at line 119 of file mtsCollectorBase.h.

mtsStdString mtsCollectorBase::WorkingDirectoryMember [protected]

Current directory to save data

Definition at line 122 of file mtsCollectorBase.h.

std::ostream* mtsCollectorBase::OutputStream [protected]

Pointer on output stream, can be create and managed by this class or provided by a user.

Definition at line 126 of file mtsCollectorBase.h.

bool mtsCollectorBase::FileOpened [protected]

Check if the output file is already opened

Definition at line 130 of file mtsCollectorBase.h.

char mtsCollectorBase::Delimiter [protected]

Delimiter used in a log file. Set by the constructor according to mtsCollectorBase::CollectorLogFormat.

Definition at line 134 of file mtsCollectorBase.h.

std::stringstream mtsCollectorBase::StringStreamBufferForSerialization [protected]

String stream buffer for serialization.

Definition at line 137 of file mtsCollectorBase.h.

cmnSerializer* mtsCollectorBase::Serializer [protected]

Serializer for binary logging. DeSerializer is used only at ConvertBinaryToText() method so we don't define it here.

Definition at line 141 of file mtsCollectorBase.h.

mtsInterfaceProvided* mtsCollectorBase::ControlInterface [protected]

Default control interface and methods used for the provided commands.

Definition at line 148 of file mtsCollectorBase.h.

mtsFunctionVoid mtsCollectorBase::CollectionStartedEventTrigger

Function used to trigger Collection Started event.

Definition at line 226 of file mtsCollectorBase.h.

mtsFunctionWrite mtsCollectorBase::CollectionStoppedEventTrigger

Function used to trigger Collection Started event.

Definition at line 229 of file mtsCollectorBase.h.

mtsFunctionWrite mtsCollectorBase::ProgressEventTrigger

Function used to trigger Progress event.

Definition at line 232 of file mtsCollectorBase.h.


The documentation for this class was generated from the following file:
erc-cisst-devel<at>lists.johnshopkins.edu