Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
EventLogger Class Reference#include <EventLogger.h>
Inheritance diagram for EventLogger:
![]() Detailed Descriptionallows logging of events to the console or a file, also provides some remote logging facilities over logSocket, required by Storyboard toolUsers' behaviors can call logMessage(), logImage(), and logWebcam() to insert the corresponding data into logSocket via an XML 'event' node. The protocol used with logSocket 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> ]> The 'event' node is also used for the results of logImage(), logMessage(), and logWebcam(). Definition at line 77 of file EventLogger.h.
Member Typedef Documentation
the type of the behavior registry (BehaviorBase::registry)
Definition at line 179 of file EventLogger.h.
Constructor & Destructor Documentation
Member Function Documentation
opens a custom (embedded) menu to toggle individual EGIDs
Reimplemented from ControlBase. Definition at line 62 of file EventLogger.cc.
called when the child has deactivated and this control should refresh its display, or some other event (such as the user pressing the refresh button) has happened to cause a refresh to be needed
Reimplemented from ControlBase. Definition at line 97 of file EventLogger.cc. Referenced by doSelect().
sends all events received to stdout and/or logfile
Implements EventListener. Definition at line 103 of file EventLogger.cc.
request that the desktop side take a picture with the webcam (if available)
Definition at line 187 of file EventLogger.cc.
called by wireless when there's new data
Definition at line 361 of file EventLogger.cc. Referenced by EventLogger().
deletes each slot item and clears the slots
Reimplemented from ControlBase. Definition at line 205 of file EventLogger.cc. Referenced by ~EventLogger().
sets the status char of slot i to c
Definition at line 210 of file EventLogger.cc. Referenced by checkLogFile(), and doSelect().
checks to see if logfilePath differs from the StringInputControl's value and switches it if it is
Definition at line 216 of file EventLogger.cc. Referenced by processEvent(), and refresh(). dumps all of the transitions and subnodes of a given statenode if parent is NULL, will dump the results over logSocket, otherwise adds the xml tree as a child of parent Definition at line 238 of file EventLogger.cc. Referenced by runCommand().
returns true iff n or one of its parents is found in listen
Definition at line 287 of file EventLogger.cc. Referenced by processStateMachineEvent().
parses commands sent from callback()
Definition at line 312 of file EventLogger.cc. Referenced by callback().
just to prettify the data sent out - probably should make this a null-op to save bandwidth after debugging is done
Definition at line 296 of file EventLogger.cc.
searches currently instantiated StateNodes to find the one named name
Definition at line 301 of file EventLogger.cc. Referenced by runCommand().
if there is a remote monitor listening for state machine transitions, this will send them over this is called by the StateMachineListener, which is subscribed to only those machines which have been requested by the remote monitor Definition at line 375 of file EventLogger.cc. Referenced by EventLogger::StateMachineListener::processEvent().
dumps elements of queuedEvents over logSocket, popping and freeing as it goes
Definition at line 438 of file EventLogger.cc. Referenced by logImage(), logMessage(), logWebcam(), and processStateMachineEvent(). writes an xmlNode out over logSocket, freeing node when complete uses doc if provided, otherwise makes a new temporary one which is then deleted again before the function returns Definition at line 447 of file EventLogger.cc. Referenced by dumpQueuedEvents(), and spider().
Member Data Documentation
the instance which will handle network communication
Definition at line 113 of file EventLogger.h. Referenced by EventLogger(), EventLogger::StateMachineListener::processEvent(), and ~EventLogger().
handles state machine transitions if the Storyboard GUI (or other remote monitor) is listening for state machine events
Definition at line 123 of file EventLogger.h. Referenced by runCommand().
address of the logfile, if any (empty string is no logfile)
Definition at line 162 of file EventLogger.h. Referenced by checkLogFile().
if a filename is given, events are logged to here
Definition at line 165 of file EventLogger.h. Referenced by checkLogFile(), doSelect(), and processEvent().
events which are logged will be sent over this port in an xml format. See eventlog.dtd in the docs directory
Definition at line 168 of file EventLogger.h. Referenced by dumpNode(), EventLogger(), getLogSocket(), indent(), logImage(), logMessage(), logWebcam(), processEvent(), processStateMachineEvent(), runCommand(), and ~EventLogger().
port number logSocket will listen on
Definition at line 171 of file EventLogger.h. Referenced by EventLogger(), getLogSocketPort(), and setLogSocketPort().
reference count for logSocket -- when this hits 0, close the socket
Definition at line 174 of file EventLogger.h. Referenced by EventLogger(), and ~EventLogger().
controls the level of verbosity - currently 0 through 2
Definition at line 177 of file EventLogger.h. Referenced by EventLogger(), and processEvent().
a set of state machine names which should have their subnodes monitored
Definition at line 182 of file EventLogger.h. Referenced by isListening(), processStateMachineEvent(), and runCommand().
if logImage/logMessage/etc. are called during a transition, need to queue them until the transition event is complete
Definition at line 185 of file EventLogger.h. Referenced by dumpQueuedEvents(), logImage(), logMessage(), logWebcam(), processStateMachineEvent(), and ~EventLogger().
if another transition occurs during the processing of another, have to recurse on processing the new transition first
Definition at line 188 of file EventLogger.h. Referenced by logImage(), logMessage(), logWebcam(), and processStateMachineEvent().
The documentation for this class was generated from the following files: |
Tekkotsu v4.0 |
Generated Thu Nov 22 00:58:20 2007 by Doxygen 1.5.4 |