Demonstrates how callbacks can be registered with ArRobot to be called when a connection succeeds or fails.
#include "Aria.h"
class ConnHandler
{
public:
~ConnHandler(void) {}
void connected(void);
void connectionFailed(void);
void disconnected(void);
void connectionLost(void);
protected:
};
ConnHandler::ConnHandler(
ArRobot *robot) :
myConnectedCB(this, &ConnHandler::connected),
myConnFailCB(this, &ConnHandler::connectionFailed),
myDisconnectedCB(this, &ConnHandler::disconnected),
myConnLostCB(this, &ConnHandler::connectionLost)
{
myRobot = robot;
}
void ConnHandler::connectionFailed(void)
{
}
void ConnHandler::connected(void)
{
}
void ConnHandler::disconnected(void)
{
}
void ConnHandler::connectionLost(void)
{
}
int main(int argc, char **argv)
{
{
return 1;
}
ConnHandler ch(&robot);
return 0;
}