class Fifo_mode

Class Fifo_mode that determines the mode of a fifo from the user's point of view.

Public Methods

[more] constructors
[more] Setting attributes of the Fifo_mode
[more]Fifo::sFifo_mode getStructure()
To get the C structure sFifo_mode from the class Fifo_mode.
[more]int checkValues()
Checks the values.


Documentation

Class Fifo_mode that determines the mode of a fifo from the user's point of view. Internally to the DD system it hides the details of the structure sFifo_mode from the user.

The reason for having Fifo_mode and the above mentioned structure sFifo_mode (defined in fifo.h) is that we do want to give the user all the advantages of a class, but we also want to have the fifos (which reside in shared memory) in the simplest possible form, hence the use of a structure.

The Fifo_mode has the following options:

Modifications:

o constructors

o Fifo_mode( Fifo::eFifo_fill_mode eFill_mode = Fifo::fill_all, Fifo::eFifo_filter eFilter = Fifo::filter_off, Fifo::eFifo_wait_mode eWait = Fifo::sleep_mode, int iPrescale = -1, int iReqcnt = -1, Fifo::eFifo_user_mode user = Fifo::multi_user, Fifo_entry::fifo_ctl fctl = defaultCtl )
Constructor in which all arguments are specified and the default values are given. The arguments are defined in fifo.h, a description is given above.

o Fifo_mode( const struct Fifo::sFifo_mode sMode )
Constructor with the fifo internal struture sFifo_mode.

o Setting attributes of the Fifo_mode

oinline void setFillMode( Fifo::eFifo_fill_mode mode )
To set the fill mode. This determines when an event is put into the fifo.

oinline void setFilter( Fifo::eFifo_filter filter )
To set the filter (ie. enable/disable the selection of events based on the control words).
Parameters:
- filter = filter_on, filter_off

oinline void setWaitMode( Fifo::eFifo_wait_mode mode )
To set the wait mode.
Parameters:
mode - = sleep_mode or async_mode

oinline void setPrescale( int ps )
To set the prescale

oinline void setReqCount( int rc )
To set the request count

oinline void setSingleUserMode( Fifo::eFifo_user_mode user_mode )
To set single or multiple user mode.
Parameters:
user_mode - : multi_user or single_user

oinline void setCtl( Fifo_entry::fifo_ctl ctl )
To set the control words with the fifo_ctl structure fifo_ctl has 4 members (iCtlw1, iCtlb1, iCtlw2, iCtlb2)

ovoid setCtl( int w1=-1, int b1=-1, int w2=-1, int b2=-1 )
To set the control words individually

oFifo::sFifo_mode getStructure()
To get the C structure sFifo_mode from the class Fifo_mode. This should only be used for ease of conversion back and forth between the C structure and the C++ class. From the user's point of view there should only be a class Fifo_mode, i.e. he should not really use the structure itself.

oint checkValues()
Checks the values. All private members are checked, whether they have a valid value. If not, the default is taken.
Returns:
: ddcSuccess if all values ok, ddcFailure otherwise


This class has no child classes.
Friends:
ostream& operator<<( ostream &os, Fifo_mode mode )
Author:
C.Witzig
Date: Nov 17, 1998
Version:
Last update: Nov 17, 1998

Alphabetic index HTML hierarchy of classes or Java



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