Example of MODA C++ program :
//////////////////////////////////////////////////// //MODA native CPP console application //////////////////////////////////////////////////// #include "Modacpp.h" #include "conio.h" //Settings: #define SIMULATEDROBOT "/robot1" #define MODASERVER "localhost" int main(int argc, char* argv[]) { ModaCPP::Connection *connection=new ModaCPP::Connection(true); if(connection->Connect(MODASERVER)) { _cprintf("Connexion to %s ok\r\n",MODASERVER); ModaCPP::RobotPHX *robot=connection->QueryRobotPHX(SIMULATEDROBOT); if(robot) { cprintf("robot found\r\n"); delete robot; } else { cprintf("robot not found\r\n"); } } else { cprintf("Unable to connect to moda server : be sure Exec is running and MODA TCP/UDP ports are open\r\n"); } connection->Disconnect(); delete connection; _getch(); return 0; } //...
Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
|
What do you think about this topic? Send feedback!
|