Class Index Cross Index Namespace Index

Class FrameCPP::Version_3_4_5::SerData

Serial Data
Contained in: FrameCPP::Version_3_4_5
Derived from: FrameCPP::Version_3_4_5::Base
Derived by: none

#include "../../../../../lib/framecpp/src/Version3_4_5/serdata.hh"


public function member index:

SerData(); Default Constructor.
SerData(const SerData& serData); Copy Constructor.
SerData(const std::string& name, const Time& time, REAL_4 sampleRate); Constructor.
virtual INT_2U getClassId() const;
inline const std::string& getData() const; Get ASCII data
const std::string& getName() const;
static SH getSH(); Get Structure Header
static SH getSH3(); Get frame data format version 3 Structure Header
inline REAL_8 getSampleRate() const; Get Sample Rate
inline const Time& getTime() const; Get Acquisition Time
inline bool operator !=(const SerData& serData) const; Not-equal comparison.
const SerData& operator +=(const SerData& serData); += Operator.
const SerData& operator =(const SerData& serData); Assignment Operator.
bool operator ==(const SerData& serData) const; Equal comparison.
inline SerialContainer& refData(); Get Data Container
inline const SerialContainer& refData() const; Get const Data Container
inline TableContainer& refTable(); Get Table Container
inline const TableContainer& refTable() const; Get const Table Container
inline void setData(const std::string& data); Set ASCII Data
 

private function member index:

static SerData* read(FrameReaderBase& in); Reads a SerData object from an FrameReaderBase object.
static SerData* read3(FrameReaderBase& in); Version 3 frame input function.
virtual void write(Output& out) const; Writes a SerData object to an Output object.
 

Description:

This class represents serial data. It is modeled after the FrSerData structure in the Frame Specification, LIGO-T970130-B-E.

The SerData class has the following attributes:
AttributeDescription
nameName of station producing serial data stream.
timeTime of data acquisition.
sampleRateSample rate (samples/sec).
dataASCII-based data.

The SerData class also contains the following data:
DataDescription
serialVect container for serial data
tableAdditional user-defined data

The data is accessed through the container objects inside SerData. These are accessed via the refData and refTable methods.


Function Member Descriptions:


FrameCPP::Version_3_4_5::SerData::SerData - Default Constructor.


SerData();
This creates a SerData object with the following properties:

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::SerData::SerData - Copy Constructor.


SerData(const SerData& serData);
This performs a deep copy for owned data.

Parameters:
ParameterDescription
const SerData& serDataThe object to copy from

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::SerData::SerData - Constructor.


SerData(const std::string& name, const Time& time, REAL_4 sampleRate);

Parameters:
ParameterDescription
const std::string& nameName of station producing serial data stream.
const Time& timeTime of data acquisition.
REAL_4& sampleRateSampling rate, sample / s.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::SerData::getClassId


virtual INT_2U getClassId() const;

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::SerData::getData - Get ASCII data


inline const std::string& getData() const;
Gets ASCII-based data.

Return value:
const std::string&- Data.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::getName


const std::string& getName() const;



FrameCPP::Version_3_4_5::SerData::getSH - Get Structure Header


static SH getSH();
Constructs the Structure Header for this class.

Return value:
SH- Structure header.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::SerData::getSH3 - Get frame data format version 3 Structure Header


static SH getSH3();
Constructs the Structure Header for this class.

Return value:
SH- Structure header.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed



FrameCPP::Version_3_4_5::SerData::getSampleRate - Get Sample Rate


inline REAL_8 getSampleRate() const;
Gets the sample rate, samples / sec.

Return value:
REAL_8- Sampling rate.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::getTime - Get Acquisition Time


inline const Time& getTime() const;
Gets the time of data acquisition.

This is the GPS time in integer seconds and integer nanoseconds sonce the GPS standard epoch. This is valid for apporximately 143 years from time origin.


