|
Public Member Functions |
| SubsMod (const char &pSTATE=0, const char &pPREV_STATE=0) |
virtual void | step (void)=0 |
int | addInput (OutReg *, char *name=0) |
| Connect an output to this module.
|
int | addOutput (const char *outName=0, const float &startVal=0) |
| add an output register to the module
|
OutReg * | getOutRegPtr (const int &) |
| Retrieve a pointer to an output register in this SubsMod.
|
bool | setOutputReg (const int &, const float &) |
| Set the value of an output register.
|
bool | getInputReg (const int &, float *) |
| get the value of an input 'virtual' register
|
TextDisplay * | createDisp (QWidget *parent=0, char *name=0) |
| create a textView widget to display text during running
|
void | display (char *str) |
| append display text
|
void | displaySet (char *str) |
| set display text
|
void | display (const QString &) |
| append display text
|
void | displaySet (const QString &) |
| set display text
|
Public Attributes |
std::vector< VirtualInputReg > | vInputs |
std::vector< OutReg > | vOutputs |
Protected Attributes |
char | PREVIOUS_STATE |
This is the core for each AFSM, or subsumption module. SubsMod is a base class which is inherited by a user defined class. This is then wrapped by separate threads or virtual threads, defined by the user, using member functions of RobotControl. The user must override the pure virtual function SubsMod::step(), which will be run by RobotControl repetitively (to simulate concurrency). The data member SubsMod::STATE is used to record the current state of the AFSM, and a switch statement is useful for determining what action is appropriate.