Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <HeadPointControllerBehavior.h>
Inheritance diagram for HeadPointControllerBehavior:
Definition at line 15 of file HeadPointControllerBehavior.h.
Public Member Functions | |
HeadPointControllerBehavior () | |
constructor | |
virtual | ~HeadPointControllerBehavior () |
destructor | |
virtual void | DoStart () |
By default, merely adds to the reference counter (through AddReference())
| |
virtual void | DoStop () |
By default, subtracts from the reference counter, and deletes if zero
| |
virtual void | processEvent (const EventBase &) |
The only event we could possibly receive is the stop-if-no-heartbeat timer. | |
virtual std::string | getName () const |
Identifies the behavior in menus and such. | |
Static Public Member Functions | |
int | mechacmd_callback (char *buf, int bytes) |
called by wireless when there's new data | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Static Public Attributes | |
HeadPointControllerBehavior * | theOne = NULL |
Protected Attributes | |
MotionManager::MC_ID | head_id |
the HeadPointerMC to use | |
Private Member Functions | |
void | runCommand (unsigned char *command) |
Executes a command. Called by mechacmd_callback. | |
HeadPointControllerBehavior (const HeadPointControllerBehavior &) | |
don't call | |
HeadPointControllerBehavior | operator= (const HeadPointControllerBehavior &) |
don't call | |
Private Attributes | |
float | t |
head parameter | |
float | p |
head parameter | |
float | r |
head parameter | |
HeadPointControllerBehavior * | theLastOne |
Socket * | cmdsock |
The input command stream socket. | |
Static Private Attributes | |
Command Bytes | |
const char | CMD_tilt = 't' |
handy symbol for matching incoming communication | |
const char | CMD_pan = 'p' |
handy symbol for matching incoming communication | |
const char | CMD_roll = 'r' |
handy symbol for matching incoming communication |
|
don't call
|
|
constructor
Definition at line 56 of file HeadPointControllerBehavior.h. References cmdsock, head_id, p, r, SocketNS::SOCK_STREAM, t, theLastOne, theOne, and wireless. |
|
destructor
Definition at line 64 of file HeadPointControllerBehavior.h. References theLastOne, and theOne. |
|
By default, merely adds to the reference counter (through AddReference())
Reimplemented from BehaviorBase. Definition at line 52 of file HeadPointControllerBehavior.cc. References EventRouter::addListener(), MotionManager::addMotion(), cmdsock, config, BehaviorBase::DoStart(), erouter, head_id, Config::main_config::headControl_port, Wireless::listen(), Controller::loadGUI(), Config::main, mechacmd_callback(), motman, Wireless::setReceiver(), Socket::sock, EventBase::timerEGID, and wireless. |
|
By default, subtracts from the reference counter, and deletes if zero
Reimplemented from BehaviorBase. Definition at line 66 of file HeadPointControllerBehavior.cc. References Wireless::close(), Controller::closeGUI(), cmdsock, BehaviorBase::DoStop(), erouter, EventRouter::forgetListener(), head_id, motman, MotionManager::removeMotion(), and wireless. |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 74 of file HeadPointControllerBehavior.h. References config, Config::main_config::headControl_port, and Config::main. |
|
Identifies the behavior in menus and such.
Implements BehaviorBase. Definition at line 73 of file HeadPointControllerBehavior.h. |
|
called by wireless when there's new data
Definition at line 80 of file HeadPointControllerBehavior.cc. References runCommand(), and theOne. |
|
don't call
|
|
The only event we could possibly receive is the stop-if-no-heartbeat timer.
Reimplemented from BehaviorBase. Definition at line 71 of file HeadPointControllerBehavior.h. |
|
Executes a command. Called by mechacmd_callback.
Definition at line 7 of file HeadPointControllerBehavior.cc. References EventRouter::addTimer(), CMD_pan, CMD_roll, CMD_tilt, erouter, head_id, ERS210Info::HeadOffset, ERS210Info::MaxRange, ERS210Info::outputRanges, p, ERS210Info::PanOffset, r, EventRouter::removeTimer(), ERS210Info::RollOffset, t, and ERS210Info::TiltOffset. |
|
handy symbol for matching incoming communication
Definition at line 30 of file HeadPointControllerBehavior.h. |
|
handy symbol for matching incoming communication
Definition at line 31 of file HeadPointControllerBehavior.h. |
|
handy symbol for matching incoming communication
Definition at line 29 of file HeadPointControllerBehavior.h. |
|
The input command stream socket.
Definition at line 46 of file HeadPointControllerBehavior.h. |
|
the HeadPointerMC to use
Definition at line 25 of file HeadPointControllerBehavior.h. |
|
head parameter
Definition at line 35 of file HeadPointControllerBehavior.h. |
|
head parameter
Definition at line 36 of file HeadPointControllerBehavior.h. |
|
head parameter
Definition at line 34 of file HeadPointControllerBehavior.h. |
|
The last HPCB object that was theOne, so we can restore it to prominence when we die. This is a nice gesture, but it doesn't really make sense since we're all using the same port. But just in case something changes and we don't do that, this mechanism is in place. Definition at line 43 of file HeadPointControllerBehavior.h. |
|
Points to the one HeadPointControllerBehavior 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 5 of file HeadPointControllerBehavior.cc. |
Tekkotsu v1.4 |
Generated Sat Jul 19 00:08:58 2003 by Doxygen 1.3.2 |