Control object that controls the states of a bunch of process units
Control object that controls the states of a bunch of process units. Typical examples of the process stages are the FEMstage (all FEMs that are allocated to a partition), the DCMstage (all DCMs), etc etc... The different types of process stages are defined in the file generic.pcfThe process stage has a very simple state model: (see the user guide for details). It normally sits and waits for commands, which it receives in the form "bring all your stages into the state XXX", XXX being ready, running, etc.
The process stage then calls the corresponding member function on all process units, that it controls. The member functions are initialise, download, start_run and stop_run. These functions are all virtual for the process unit, with the idea that the subtype of the process unit implements the specific action. An example the dcm object may send the loadDSP code command to the DCM. Once this is done, the process stage drops into a wait state.
As the corba return events come in (via the corba proxy object of the process stage), the prst checks to which process unit they belong and calls the member function update_pu on that specific process unit. update_pu is also a virtual function, which returns a boolean. The process unit has the knowledge what will happen next. Eg it may send another corba command to the hardware, and the return command will lead to another update_pu call. Once the process unit is done, it returns a true value. The process stage then decrements a counter, which indicates, how many process units have arrived in the desired state. When no more process units are outstanding, the process stage informs the partition object that all is honky dory!
~Prst()
int TakeEvent( rcEvent *pEvent )
Accessor member functions
static int getNbStages()
static void show_status( ostream &os = cout )
void identify( ostream &os = cout )
void dump( ostream &os = cout )
static void dump_all( ostream &os = cout )
static void listAll( ostream &os = cout )
void dumpPu( ostream &os = cout )
void listPu( ostream &os = cout )
int getNPu_outstanding()
const char* getName()
int setPuState( int iNewState )
int enforcePuState( const char *pcNewState )
int getiPuState()
const char* getPuState()
void setTimeout( int iTimeout )
void setManaged( bool managed )
int add(Pud *)
int sub(Pud *)
int getPud( list<Pud*> &rlistPud )
int getPu( list<Pu*> &rlistPu )
int getNbPu()
inline bool IsEnabled()
int Enable()
int Disable()
inline void setDebug( bool aBool )
inline bool getDebug()
inline void setStepMode( bool bValue )
inline bool inStepMode()
int Reset()
void enableTimers()
void disableTimers()
inline char* getCorbaName()
int sendCorbaEvent( evdata &refEventData )
ProcessStage_i* getCorbaProxy()
State machine member functions
int updatePuState()
int waiting_for_command()
int initiate_state_transition( const char *transition, int scope = 0, int level = 0 )
int waiting_for_pu( char *name, int iStatus )
int all_pu_done()
int error_occured( const char *msg )
int check_pu(const char *name)
bool checkReady( int iCheckLevel = 0 )
int setState( int iNewState )
char* pcName
char* pcType
char* pcPurpose
char* pcCurrentTransition
int eState_on_success
const char* pcState_on_success
int iPuState
const char* pcPuState
int nPu_outstanding
int nTimeout_ms
bool bDisableTimer
smTimer* pMyTimer
list <Pud*> listPud
bool bStepMode
char* pcCorbaName
static char* pcLastCorbaEvSrc
static char* pcLastCorbaEvDest
static int iLastCorbaEvId
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de