#include <ConsoleModule.h>
Inheritance diagram for ot::ConsoleModule:


Public Member Functions | |
| ConsoleModule () | |
| virtual | ~ConsoleModule () |
| virtual void | init (StringTable &attributes, ConfigNode *localTree) |
| virtual Node * | createNode (const std::string &name, StringTable &attributes) |
| virtual void | pushEvent () |
| virtual void | pullEvent () |
| virtual void | start () |
| virtual void | close () |
| virtual int | stop () |
Public Attributes | |
| std::vector< std::string > | functionMap |
| std::map< std::string, int > | keyCodeMap |
Static Public Attributes | |
| static const short | MOVE_X_PLUS = 1 |
| static const short | MOVE_X_MINUS = 2 |
| static const short | MOVE_Y_PLUS = 3 |
| static const short | MOVE_Y_MINUS = 4 |
| static const short | MOVE_Z_PLUS = 5 |
| static const short | MOVE_Z_MINUS = 6 |
| static const short | ROT_X_PLUS = 7 |
| static const short | ROT_X_MINUS = 8 |
| static const short | ROT_Y_PLUS = 9 |
| static const short | ROT_Y_MINUS = 10 |
| static const short | ROT_Z_PLUS = 11 |
| static const short | ROT_Z_MINUS = 12 |
| static const short | ACCELL = 13 |
| static const short | BRAKE = 14 |
| static const short | BUTTON_1 = 15 |
| static const short | BUTTON_2 = 16 |
| static const short | BUTTON_3 = 17 |
| static const short | BUTTON_4 = 18 |
| static const short | STATION_0 = 20 |
| static const short | STATION_1 = 21 |
| static const short | STATION_2 = 22 |
| static const short | STATION_3 = 23 |
| static const short | STATION_4 = 24 |
| static const short | STATION_5 = 25 |
| static const short | STATION_6 = 26 |
| static const short | STATION_7 = 27 |
| static const short | STATION_8 = 28 |
| static const short | STATION_9 = 29 |
| static const short | RESET = 30 |
| static const short | QUIT = 31 |
| static const short | NEXT_ATTR = 32 |
| static const short | ADD_ATTR = 33 |
| static const short | DEL_ATTR = 34 |
| static const short | CHANGE_ATTR_POS = 35 |
| static const short | CHANGE_ATTR_NEG = 36 |
| static const short | CHANGE_ATTR_VAL = 37 |
| static const short | ACCEL_ANG = 38 |
| static const short | BRAKE_ANG = 39 |
Protected Member Functions | |
| void | addAttr (const int station, const std::string type, const std::string name, const std::string value) const |
| void | delAttr (const int station, const std::string name) |
| void | nextAttr (const int station) |
| void | changeAttrToValue (const int station, const std::string value) const |
| void | changeAttr (const int station, const DIRECTION dir) const |
| void | clearLastLines (int lines=-1) |
| void | setButton (int station, int button) |
| void | movePos (int station, float *data) |
| void | rotate (int station, float *data) |
| void | reset (int station) |
Protected Attributes | |
| NodeVector | sinks |
| list of ConsoleSink nodes in the tree | |
| NodeVector | sources |
| list of ConsoleSource nodes in the tree | |
| int | cycle |
| current cycle count, for computing when to print out the event again | |
| int | interval |
| cycle interval to use for printing out events | |
| std::string | headerline |
| headerline in display | |
| float | angularSpeed |
| angular velocity and positional velocity | |
| float | posSpeed |
| int | station |
| currently active station, must be in [0-9] | |
| int | quit |
| should the module quit ? | |
| int | display |
| is the console module displaying values ? | |
| int | curses |
| should curses be initialized ? | |
| std::vector< int > | keyMap |
| maps key chars to indices | |
| bool | delAttribute |
| whether the user chose to delete an attribute | |
| bool | addAttribute |
| whether the user chose to add a new attribute | |
| bool | changeAttrByVal |
| whether the user chose to change an attribute by typing in the new value | |
| std::string | nameOfAttributeToBeChanged |
| the name of the attribute that is shown to be subject to change currently | |
| bool | currentChanged |
| whether the user switched attribute that is currently subject to change | |
| bool | stationChanged |
| whether station number or station information changed | |
|
|
constructor method. initializes internal and static data such as the functionMap and keyMap tables. |
|
|
Destructor method, clears nodes member. |
|
||||||||||||||||||||
|
adds the attribute to the events of all sources belonging to
|
|
||||||||||||
|
increases or decreases the attribute currently subject to change according to
|
|
||||||||||||
|
changes the attribute that is currently subject to change to
|
|
|
clear the
|
|
|
On Unix platforms closes curses. Reimplemented from ot::Module. |
|
||||||||||||
|
This method is called to ruct a new Node. It compares name to the ConsoleSink element name, and if it matches creates a new ConsoleSink node.
Implements ot::NodeFactory. |
|
||||||||||||
|
deletes the attribute from all events of all sources belonging to
|
|
||||||||||||
|
initializes the tracker module.
Reimplemented from ot::Module. |
|
||||||||||||
|
moves the position by the given data on all sources that are associated with station. Changes the changed flag on the sources.
|
|
|
chooses the next attribute to be subject to change
|
|
|
reads out the ConsoleSink nodes current event an prints it to the console. This is done only each length cylce. Reimplemented from ot::Module. |
|
|
checks the console for keyboard input and updates any ConsoleSource nodes accordingly. This happens every cycle and all key presses recorded since are used. Reimplemented from ot::Module. |
|
|
resets the data on all sources that are associated with the given station. Changes the changed flag on the sources.
|
|
||||||||||||
|
rotates the event by the given data on all sources that are associated with station. Changes the changed flag on the sources.
|
|
||||||||||||
|
sets the button bit of given button on all sources that are associated with station. Changes the changed flag on the sources.
|
|
|
On Unix platforms initializes curses. This method is called after initialisation is finished and before the main loop is started. Reimplemented from ot::Module. |
|
|
tests whether a key was pressed, if so it stops.
Reimplemented from ot::Module. |
|
|
|
|
|
|
|
|
|
|
|
whether the user chose to add a new attribute
|
|
|
angular velocity and positional velocity
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
whether the user chose to change an attribute by typing in the new value
|
|
|
whether the user switched attribute that is currently subject to change
|
|
|
should curses be initialized ?
|
|
|
current cycle count, for computing when to print out the event again
|
|
|
|
|
|
whether the user chose to delete an attribute
|
|
|
is the console module displaying values ?
|
|
|
|
|
|
headerline in display
|
|
|
cycle interval to use for printing out events
|
|
|
|
|
|
maps key chars to indices
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the name of the attribute that is shown to be subject to change currently
|
|
|
|
|
|
|
|
|
|
|
|
should the module quit ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list of ConsoleSink nodes in the tree
|
|
|
list of ConsoleSource nodes in the tree
|
|
|
currently active station, must be in [0-9]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
whether station number or station information changed
|
1.4.6