//* NAV Course connection handler utility class - header file *

#ifndef _NAV_ARIA_CHANDLER #define _NAV_ARIA_CHANDLER #include "../Aria/include/Aria.h" //#include "G:/MobileRobots/Aria/include/Aria.h" /* This is a connection handler, fairly simple, but quite useful, esp when the robot is running in another thread. Its not really needed here since blockingConnect is used. But it'd still be useful if there is an error after connected */ class ConnHandler { public: ConnHandler(ArRobot *robot); // Constructor ~ConnHandler(void) {} // Destructor, its just empty // allows to check if connected to the robot bool is_connected() const { return(isOk); } // CALLBACK FUNCIUTONS // to be called automartically if the connection was made void connected(void); // to be called automartically if the connection failed void connFail(void); // to be called automartically if the connection was lost void disconnected(void); protected: // robot pointer ArRobot *myRobot; // the functor callbacks ArFunctorC<ConnHandler> myConnectedCB; ArFunctorC<ConnHandler> myConnFailCB; ArFunctorC<ConnHandler> myDisconnectedCB; bool isOk; }; #endif