Proxy class for a GTM board in the run control server
Accessors common to all PU
Architectural common member functions for all PU
Simple implementation of RTTI (see note above)
State transitions
virtual functions for generic configuring, starting/updating/continuing a state transition
Proxy class for a GTM board in the run control server. The rcGTM class corresponds to the granule timing board (GTM). There is one instance of a GTM per granule and it in a way defines the granule. There are 1:M relationship to FEMs, 1:M to DCMs and partition modules. These relationsships are currently instantiated out of the configuration files, eventually they will be read out of the global database.
The GTM inherits from the process unit object (PU).A special feature of the GTM operation is that fact that there are slight differences between the operational sequence from board to board. The "offenders" are BB, ZDC and TEC. Their behavior is accomodated by inheritance. This results in most member functions being protected.
The static member function createGTM creates the "right" object based on the global ONCS naming convention and returns a pointer to the rcGTM object.
The following things happen during the state transition functions:
- Initialise:
1. Raise the GTM VME busy, 2. Reset GTM, 3. Reset GLink, 4. initialise FEMs- Download:
1. Reset GTM, 2. load modebits, 3. reset GLink, 4. download FEMs, 5. check FEMs, 6. give global GTM start.- Start_run:
Lower the busy once everybody is running- End_run:
Raise the busy before talking to other components.
virtual ~rcGTM()
static member function that affect all instances of the GTMs
print, dump, list functions and accessors
void print( ostream &os = cout )
void dump( ostream &os = cout )
const char* getDefaultModeBitFile()
const char* getModeBitFile()
void setDefaultModeBitFile( const char* newFileName )
void setModeBitFile( const char* newFileName )
void resetModeBitFile()
inline long getAddress()
inline const char* getServerName()
Configuration Commands and retrieval of configuration parameters
int configure( const char* cmd, const char *value, const char *aux_param )
value - value of the command
aux_param - auxilliary parameter int addFem( FEM* pFem )
int addDcm( DCM* pDcm )
int addPar( Par* pPar )
static rcGTM* getGtmForDcm( const char *pcDcmName )
static rcGTM* getGtmForPar( const char *pcParName )
inline void setGranule( Granule *pGranule )
inline Granule* getGranule()
BUSY functions to control the granule BUSY over VME
Resetting the glink on the GTM
Functions inherited from PU that make up the global state transitions
int connect()
int initialise()
virtual int download()
int start_run()
int end_run()
virtual bool updatePu( int iStatus, int eState_on_success )
eState_on_success - final state upon successful operation
Function that coordinate the GTM-FEM-DCM interdependence
int adjustGtmFemState()
int initFemAfterGtmOk()
int initDcmAfterGtmOk()
int finishDownloadingAfterFEM()
rcGTM(const char *name, const char *pud_name, long vme_address, const char* pcServerName )
pud_name - : name of the corresponding design
vme_address - : address in the VME crate
pcServerName - : name of the server that manages this object int sendGtmEvent( int iEventId )
void reportErrorFromGtmUpdate( int iStatus, int eState_on_success )
virtual bool updateInitialise()
virtual bool updateDownload()
bool updateStartRun()
int iLastCmdSent
Granule* myGranule
list <FEM*> listFem
list <DCM*> listDcm
list <Par*> listPar
int createInVxWorks()
GTM_ptr ptrGTM
bool bCreatedInVxWorks
long lGranuleType
long lVMEaddress
char* pcServerName
char* pcDefaultModeBitFile
char* pcModeBitFile
int iStopEOxx
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de