00001 #include <stdio.h> 00002 #include <libplayerc++/playerc++.h> 00003 00004 int 00005 main(int argc, char *argv[]) 00006 { 00007 using namespace PlayerCc; 00008 00009 PlayerClient robot("localhost"); 00010 PowerProxy pp(&robot, 0); 00011 00012 while (true) { 00013 // read from the proxies 00014 robot.Read(); 00015 00016 printf("Charge is %f", pp.GetCharge()); 00017 } 00018 }
1.5.1