View Full Version : Get cRIO device name?
connor.worley
20-05-2012, 13:51
The imaging tool allows you to assign a name to a cRIO. Does anyone know how to access this name? Would gethostname be appropriate? I'm interested in discerning between the practice and competition bots.
Thanks.
Yes, you can get the host name by:
#include <hostlib.h>
char hostName[MAXHOSTNAMELEN];
gethostname(hostName, sizeof(hostName));
printf("Host: %s\n", hostName);
Joe Ross
21-05-2012, 20:05
We use the IP address to discern between practice and competition robots.
We've used a jumper on a Digital Input, to ground - present on one bot and absent on the other, reading 0 and 1, respectively.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.