Return value:
const Time&- Time.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::operator != - Not-equal comparison.


inline bool operator !=(const SerData& serData) const;
Determines whether two objects are not equal. All contained data is compared.

Parameters:
ParameterDescription
const SerData& serDataThe object to compare with.

Return value:
bool- True if the objects are not equal.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::operator += - += Operator.


const SerData& operator +=(const SerData& serData);
This performs a deep copy for owned data.

Parameters:
ParameterDescription
const SerData& serDataThe object to be added.

Return value:
const SerData&- This object.


FrameCPP::Version_3_4_5::SerData::operator = - Assignment Operator.


const SerData& operator =(const SerData& serData);
This performs a deep copy for owned data.

Parameters:
ParameterDescription
const SerData& serDataThe object to assign from.

Return value:
const SerData&- This object.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::SerData::operator == - Equal comparison.


bool operator ==(const SerData& serData) const;
Determines whether two SerData objects are equal. For this comparison, all of the data is compared.

Parameters:
ParameterDescription
const SerData& serDataThe object to compare with.

Return value:
bool- true if the objects are equal.

Exceptions:
ExceptionDescription
None.



FrameCPP::Version_3_4_5::SerData::read - Reads a SerData object from an FrameReaderBase object.


static SerData* read(FrameReaderBase& in);
This method creates a dynamically allocated object.

*NOTE* This method allocates memory and returns a pointer to it. The user is responsible for freeing this memory.


Parameters:
ParameterDescription
FrameReaderBase& inInput data stream object.

Return value:
SerData*- Newly created.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
read_failureRead failure occured.



FrameCPP::Version_3_4_5::SerData::read3 - Version 3 frame input function.


static SerData* read3(FrameReaderBase& in);

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
read_failureRead failure occured.



FrameCPP::Version_3_4_5::SerData::refData - Get Data Container


inline SerialContainer& refData();
Get the container which contains the data.

Return value:
SearchContainer< Vect, &Vect::getName >&- Data.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::refData - Get const Data Container


inline const SerialContainer& refData() const;
Get the container which contains the data.

Return value:
const SearchContainer< Vect, &Vect::getName >&- Data.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::refTable - Get Table Container


inline TableContainer& refTable();
Gets the container holding additional user-defined table data.

Return value:
SearchContainer< Vect, &Vect::getName >&- Table.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::refTable - Get const Table Container


inline const TableContainer& refTable() const;
Gets the container holding additional user-defined table data.

Return value:
const SearchContainer< Table, &Table::getName >&- Table.

Exceptions:
ExceptionDescription
None.
None.



FrameCPP::Version_3_4_5::SerData::setData - Set ASCII Data


inline void setData(const std::string& data);
Set the ASCII-based data.

Parameters:
ParameterDescription
const std::string& dataData to be set.

Exceptions:
ExceptionDescription
std::bad_allocMemory allocation failed.
std::bad_allocMemory allocation failed.



FrameCPP::Version_3_4_5::SerData::write - Writes a SerData object to an Output object.


virtual void write(Output& out) const;

Parameters:
ParameterDescription
Output& out outOutput data stream object.

Exceptions:
ExceptionDescription
write_failureWrite failure occured.



Variable Member Descriptions:


FrameCPP::Version_3_4_5::SerData::mData - ASCII-based data.

std::string mData;

FrameCPP::Version_3_4_5::SerData::mName - Name of station producing serial data stream.

std::string mName;

FrameCPP::Version_3_4_5::SerData::mSampleRate - Sampling rate, samples / s.

REAL_4 mSampleRate;

FrameCPP::Version_3_4_5::SerData::mSerial - Serial data vector.

SerialContainer mSerial;

FrameCPP::Version_3_4_5::SerData::mTable - User-defined information.

TableContainer mTable;

FrameCPP::Version_3_4_5::SerData::mTime - Time of data acquisition.

Time mTime;