class FEM : public genNamedObj<FEM*>, public Pu

Proxy object for the FEM

Inheritance:


Public Methods

FEM* castToFEM()
Poor man's RTTI
virtual int configure( const char *cmd, const char *value, const char *aux_param )
Generic configuration command
void dump( ostream &os = cout )
Dumps information about the object to ostream os
static void dump_all( ostream &os = cout )
Iterates over all objects and calls dump
FEM( const char *name, const char *pud_name )
Constructor with name and type
void identify( ostream &os = cout )
Prints a one-line summary about the object
static void listAll( ostream &os = cout )
Iterates over all objects and calls identify
void setDcm( DCM *pDcm )
To relate the FEM with a DCM

Public

Accessors to build up the list of arcnet files to download.
int setStatusFile( const char *pcFile )
To set the status hex file if there is one
int addInitFile( const char *pcFile )
To add an initialisation file
int addDownloadFile( const char *pcFile )
To add a download file
int clearInitFiles()
To clear the list of initialisation files
int clearDownloadFiles()
To clear the list of download files
state transition functions.
virtual int connect()
Called at boot time
virtual int initialise()
Flags FEM as in initialsation mode
virtual int download()
Flags FEM as in downloading mode
virtual int start_run()
Nothing to do for the FEM
virtual int end_run()
Nothing to do for the FEM
virtual bool updatePu( int iStatus, int eState_on_success )
Member function to update the state
int sendInitFiles()
Sends all initialisation files to the arcnet server
int sendDownloadFiles()
Sends all download files to the arcnet server
int checkReadyAfterDownload()
Place holder if we ever want to do checking of the FEM after the download to make sure that it is ready

Protected Fields

list <pstring> listDownloadFiles
STL list with the names of the download files
list <pstring> listInitFiles
STL list with the names of the initialisation files
pstring statusFile
Name of the statusFile

Private Fields

static bool bArcnetConnectionEstablished
True if we established the arcnet connection
DCM* myDcm
Pointer to the DCM object that is attached to the FEM
static genOncsCorbaObj* pArcnetConnectionObj
ONCS corba connection object
static ArcnetServer_var varArcnetServer
Corba var to the server

Private Methods

int arcnetCheckStatus( const char *name )
REturns true if we have a good status in the arcnet
static bool checkArcnetConnection( bool bDebugArcnet )
Returns true if we are currently connected to the arcnet server
static bool establishArcnetConnection( bool bDebugArcnet )
Returns true if the ArcnetServer is running
int removeArcnetFile( list<pstring>&theList, const char *pcPosition )
Removes the arcnet file at the position pcPosition from the list
int replaceArcnetFile( list<pstring>&theList, const char *pcPosition, const char* pcValue )
Replaces the arcnet file at the position pcPosition with a new value
int sendArcnetCommand( list<pstring>& listOfFiles )
Sends a list of files to the arcnet server to download

Inherited from genNamedObj:

Public Methods

static void add( const char *name, X x )
inline static X begin()
inline static X end()
static bool exists( const char *name )
static X get( const char *name )
int getLocation()
inline static int getNbElements()
static X getObject( const char *name )
static int getObjects( const char *name, list<X> &theList )
inline const char* getObjName()
inline static X next()
static void remove( const char *name )

Private Fields

static map < const char*, X, cstring_ordering_t > ::iterator m_It
static map < const char*, X, cstring_ordering_t > m_Map
char* m_Name

Inherited from Pu:

Public

Accessors common to all PU

const char* getPudName()
Returns the name of the Process Unit Design
const char* getPrstName()
Return the name of the process stage, which controls this PU
Prst* getPrst()
Return a pointer to the process stage, which controls this PU
inline void enable()
To set the enable flag of the PU to true
inline void disable()
To set the disable flag of the PU to false
virtual bool isEnabled( const char* pccTransition = NULL )
To find out whether a process unit is enabled
void setSimulate( bool bValue )
To set the simulate mode
void setDebug( bool aBool )
To set the debug mode
bool getDebug()
Returns true if we are in debug mode

Architectural common member functions for all PU

Pu(const char *name, const char *pud_name )
constructor with the name and design as input
virtual ~Pu()
virtual destructor for handling dtor of subtypes
static mapPu_t mapPu
The PUs are organized in a global STL map
static bool exists( const char *name )
Returns true if a PU of this name exists
static mapPu_t::iterator locate( const char *name )
given the name of the PU return an STL map iterator to it
static Pu* get( char *name )
given the name return a pointer to the object itself
static int getPuByTag( const char* pcTag, list<Pu*> &theList )
To get a whole bunch of Pu that start with a given name
virtual void identify( ostream &os = cout )
To print out a one-line identifing message to the ostream os
virtual void dump( ostream &os = cout )
To print out a detailed summary of the Pu to ostream os
static void dump_all( ostream &os = cout )
To print out a detailed summary for all PU to ostream os
static void listAll( ostream &os = cout )
To print out a one-line summary for all PU to ostream os

Simple implementation of RTTI (see note above)

