My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::DataFrameManager Class Reference

#include <DataFrameManager.h>

Inheritance diagram for gcp::util::DataFrameManager:
gcp::util::ArrayMapDataFrameManager gcp::util::RegMapDataFrameManager gcp::util::ArrayDataFrameManager gcp::receiver::BolometerDataFrameManager gcp::receiver::XMLDataFrameManager gcp::util::AntennaDataFrameManager gcp::util::ArrayRegMapDataFrameManager gcp::util::BoardDataFrameManager gcp::antenna::control::SpecificShare gcp::receiver::SquidDataFrameManager gcp::receiver::XMLBoardDataFrameManager gcp::receiver::FpgaBoardManager gcp::receiver::SquidBoardManager

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)
 
DataFrameframe ()
 
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::DataFrameframe_
 
bool dataIsInitialized_
 
unsigned currentIndex_
 
unsigned nBuffer_
 
unsigned nUsed_
 

Detailed Description

This is a base class for managing a generic dataframe of registers.

Constructor & Destructor Documentation

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.

DataFrameManager::~DataFrameManager ( )
virtual

Destructor

....................................................................... Destructor

Member Function Documentation

void DataFrameManager::advance ( unsigned  ndata)

Advance the internal buffer ndata elements.

....................................................................... Advance the internal index counter

Exceptions
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

Exceptions
Exception
DataFrame * DataFrameManager::frame ( )

Return a handle to the raw data frame managed by this object

....................................................................... Return a handle to the raw data frame managed by this object. Warning: you must call lock() and unlock() explicitly if you use this!

virtual unsigned int gcp::util::DataFrameManager::getId ( )
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.

void DataFrameManager::operator= ( DataFrameManager fm)
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

Exceptions
Exception
void DataFrameManager::reinitialize ( )
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)

Exceptions
Exception
void DataFrameManager::unpack ( unsigned char *  data)

Unpack the whole frame.

Exceptions
Exception....................................................................... Unpack all the Frame data into an array of unsigned ints. Doesn't modify the currentIndex_ counter.
Exception

The documentation for this class was generated from the following files: