CARMA C++
sza::util::DataFrameManager Class Reference

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

#include <carma/szautil/DataFrameManager.h>

Inherited by sza::util::ArrayMapDataFrameManager, and sza::util::RegMapDataFrameManager.

Public Member Functions

void advance (unsigned ndata)
 Advance the internal buffer ndata elements. More...
 
unsigned byteOffsetInFrameOfData ()
 The data portion of the buffer will be offset by the size in bytes of the header. More...
 
 DataFrameManager ()
 Constructors. More...
 
 DataFrameManager (unsigned nBuffer)
 
 DataFrameManager (DataFrameManager &fm)
 
 DataFrameManager (DataFrame *frame)
 
void fillBuffer (unsigned char val, unsigned int ndata)
 Fill the next ndata registers with a constant value. More...
 
void fillBuffer (unsigned char val)
 Fill all data registers with a constant value. More...
 
DataFrameframe ()
 Return a handle to the raw data frame managed by this object. More...
 
virtual unsigned int getId ()
 Get a unique frame id based on integral MJD half-seconds. More...
 
void lock ()
 Lock the frame. More...
 
virtual void operator= (DataFrameManager &fm)
 Define an overloadable assignment operator. More...
 
void pack (unsigned int *data, unsigned int ndata, int startIndex=-1)
 Pack an array of unsigned ints. More...
 
void pack (unsigned long *data, unsigned int ndata, int startIndex=-1)
 Pack an array of unsigned longs. More...
 
void pack (float *data, unsigned int ndata, int startIndex=-1)
 Pack an array of floats. More...
 
void pack (DataFrame *frame, int startIndex)
 Pack a dataframe into the requested starting location. More...
 
virtual void reinitialize ()
 Reinitialize. More...
 
void resize (unsigned int nBuffer)
 Resize the data frame. More...
 
void setErrorStatus (bool wasError)
 Set a global error status for this frame. More...
 
unsigned sizeInBytes ()
 Return the size in bytes of the frame managed by this object. More...
 
unsigned sizeInBytesOfData ()
 Return the size in bytes of the data portion only, of the frame managed by this object. More...
 
void unlock ()
 Unlock the frame. More...
 
void unpack (unsigned char *data, unsigned int ndata)
 Unpack the next ndata elements of the frame into a passed byte array (incremental unpack) More...
 
void unpack (unsigned char *data)
 Unpack the whole frame. More...
 
virtual ~DataFrameManager ()
 Destructor. More...
 

Public Attributes

unsigned currentIndex_
 
bool dataIsInitialized_
 
sza::util::DataFrameframe_
 
unsigned nBuffer_
 
unsigned nUsed_
 

Detailed Description

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

Definition at line 23 of file DataFrameManager.h.

Constructor & Destructor Documentation

sza::util::DataFrameManager::DataFrameManager ( )

Constructors.

virtual sza::util::DataFrameManager::~DataFrameManager ( )
virtual

Destructor.

Member Function Documentation

void sza::util::DataFrameManager::advance ( unsigned  ndata)

Advance the internal buffer ndata elements.

unsigned sza::util::DataFrameManager::byteOffsetInFrameOfData ( )

The data portion of the buffer will be offset by the size in bytes of the header.

void sza::util::DataFrameManager::fillBuffer ( unsigned char  val,
unsigned int  ndata 
)

Fill the next ndata registers with a constant value.

void sza::util::DataFrameManager::fillBuffer ( unsigned char  val)

Fill all data registers with a constant value.

DataFrame* sza::util::DataFrameManager::frame ( )

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

virtual unsigned int sza::util::DataFrameManager::getId ( )
virtual

Get a unique frame id based on integral MJD half-seconds.

Force inheritors to define this.

Definition at line 128 of file DataFrameManager.h.

void sza::util::DataFrameManager::lock ( )

Lock the frame.

virtual void sza::util::DataFrameManager::operator= ( DataFrameManager fm)
virtual

Define an overloadable assignment operator.

void sza::util::DataFrameManager::pack ( unsigned int *  data,
unsigned int  ndata,
int  startIndex = -1 
)

Pack an array of unsigned ints.

void sza::util::DataFrameManager::pack ( unsigned long *  data,
unsigned int  ndata,
int  startIndex = -1 
)

Pack an array of unsigned longs.

void sza::util::DataFrameManager::pack ( float *  data,
unsigned int  ndata,
int  startIndex = -1 
)

Pack an array of floats.

void sza::util::DataFrameManager::pack ( DataFrame frame,
int  startIndex 
)

Pack a dataframe into the requested starting location.

virtual void sza::util::DataFrameManager::reinitialize ( )
virtual

Reinitialize.

Make this virtual so that inheritors can define what it means to reinitialize.

void sza::util::DataFrameManager::resize ( unsigned int  nBuffer)

Resize the data frame.

void sza::util::DataFrameManager::setErrorStatus ( bool  wasError)

Set a global error status for this frame.

unsigned sza::util::DataFrameManager::sizeInBytes ( )

Return the size in bytes of the frame managed by this object.

unsigned sza::util::DataFrameManager::sizeInBytesOfData ( )

Return the size in bytes of the data portion only, of the frame managed by this object.

void sza::util::DataFrameManager::unlock ( )

Unlock the frame.

void sza::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 sza::util::DataFrameManager::unpack ( unsigned char *  data)

Unpack the whole frame.

Exceptions
Exception

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