Class Index | Cross Index | Namespace Index |
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. |
The SerData class has the following attributes:
Attribute | Description |
name | Name of station producing serial data stream. |
time | Time of data acquisition. |
sampleRate | Sample rate (samples/sec). |
data | ASCII-based data. |
The SerData class also contains the following data:
Data | Description |
serial | Vect container for serial data |
table | Additional user-defined data |
The data is accessed through the container objects inside SerData. These
are accessed via the refData
and refTable
methods.
This creates a SerData object with the following properties:
- name = "none"
- time = 0 seconds, 0 nanoseconds
- sampleRate = 0.0
- ASCII data = ""
- No other data.
Exceptions:
Exception | Description |
None. |
This performs a deep copy for owned data.
Parameters:
Parameter | Description |
const SerData& serData | The object to copy from |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed |
Parameters:
Parameter | Description |
const std::string& name | Name of station producing serial data stream. |
const Time& time | Time of data acquisition. |
REAL_4& sampleRate | Sampling rate, sample / s. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed |
Exceptions:
Exception | Description |
None. |
Gets ASCII-based data.
Return value:
const std::string&- Data.
Exceptions:
Exception | Description |
None. | |
None. |
Constructs the Structure Header for this class.
Return value:
SH- Structure header.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed |
Constructs the Structure Header for this class.
Return value:
SH- Structure header.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed |
Gets the sample rate, samples / sec.
Return value:
REAL_8- Sampling rate.
Exceptions:
Exception | Description |
None. | |
None. |
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:
Exception | Description |
None. | |
None. |
Determines whether two objects are not equal. All contained data is compared.
Parameters:
Parameter | Description |
const SerData& serData | The object to compare with. |
Return value:
bool- True if the objects are not equal.
Exceptions:
Exception | Description |
None. | |
None. |
This performs a deep copy for owned data.
Parameters:
Parameter | Description |
const SerData& serData | The object to be added. |
Return value:
const SerData&- This object.
This performs a deep copy for owned data.
Parameters:
Parameter | Description |
const SerData& serData | The object to assign from. |
Return value:
const SerData&- This object.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
Determines whether two SerData objects are equal. For this comparison, all of the data is compared.
Parameters:
Parameter | Description |
const SerData& serData | The object to compare with. |
Return value:
bool- true if the objects are equal.
Exceptions:
Exception | Description |
None. |
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:
Parameter | Description |
FrameReaderBase& in | Input data stream object. |
Return value:
SerData*- Newly created.
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure occured. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
read_failure | Read failure occured. |
Get the container which contains the data.
Return value:
SearchContainer< Vect, &Vect::getName >&- Data.
Exceptions:
Exception | Description |
None. | |
None. |
Get the container which contains the data.
Return value:
const SearchContainer< Vect, &Vect::getName >&- Data.
Exceptions:
Exception | Description |
None. | |
None. |
Gets the container holding additional user-defined table data.
Return value:
SearchContainer< Vect, &Vect::getName >&- Table.
Exceptions:
Exception | Description |
None. | |
None. |
Gets the container holding additional user-defined table data.
Return value:
const SearchContainer< Table, &Table::getName >&- Table.
Exceptions:
Exception | Description |
None. | |
None. |
Set the ASCII-based data.
Parameters:
Parameter | Description |
const std::string& data | Data to be set. |
Exceptions:
Exception | Description |
std::bad_alloc | Memory allocation failed. |
std::bad_alloc | Memory allocation failed. |
Parameters:
Parameter | Description |
Output& out out | Output data stream object. |
Exceptions:
Exception | Description |
write_failure | Write failure occured. |