gclib 2.1.20
Galil Communications Library
All Classes Files Functions Variables Typedefs Macros Modules Pages
C

Topics

 Connection
 Discover available controllers and open connections
 
 Controller
 Manage a Galil controller
 
 Galil Connect
 Host or connect to a remote gcaps instance
 

Functions

GCLIB_DLL_EXPORTED void GCALL GSleep (unsigned int timeout_ms)
 Uses GUtility() and G_UTIL_SLEEP to provide a blocking sleep call which can be useful for timing-based chores.
 
GCLIB_DLL_EXPORTED GReturn GCALL GVersion (GCStringOut ver, GSize ver_len)
 Uses GUtility(), G_UTIL_VERSION and G_UTIL_GCAPS_VERSION to provide the library and gcaps version numbers.
 
GCLIB_DLL_EXPORTED void GCALL GError (GReturn rc, GCStringOut error, GSize error_len)
 Provides a human-readable description string for return codes.
 

Function Documentation

◆ GSleep()

GCLIB_DLL_EXPORTED void GCALL GSleep ( unsigned int timeout_ms)

Uses GUtility() and G_UTIL_SLEEP to provide a blocking sleep call which can be useful for timing-based chores.

Parameters
timeout_msThe timeout, in milliseconds, to block before returning.

See GWaitForBool() for an example.

◆ GVersion()

GCLIB_DLL_EXPORTED GReturn GCALL GVersion ( GCStringOut ver,
GSize ver_len )

Uses GUtility(), G_UTIL_VERSION and G_UTIL_GCAPS_VERSION to provide the library and gcaps version numbers.

Parameters
verBuffer to hold the output string. Buffer will be null terminated, even if the data must be truncated to do so.
ver_lenLength of buffer.
Returns
The success status or error code of the function. See gclib_errors.h for possible values.

The version number of gclib is provided first. If the gcaps server can be found, its version will be provided after a space.

Example with gcaps version.

154.190.329 1.0.0.82

Example with gclib version only.

154.190.329
Note
GVersion() will take up to 1 second to look for gcaps.

See x_examples.cpp for an example.

◆ GError()

GCLIB_DLL_EXPORTED void GCALL GError ( GReturn rc,
GCStringOut error,
GSize error_len )

Provides a human-readable description string for return codes.

Parameters
rcThe return code to lookup.
errorThe buffer to fill with the error text. Buffer will be null terminated, even if the data must be truncated to do so.
error_lenThe length of the error buffer.

See x_examples.cpp for an example.