virtual Rdev* castToRdev()
virtual casts to Rdev
virtual Rout* castToRout()
virtual casts to Rout
virtual EvPool* castToEvPool()
virtual casts to EvPool
virtual Swpu* castToSwpu()
virtual casts to Swpu
virtual rcGTM* castToGTM()
virtual casts to GTM
virtual FEM* castToFEM()
virtual casts to FEM
virtual DCM* castToDCM()
virtual casts to DCM
virtual DDsocket* castToDDsocket()
virtual casts to DDsocket
virtual ROobject* castToROobject()
virtual casts to ROobject
virtual ddEventServer* castToddEventServer()
virtual casts to ddEventServer
virtual DataLogger* castToDataLogger()
virtual casts to DataLogger
virtual rcDataLogger* castToRcDataLogger()
virtual casts to rcDataLogger
virtual DummyDevice* castToDummyDevice()
virtual casts to Dummy device
virtual Par* castToPar()
virtual casts to Par
virtual EvbComponent* castToEvbComponent()
virtual casts to EvbComponent

State transitions

enum states
enum with the different possible states - these are common to all PU!!!
static const char* pcStates[]
the names of the state transitions as static const char*
int setState(int state )
Sets the state to the new state given by the enum int
int setState( const char *pcState )
Sets the state to the new state given by the name of the state
int getState()
Returns the state to the new state as enum int
const char* getcState()
Returns the state to the new state as a string
static int setStateAndUpdateStage( const char *pcPuGroup, const char *pcNewState )
Function that searches for a named PU (or group of PUs), sets its STT to the pcNewState and updates the ProcessStage at the same time

virtual functions for generic configuring, starting/updating/continuing a state transition

virtual int configure( const char* config_req, const char* value, const char *param = NULL )
To configure a PU
virtual int connect()
Connect is called once at initialisation time
virtual int initialise()
To initialise the PU
virtual int download()
To download the PU
virtual int start_run()
To start a new run
virtual int end_run()
To stop a run in progress
virtual bool updatePu( int iStatus, int eState_on_success )
Whenever a PU reports to the prst that is has done a state transition, the prst calls this virtual function
virtual bool checkReady( int iLevel )
Returns true if the process unit is in a ready state

Protected Fields

bool bDebug
bool bEnabled
bool bIgnoreErrorOnTransition[ eNStates ]
bool bSimulate
int eState
char* pcName
char* pcPud_name
const char* pcState

Protected Methods

int sendEventPuDone( int eState_on_success )
int updateStateAfterConfigReq( int eNewState = eInitialised )

Private Methods

int setIgnoreErrorOnTransition( const char* pcTransition, bool bValue )

Documentation

Proxy object for the FEM. This object deals with every type of FEM. Communication with the FEM is done through the ArcnetServer, currently entirely through remote member functions invokations. This should be upgraded to use the ONCS event mechanism.

Two type of arcnet files are in use: the initialisation files, which are downloaded during the initialisation phase, and the download files, which are downloaded at - surprise, surprise - at download time.

Last update: Feb 1, 2000 by CW

FEM( const char *name, const char *pud_name )
Constructor with name and type

static void dump_all( ostream &os = cout )
Iterates over all objects and calls dump

static void listAll( ostream &os = cout )
Iterates over all objects and calls identify

void identify( ostream &os = cout )
Prints a one-line summary about the object

void dump( ostream &os = cout )
Dumps information about the object to ostream os

FEM* castToFEM()
Poor man's RTTI

state transition functions.

virtual int connect()
Called at boot time. Checks to see whether the arcnet server is running.

virtual int initialise()
Flags FEM as in initialsation mode. The files will be sent down through the GTM once the GTM is in the desired state.

virtual int download()
Flags FEM as in downloading mode. The files will be sent down through the GTM once the GTM is in the desired state.

virtual int start_run()
Nothing to do for the FEM

virtual int end_run()
Nothing to do for the FEM

virtual bool updatePu( int iStatus, int eState_on_success )
Member function to update the state

int sendInitFiles()
Sends all initialisation files to the arcnet server

int sendDownloadFiles()
Sends all download files to the arcnet server

int checkReadyAfterDownload()
Place holder if we ever want to do checking of the FEM after the download to make sure that it is ready

virtual int configure( const char *cmd, const char *value, const char *aux_param )
Generic configuration command

Accessors to build up the list of arcnet files to download.

int setStatusFile( const char *pcFile )
To set the status hex file if there is one

int addInitFile( const char *pcFile )
To add an initialisation file

int addDownloadFile( const char *pcFile )
To add a download file

int clearInitFiles()
To clear the list of initialisation files

int clearDownloadFiles()
To clear the list of download files

void setDcm( DCM *pDcm )
To relate the FEM with a DCM

list <pstring> listInitFiles
STL list with the names of the initialisation files

list <pstring> listDownloadFiles
STL list with the names of the download files

pstring statusFile
Name of the statusFile

DCM* myDcm
Pointer to the DCM object that is attached to the FEM

static bool establishArcnetConnection( bool bDebugArcnet )
Returns true if the ArcnetServer is running

static bool checkArcnetConnection( bool bDebugArcnet )
Returns true if we are currently connected to the arcnet server

int sendArcnetCommand( list<pstring>& listOfFiles )
Sends a list of files to the arcnet server to download

int arcnetCheckStatus( const char *name )
REturns true if we have a good status in the arcnet

int removeArcnetFile( list<pstring>&theList, const char *pcPosition )
Removes the arcnet file at the position pcPosition from the list

int replaceArcnetFile( list<pstring>&theList, const char *pcPosition, const char* pcValue )
Replaces the arcnet file at the position pcPosition with a new value

static bool bArcnetConnectionEstablished
True if we established the arcnet connection

static genOncsCorbaObj* pArcnetConnectionObj
ONCS corba connection object

static ArcnetServer_var varArcnetServer
Corba var to the server


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de