18 int main(
int argc,
char * argv[])
29 cerr <<
"Incorrect number of arguments provided\n";
30 cerr <<
"Usage: commands_example.exe <ADDRESS>\n";
32 return GALIL_EXAMPLE_ERROR;
35 char* address = argv[1];
45 return GALIL_EXAMPLE_ERROR;
49 return GALIL_EXAMPLE_OK;
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
int main(int argc, char *argv[])
Main function for Commands Example.
GCLIB_DLL_EXPORTED GReturn GCALL GOpen(GCStringIn address, GCon *g)
Open a connection to a Galil Controller.
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
#define G_SMALL_BUFFER
Most reads from Galil are small. This value will easily hold most, e.g. TH, TZ, etc.
int pause()
Pauses console apps for a user key stroke.
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
GReturn commands(GCon g)
Demonstrates various uses of GCommand() and GUtility().
int GReturn
Every function returns a value of type GReturn. See gclib_errors.h for possible values.