17 cout <<
"***************************************************************\n";
18 cout <<
"Example GMessage() usage\n";
19 cout <<
"***************************************************************\n";
44 while (buf[b] !=
'\0')
52 cout <<
'<' <<
message <<
">\n";
88 while (buf[b] !=
'\0')
98 cout <<
"Standard Line: ";
100 cout <<
"Crashed Code: ";
102 cout <<
"Trace Line: ";
122 return GALIL_EXAMPLE_OK;
GCLIB_DLL_EXPORTED GReturn GCALL GUtility(GCon g, GOption request, GMemory memory1, GMemory memory2)
Provides read/write access to driver settings and convenience features based on the request variable.
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.
int GReturn
Every function returns a value of type GReturn. See gclib_errors.h for possible values.
#define G_UTIL_GCAPS_KEEPALIVE
GUtility(), Deprecated 20210119. No longer functional.
#define G_SMALL_BUFFER
Most reads from Galil are small. This value will easily hold most, e.g. TH, TZ, etc.
#define G_NO_ERROR
Return value if function succeeded.
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
GReturn message(GCon g)
Demonstrates how to receive messages from the controller and detect differences in Trace and crashed ...