11 cout <<
"\n************************************************************************\n";
12 cout <<
"Example GMessage() usage\n";
13 cout <<
"************************************************************************\n";
31 return GALIL_EXAMPLE_OK;
34 cout <<
"Expected 10 messages\n";
35 return GALIL_EXAMPLE_ERROR;
GCLIB_DLL_EXPORTED GReturn GCALL GTimeout(GCon g, short timeout_ms)
Uses GUtility() and G_UTIL_TIMEOUT_OVERRIDE to set the library timeout.
#define G_NO_ERROR
Return value if function succeeded.
#define G_USE_INITIAL_TIMEOUT
GUtility(), for timeout override. Set G_UTIL_TIMEOUT_OVERRIDE to this value to use initial GOpen() ti...
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
GCLIB_DLL_EXPORTED GReturn GCALL GMessage(GCon g, GCStringOut buffer, GSize buffer_len)
Provides access to unsolicited messages from the controller.
GCLIB_DLL_EXPORTED GReturn GCALL GProgramDownload(GCon g, GCStringIn program, GCStringIn preprocessor)
Downloads a program to the controller's program buffer.
GCLIB_DLL_EXPORTED GReturn GCALL GCmd(GCon g, GCStringIn command)
Wrapper around GCommand for use when the return value is not desired.
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
void x_e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
int x_gmessage(GCon g)
Example GMessage() usage.