class Fifo_entry

Class Fifo_entry: Fifo_entries are the objects that the DD fifos contain and they represent the data in the data buffer.

Public Methods

[more] constructors
[more]Fifo_entry& deepCopy( const Fifo_entry &fev )
Deep copy member function.
[more]inline BOOL is_valid() const
Returns true if there is a valid data in the Fifo_entry.
[more]inline BOOL is_volatile() const
Returns true if the data buffer is volatile
[more]inline BOOL is_broadcast() const
Returns true if the Fifo_entry is a broadcast event
[more]void print( ostream &os = cout ) const
Prints the content of the Fifo_entry to the output stream os
[more] accessor member functions
[more] Member functions that set the internal data members.


Documentation

Class Fifo_entry: Fifo_entries are the objects that the DD fifos contain and they represent the data in the data buffer.

The DD works by passing Fifo_entries between independent processes. These Fifo_entries contain all the necessary information about the actual event, which is encapsulated in the class DataBuffer Db.

There are two types of Fifo_entries, which differ by the values of certain private data members: Fifo_entries that represent data buffers from the default DD event pool and Fifo_entries that represent volatile buffers (i.e. buffers that are allocated on the fly).

A Fifo_entry is fully characterized by the following values (see documentation of the private data members for details):

Modifications:

o constructors

o Fifo_entry(int shmid, int dboff, int* p2da, int len, Fifo_entry::fifo_ctl ctl)
Constructor in which all arguments are specified.
Parameters:
shmid - identifier of the shared memory, -1 if the Fifo_entry is part of the DB pool, >0 if it is a volatile buffer
dboff - offset in the DB pool, -1 if volatile buffer
p2da - Pointer to the data
len - Length of the data buffer
ctl - structure fifo_ctl that gives the snapshot of the event

o Fifo_entry(int shmid, int dboff, int* p2da, int len)
Constructor in which all arguments are specified but not the control words

o Fifo_entry()
Default constructor which creates an unused Fifo_entry

o ~Fifo_entry()
Destructor

oFifo_entry& deepCopy( const Fifo_entry &fev )
Deep copy member function. For the (default) Fifo_entry( Fifo_entry& ) we use the default memberwise copy and for deepCopy we actually copy the Db data from one fev into another one.

oinline BOOL is_valid() const
Returns true if there is a valid data in the Fifo_entry. If the Fifo_entry is created using the contructor Fifo_entry(), then we create an empty Fifo_entry, containing no valid data. In this case is_valid returns false until the Fifo_entry is filled.

oinline BOOL is_volatile() const
Returns true if the data buffer is volatile

oinline BOOL is_broadcast() const
Returns true if the Fifo_entry is a broadcast event

ovoid print( ostream &os = cout ) const
Prints the content of the Fifo_entry to the output stream os

o accessor member functions

oinline int get_shmid() const
Return the identifier of the shared memory associated with this fifo_entry

oinline int get_dboff() const
Return the data offset (with respect to the beginning of the shared memory. -1 for volatile buffers.

oinline int* get_pData() const
Return the address where the data resides

oinline int get_len() const
Return the length of the data. The length is the maximum length of the data buffer as long as there is no actual data associated with the Fifo_entry. Once the event is copied into the data buffer it is the length of the data itself (i.e. a number smaller than the length of the databuffer).

oinline int get_ctlw1() const
Returns the first control word

oinline int get_ctlb1() const
Returns the first (bitwise) control word

oinline int get_ctlw2() const
Returns the second control word

oinline int get_ctlb2() const
Returns the second (bitwise) control word

oinline fifo_ctl get_ctl() const
Returns the entire control structure

o Member functions that set the internal data members.
Note that not all the data members can be set.

ovoid set_pdata( int* pInt )
Adjusts the pointer to the data. The address location where a process finds the data differs between processes as the shared memory can be attached at different addresses.

oinline void set_len( const int new_len )
Sets the length of valid data in the data buffer that belongs to the Fifo_entry

oinline void set_ctlw1( int iWord )
sets the first control word w1 of the fifo entry

oinline void set_ctlb1( int iWord )
sets the first control bit-word b1 of the fifo entry

oinline void set_ctlw2( int iWord )
sets the second control word w2 of the fifo entry

oinline void set_ctlb2( int iWord )
sets the second control bit-word w2 of the fifo entry

oinline void set_ctl( fifo_ctl new_ctl )
Sets the fifo control words


This class has no child classes.
Author:
C.Witzig
Date: Jan 11, 1998
Version:
Last update: Jan 11, 1998

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.