#include <ArServerClasses.h>
Inheritance diagram for ArServerModeDock:

For docking to work you need to have a goal named 'dock' in your map currently (what you need may change later). Then start a program that has a docking class in it (guiServer for example) and then connect with MobileEyes and there'll be a Dock icon up in the robot toolbar, if you press that the robot will go and dock, press it again (or send the robot to another goal or point) for the robot to undock. To set a voltage for the robot to go dock at use setDockingVoltage. To control when the robot leaves the dock you can also set a voltage for it to leave at with setDoneChargingVoltage and/or a length of time for the robot to stay at the dock with setDoneChargingMinutes (it'll leave when either condition is met).
Public Member Functions | |
| ArServerModeDock (ArServerBase *serverBase, ArRobot *robot, ArLocalizationTask *locTask, ArPathPlanningTask *pathTask, bool useChargeState=false) | |
| Constructor. | |
| virtual | ~ArServerModeDock (void) |
| Destructor. | |
| State | getState (void) const |
| Gets the docking state we're in. | |
| virtual void | dock (void)=0 |
| Sends the robot to the dock (subclass needs to implement). | |
| virtual void | undock (void)=0 |
| Has the robot leave the dock (subclass needs to implement). | |
| virtual void | checkDock (void) |
| Sees if the robot is already docked and activates itself if it is (subclass should implement). | |
| virtual void | checkDefault (void) |
| For default modes, sees if it should activate itself. | |
| bool | getForcedDock (void) |
| Gets whether our docking is forced or not. | |
| void | requestForcedDock (void) |
| Requests a forced dock. | |
| void | setDockingVoltage (double dockingVoltage) |
| Set the voltage we go dock at. | |
| double | getDockingVoltage (void) const |
| Get the voltage we go dock at. | |
| void | setDoneChargingVoltage (double doneChargingVoltage) |
| Set the voltage we're done docking at (does first of voltage or time). | |
| double | getDoneChargingVoltage (void) const |
| Get the voltage we're done docking at (does first of voltage or time). | |
| void | setDoneChargingMinutes (int doneChargingMinutes) |
| Sets the number of minutes we dock for (does first of voltage or time). | |
| int | getDoneChargingMinutes (void) |
| Gets the number of minutes we dock for (does first of voltage or time). | |
| bool | getUseChargeState () |
| Gets whether we're using the charge state or not. | |
| void | setDoneChargingAtFloat (bool doneChargingAtFloat) |
| Sets whether we're done docking at float or not (this ONLY has meaning if getUseChargeState is true). | |
| bool | getDoneChargingAtFloat (void) |
| Gets whether we're done docking at float or not (this ONLY has meaning if getUseChargeState is true). | |
| void | setMinimumMinutesBetweenAutoDock (int minutesBetween) |
| Sets the number of minutes we won't auto redock for this many minutes after the last dock. | |
| int | getMinimumMinutesBetweenAutoDock (void) |
| Sets the number of minutes we won't auto redock for this many minutes after the last dock. | |
| void | setAutoDock (bool autoDocking) |
| Sets whether we auto dock or not. | |
| bool | getAutoDock (void) |
| Enables the auto docking. | |
| virtual void | addToConfig (ArConfig *config) |
| Adds the docking information to the given config. | |
| virtual void | addControlCommands (ArServerHandlerCommands *handlerCommands) |
| Adds simple commands to. | |
| void | serverDock (ArServerClient *client, ArNetPacket *packet) |
| Takes the server command to undock. | |
| void | serverUndock (ArServerClient *client, ArNetPacket *packet) |
| Takes the server command to undock. | |
| void | serverDockInfo (ArServerClient *client, ArNetPacket *packet) |
| Returns out the state of the docking. | |
| void | serverGetAutoDock (ArServerClient *client, ArNetPacket *packet) |
| Returns whether we're auto docking or not. | |
| void | serverSetAutoDock (ArServerClient *client, ArNetPacket *packet) |
| Sets whether we're auto docking or not. | |
| void | addStateChangedCB (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST) |
| Adds a functor to get called when the state changes. | |
| void | remStateChangedCB (ArFunctor *functor) |
| Removes a functor to get called when the state changes. | |
| unsigned int | getFailedGotoNum (void) |
| Gets the number of times goto has failed. | |
Static Public Member Functions | |
| static ArServerModeDock * | createDock (ArServerBase *serverBase, ArRobot *robot, ArLocalizationTask *locTask, ArPathPlanningTask *pathTask) |
| This will create a dock of the appropriate type for the robot. | |
Protected Member Functions | |
| ArMapObject * | findDock (ArMap *arMap) |
| this is a helper function that will find the dock from the preferred dock and whats in the map | |
| void | clearInterrupted (void) |
| This is for clearing the interrupted mode. | |
| void | resumeInterrupted (bool assureDeactivation) |
| This is for resuming the interrupted mode if we should. | |
1.4.0