My Project
|
#include <DataFrameManager.h>
Public Member Functions | |
DataFrameManager () | |
DataFrameManager (unsigned nBuffer) | |
DataFrameManager (DataFrameManager &fm) | |
DataFrameManager (DataFrame *frame) | |
virtual | ~DataFrameManager () |
void | resize (unsigned int nBuffer) |
void | pack (unsigned int *data, unsigned int ndata, int startIndex=-1) |
void | pack (unsigned long *data, unsigned int ndata, int startIndex=-1) |
void | pack (float *data, unsigned int ndata, int startIndex=-1) |
void | pack (DataFrame *frame, int startIndex) |
void | fillBuffer (unsigned char val, unsigned int ndata) |
void | fillBuffer (unsigned char val) |
void | setErrorStatus (bool wasError) |
DataFrame * | frame () |
void | unpack (unsigned char *data, unsigned int ndata) |
void | unpack (unsigned char *data) |
void | advance (unsigned ndata) |
virtual void | reinitialize () |
void | lock () |
void | unlock () |
virtual unsigned int | getId () |
unsigned | byteOffsetInFrameOfData () |
unsigned | sizeInBytes () |
unsigned | sizeInBytesOfData () |
virtual void | operator= (DataFrameManager &fm) |
Protected Attributes | |
gcp::util::DataFrame * | frame_ |
bool | dataIsInitialized_ |
unsigned | currentIndex_ |
unsigned | nBuffer_ |
unsigned | nUsed_ |
This is a base class for managing a generic dataframe of registers.
DataFrameManager::DataFrameManager | ( | ) |
Constructors
....................................................................... Constructor with no resizing of the initially zero-length DataFrame buffer. This constructor doesn't intialize the antenna number associated with this manager object.
DataFrameManager::DataFrameManager | ( | unsigned | nBuffer | ) |
....................................................................... Constructor with resizing of the initially zero-length DataFrame buffer
DataFrameManager::DataFrameManager | ( | DataFrameManager & | fm | ) |
....................................................................... Copy constructor
DataFrameManager::DataFrameManager | ( | DataFrame * | frame | ) |
....................................................................... Constructor with initialization from a DataFrame object.
|
virtual |
Destructor
....................................................................... Destructor
void DataFrameManager::advance | ( | unsigned | ndata | ) |
Advance the internal buffer ndata elements.
....................................................................... Advance the internal index counter
Exception |
unsigned DataFrameManager::byteOffsetInFrameOfData | ( | ) |
The data portion of the buffer will be offset by the size in bytes of the header.
....................................................................... The data portion of the buffer will be offset by the size in bytes of the header.
void gcp::util::DataFrameManager::fillBuffer | ( | unsigned char | val, |
unsigned int | ndata | ||
) |
Fill the next ndata registers with a constant value.
void DataFrameManager::fillBuffer | ( | unsigned char | val | ) |
Fill all data registers with a constant value.
....................................................................... Fill the all registers with a constant value
Exception |
DataFrame * DataFrameManager::frame | ( | ) |
|
inlinevirtual |
Get a unique frame id based on integral MJD half-seconds. Force inheritors to define this.
void DataFrameManager::lock | ( | ) |
Lock the frame
....................................................................... Lock the frame.
|
virtual |
Define an overloadable assignment operator
....................................................................... Overloadable base class assigment operator
Reimplemented in gcp::util::ArrayMapDataFrameManager, and gcp::util::RegMapDataFrameManager.
void gcp::util::DataFrameManager::pack | ( | unsigned int * | data, |
unsigned int | ndata, | ||
int | startIndex = -1 |
||
) |
Pack an array of unsigned ints
void gcp::util::DataFrameManager::pack | ( | unsigned long * | data, |
unsigned int | ndata, | ||
int | startIndex = -1 |
||
) |
Pack an array of unsigned longs
void gcp::util::DataFrameManager::pack | ( | float * | data, |
unsigned int | ndata, | ||
int | startIndex = -1 |
||
) |
Pack an array of floats
void DataFrameManager::pack | ( | DataFrame * | frame, |
int | startIndex | ||
) |
Pack a dataframe into the requested starting location
....................................................................... Pack an entire data frame
Exception |
|
virtual |
Reinitialize. Make this virtual so that inheritors can define what it means to reinitialize.
....................................................................... Reset the bookkeeping parameters of a DataFrameManager object
Reimplemented in gcp::receiver::XMLDataFrameManager.
void DataFrameManager::resize | ( | unsigned int | nBuffer | ) |
Resize the data frame
....................................................................... Extend the length of the DataFrame buffer
void DataFrameManager::setErrorStatus | ( | bool | wasError | ) |
Set a global error status for this frame.
....................................................................... Set the error-flag status member
unsigned DataFrameManager::sizeInBytes | ( | ) |
Return the size in bytes of the frame managed by this object
....................................................................... The size in bytes is just the size of the frame
unsigned DataFrameManager::sizeInBytesOfData | ( | ) |
Return the size in bytes of the data portion only, of the frame managed by this object
....................................................................... The size of the data is the size in bytes, less the offset from the head of the frame of the data.
void DataFrameManager::unlock | ( | ) |
Unlock the frame
....................................................................... Unlock the frame.
void gcp::util::DataFrameManager::unpack | ( | unsigned char * | data, |
unsigned int | ndata | ||
) |
Unpack the next ndata elements of the frame into a passed byte array (incremental unpack)
Exception |
void DataFrameManager::unpack | ( | unsigned char * | data | ) |