| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SpiderMachineBehavior Class Reference#include <SpiderMachineBehavior.h>
Inheritance diagram for SpiderMachineBehavior: ![]() Detailed DescriptionWhen active and connected over network socket, outputs structure of requested state machine(s).The protocol is:
Each of those commands should be terminated with a newline - i.e. one command per line
After a
After a All other commands give no direct response - listen can be executed before the specified StateNode is yet running, and ignore doesn't care whether or not the specified StateNode was actually being listened for. The format of the model is: <!DOCTYPE model [ <!ELEMENT model (state*, transition*)> <!ELEMENT state (state*, transition*)> <!ELEMENT transition (source+, dest+)> <!ELEMENT source (#PCDATA)> <!ELEMENT dest (#PCDATA)> <!ATTLIST state id CDATA #REQUIRED> <!ATTLIST state class CDATA #REQUIRED> <!ATTLIST transition id CDATA #REQUIRED> <!ATTLIST transition class CDATA #REQUIRED> ]> The format of status updates following a listen command is: <!DOCTYPE event [ <!ELEMENT event (fire*, statestart*, statestop*)> <!ELEMENT fire (EMPTY)> <!ELEMENT statestart (EMPTY)> <!ELEMENT statestop (EMPTY)> <!ATTLIST fire id CDATA #REQUIRED> <!ATTLIST fire time CDATA #REQUIRED> <!ATTLIST statestart id CDATA #REQUIRED> <!ATTLIST statestart time CDATA #REQUIRED> <!ATTLIST statestop id CDATA #REQUIRED> <!ATTLIST statestop time CDATA #REQUIRED> ]>
Definition at line 67 of file SpiderMachineBehavior.h.
Member Typedef Documentation
the type of the behavior registry (BehaviorBase::registry)
Definition at line 109 of file SpiderMachineBehavior.h.
Constructor & Destructor Documentation
don't call
Member Function Documentation
called by wireless when there's new data
Definition at line 216 of file SpiderMachineBehavior.cc. Referenced by DoStart().
By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
Reimplemented from BehaviorBase. Definition at line 9 of file SpiderMachineBehavior.cc.
By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might
Reimplemented from BehaviorBase. Definition at line 21 of file SpiderMachineBehavior.cc.
searches currently instantiated StateNodes to find the one named name
Definition at line 165 of file SpiderMachineBehavior.cc. Referenced by runCommand().
Gives a short description of what this class of behaviors does... you should override this (but don't have to). If you do override this, also consider overriding getDescription() to return it Reimplemented from BehaviorBase. Definition at line 89 of file SpiderMachineBehavior.h. Referenced by getDescription().
Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis). By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!) This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so. Reimplemented from BehaviorBase. Definition at line 95 of file SpiderMachineBehavior.h.
just to prettify the data sent out - probably should make this a null-op to save bandwidth after debugging is done
Definition at line 160 of file SpiderMachineBehavior.cc. Referenced by processEvent(), and spider().
returns true iff n or one of its parents is found in listen
Definition at line 151 of file SpiderMachineBehavior.cc. Referenced by processEvent().
don't call
By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
Reimplemented from BehaviorBase. Definition at line 34 of file SpiderMachineBehavior.cc.
parses commands sent from callback()
Definition at line 175 of file SpiderMachineBehavior.cc. Referenced by callback().
dumps all of the transitions and subnodes of a given statenode
Definition at line 105 of file SpiderMachineBehavior.cc. Referenced by runCommand().
Member Data Documentation
the socket for communication
Definition at line 107 of file SpiderMachineBehavior.h. Referenced by DoStart(), DoStop(), indent(), processEvent(), runCommand(), and spider().
a set of behaviors which are involved with an impending transition - their next stateMachineEGID event should be ignored
Definition at line 114 of file SpiderMachineBehavior.h. Referenced by DoStop(), and processEvent().
a set of state machine names which should have their subnodes monitored
Definition at line 116 of file SpiderMachineBehavior.h. Referenced by isListening(), processEvent(), and runCommand().
the port to listen on (10081 by default)
Definition at line 72 of file SpiderMachineBehavior.h. Referenced by DoStart(), and getClassDescription().
used if a transition causes other transitions, those transitions need to be remembered
Definition at line 118 of file SpiderMachineBehavior.h. Referenced by DoStop(), and processEvent().
Points to the one SpiderMachineBehavior object that the input command stream is talking to. A kludge. Dunno how you're gonna make sure you're not using this uninitialized. Definition at line 71 of file SpiderMachineBehavior.h. Referenced by callback(), DoStart(), and DoStop().
The documentation for this class was generated from the following files: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tekkotsu v3.0 |
Generated Wed Oct 4 00:05:15 2006 by Doxygen 1.4.7 |