gclib 2.1.20
Galil Communications Library
All Classes Files Functions Variables Typedefs Macros Modules Pages
gclib.py
Go to the documentation of this file.
1
18
19
23import platform #for distinguishing 'Windows', 'Linux', 'Darwin'
24from ctypes import *
25import os
26
27if platform.system() == 'Windows':
28 if '64 bit' in platform.python_compiler():
29 WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x64/libcrypto-1_1-x64.dll')
30 WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x64/libssl-1_1-x64.dll')
31 _gclib = WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x64/gclib.dll')
32 _gclibo = WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x64/gclibo.dll')
33 else:
34 WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x86/libcrypto-1_1.dll')
35 WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x86/libssl-1_1.dll')
36 _gclib = WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x86/gclib.dll')
37 _gclibo = WinDLL(os.environ["GCLIB_ROOT"] + '/dll/x86/gclibo.dll')
38 #Reassign symbol name, Python doesn't like @ in function names
39 #gclib calls
40 setattr(_gclib, 'GArrayDownload', getattr(_gclib, '_GArrayDownload@20'))
41 setattr(_gclib, 'GArrayUpload', getattr(_gclib, '_GArrayUpload@28'))
42 setattr(_gclib, 'GClose', getattr(_gclib, '_GClose@4'))
43 setattr(_gclib, 'GCommand', getattr(_gclib, '_GCommand@20'))
44 setattr(_gclib, 'GFirmwareDownload', getattr(_gclib, '_GFirmwareDownload@8'))
45 setattr(_gclib, 'GInterrupt', getattr(_gclib, '_GInterrupt@8'))
46 setattr(_gclib, 'GMessage', getattr(_gclib, '_GMessage@12'))
47 setattr(_gclib, 'GOpen', getattr(_gclib, '_GOpen@8'))
48 setattr(_gclib, 'GProgramDownload', getattr(_gclib, '_GProgramDownload@12'))
49 setattr(_gclib, 'GProgramUpload', getattr(_gclib, '_GProgramUpload@12'))
50 #gclibo calls (open source component/convenience functions)
51 setattr(_gclibo, 'GAddresses', getattr(_gclibo, '_GAddresses@8'))
52 setattr(_gclibo, 'GArrayDownloadFile', getattr(_gclibo, '_GArrayDownloadFile@8'))
53 setattr(_gclibo, 'GArrayUploadFile', getattr(_gclibo, '_GArrayUploadFile@12'))
54 setattr(_gclibo, 'GAssign', getattr(_gclibo, '_GAssign@8'))
55 setattr(_gclibo, 'GError', getattr(_gclibo, '_GError@12'))
56 setattr(_gclibo, 'GInfo', getattr(_gclibo, '_GInfo@12'))
57 setattr(_gclibo, 'GIpRequests', getattr(_gclibo, '_GIpRequests@8'))
58 setattr(_gclibo, 'GMotionComplete', getattr(_gclibo, '_GMotionComplete@8'))
59 setattr(_gclibo, 'GProgramDownloadFile', getattr(_gclibo, '_GProgramDownloadFile@12'))
60 setattr(_gclibo, 'GSleep', getattr(_gclibo, '_GSleep@4'))
61 setattr(_gclibo, 'GProgramUploadFile', getattr(_gclibo, '_GProgramUploadFile@8'))
62 setattr(_gclibo, 'GTimeout', getattr(_gclibo, '_GTimeout@8'))
63 setattr(_gclibo, 'GVersion', getattr(_gclibo, '_GVersion@8'))
64 setattr(_gclibo, 'GSetupDownloadFile', getattr(_gclibo, '_GSetupDownloadFile@20'))
65 setattr(_gclibo, 'GServerStatus', getattr(_gclibo, '_GServerStatus@8'))
66 setattr(_gclibo, 'GSetServer', getattr(_gclibo, '_GSetServer@4'))
67 setattr(_gclibo, 'GListServers', getattr(_gclibo, '_GListServers@8'))
68 setattr(_gclibo, 'GPublishServer', getattr(_gclibo, '_GPublishServer@12'))
69 setattr(_gclibo, 'GRemoteConnections', getattr(_gclibo, '_GRemoteConnections@8'))
70
71elif platform.system() == 'Linux':
72 cdll.LoadLibrary("libgclib.so.2")
73 _gclib = CDLL("libgclib.so.2")
74 cdll.LoadLibrary("libgclibo.so.2")
75 _gclibo = CDLL("libgclibo.so.2")
76
77elif platform.system() == 'Darwin': #OSX
78 _gclib_path = '/Applications/gclib/dylib/gclib.0.dylib'
79 _gclibo_path = '/Applications/gclib/dylib/gclibo.0.dylib'
80 cdll.LoadLibrary(_gclib_path)
81 _gclib = CDLL(_gclib_path)
82 cdll.LoadLibrary(_gclibo_path)
83 _gclibo = CDLL(_gclibo_path)
84
85
86
87# Python "typedefs"
88_GReturn = c_int #type for a return code
89_GCon = c_void_p #type for a Galil connection handle
90_GCon_ptr = POINTER(_GCon) #used for argtypes declaration
91_GSize = c_ulong #type for a Galil size variable
92_GSize_ptr = POINTER(_GSize) #used for argtypes declaration
93_GCStringIn = c_char_p #char*. In C it's const.
94_GCStringOut = c_char_p #char*
95_GOption = c_int #type for option variables, e.g. GArrayDownload
96_GStatus = c_ubyte #type for interrupt status bytes
97_GStatus_ptr = POINTER(_GStatus) #used for argtypes declaration
98
99#Define arguments and result type (if not C int type)
100#gclib calls
101_gclib.GArrayDownload.argtypes = [_GCon, _GCStringIn, _GOption, _GOption, _GCStringIn]
102_gclib.GArrayUpload.argtypes = [_GCon, _GCStringIn, _GOption, _GOption, _GOption, _GCStringOut, _GSize]
103_gclib.GClose.argtypes = [_GCon]
104_gclib.GCommand.argtypes = [_GCon, _GCStringIn, _GCStringOut, _GSize, _GSize_ptr]
105_gclib.GFirmwareDownload.argtypes = [_GCon, _GCStringIn]
106_gclib.GInterrupt.argtypes = [_GCon, _GStatus_ptr]
107_gclib.GMessage.argtypes = [_GCon, _GCStringOut, _GSize]
108_gclib.GOpen.argtypes = [_GCStringIn, _GCon_ptr]
109_gclib.GProgramDownload.argtypes = [_GCon, _GCStringIn, _GCStringIn]
110_gclib.GProgramUpload.argtypes = [_GCon, _GCStringOut, _GSize]
111#gclibo calls (open source component/convenience functions)
112_gclibo.GAddresses.argtypes = [_GCStringOut, _GSize]
113_gclibo.GArrayDownloadFile.argtypes = [_GCon, _GCStringIn]
114_gclibo.GArrayUploadFile.argtypes = [_GCon, _GCStringIn, _GCStringIn]
115_gclibo.GAssign.argtypes = [_GCStringIn, _GCStringIn]
116_gclibo.GError.argtypes = [_GReturn, _GCStringOut, _GSize]
117_gclibo.GError.restype = None
118_gclibo.GError.argtypes = [_GCon, _GCStringOut, _GSize]
119_gclibo.GIpRequests.argtypes = [_GCStringOut, _GSize]
120_gclibo.GMotionComplete.argtypes = [_GCon, _GCStringIn]
121_gclibo.GProgramDownloadFile.argtypes = [_GCon, _GCStringIn, _GCStringIn]
122_gclibo.GSleep.argtypes = [c_uint]
123_gclibo.GSleep.restype = None
124_gclibo.GProgramUploadFile.argtypes = [_GCon, _GCStringIn]
125_gclibo.GTimeout.argtypes = [_GCon, c_int]
126_gclibo.GVersion.argtypes = [_GCStringOut, _GSize]
127_gclibo.GServerStatus.argtypes = [_GCStringOut, _GSize]
128_gclibo.GSetServer.argtypes = [_GCStringIn]
129_gclibo.GListServers.argtypes = [_GCStringOut, _GSize]
130_gclibo.GPublishServer.argtypes = [_GCStringIn, _GOption, _GOption]
131_gclibo.GRemoteConnections.argtypes = [_GCStringOut, _GSize]
132_gclibo.GSetupDownloadFile.argtypes = [_GCon, _GCStringIn, _GOption, _GCStringOut, _GSize]
133
134#Set up some constants
135_enc = "ASCII" #byte encoding for going between python strings and c strings.
136_buf_size = 500000 #size of response buffer. Big enough to fit entire 4000 program via UL/LS, or 24000 elements of array data.
137_error_buf = create_string_buffer(128) #buffer for retrieving error code descriptions.
138
139def _rc(return_code):
140 """Checks return codes from gclib and raises a python error if result is exceptional."""
141 if return_code != 0:
142 _gclibo.GError(return_code, _error_buf, 128) #Get the library's error description
143 raise GclibError(str(_error_buf.value.decode(_enc)))
144 return
145
146class GclibError(Exception):
147 """@ingroup python
148 Error class for non-zero gclib return codes.
149 """
150 pass
151
152class py:
153 """
154 Represents a single Python connection to a Galil Controller or PLC.
155 """
156
157 def __init__(self):
158 """Constructor for the Connection class. Initializes gclib's handle and read buffer."""
159 self._gcon = _GCon(0) #handle to connection
160 self._buf = create_string_buffer(_buf_size)
161 self._timeout = 5000
162 return
163
164 def __del__(self):
165 """Destructor for the Connection class. Ensures close gets called to release Galil resource (Sockets, Kernel Driver, Com Port, etc)."""
166 self.GClose()
167 return
168
169 def _cc(self):
170 """Checks if connection is established, throws error if not."""
171 if self._gcon.value == None:
172 _rc(-1201) #G_CONNECTION_NOT_ESTABLISHED
173
174 def GOpen(self, address):
175 """@ingroup py_connection
176 Opens a connection a galil controller.
177 See the gclib docs for address string formatting.
178 """
179 c_address = _GCStringIn(address.encode(_enc))
180 _rc(_gclib.GOpen(c_address, byref(self._gcon)))
181 return
182
183
184 def GClose(self):
185 """@ingroup py_connection
186 Closes a connection to a Galil Controller.
187 """
188 if self._gcon.value != None:
189 _rc(_gclib.GClose(self._gcon))
190 self._gcon = _GCon(0)
191 return
192
193
194 def GCommand(self, command):
195 """@ingroup py_controller
196 Performs a command-and-response transaction on the connection.
197 Trims the response.
198 """
199 self._cc()
200 c_command = _GCStringIn(command.encode(_enc))
201 _rc(_gclib.GCommand(self._gcon, c_command, self._buf, _buf_size, None))
202 response = str(self._buf.value.decode(_enc))
203 return response[:-3].strip() # trim trailing /r/n: and leading space
204
205
206 def GSleep(self, val):
207 """@ingroup python
208 Provides a blocking sleep call which can be useful for timing-based chores.
209 """
210 _gclibo.GSleep(val)
211 return
212
213
214 def GVersion(self):
215 """@ingroup python
216 Provides the gclib version number. Please include the output of this function on all support cases.
217 """
218 _rc(_gclibo.GVersion(self._buf, _buf_size))
219 return "py." + str(self._buf.value.decode(_enc))
220
221 def GServerStatus(self):
222 """@ingroup py_remote
223 Provides the local server name and whether it is published to the local network.
224 """
225 _rc(_gclibo.GServerStatus(self._buf, _buf_size))
226 return str(self._buf.value.decode(_enc))
227
228 def GSetServer(self, server_name):
229 """@ingroup py_remote
230 Set the new active server.
231 """
232 c_server_name = _GCStringIn(server_name.encode(_enc))
233 _rc(_gclibo.GSetServer(c_server_name))
234 return
235
236 def GListServers(self):
237 """@ingroup py_remote
238 Provide a list of all available gcaps servers on the local network.
239 """
240 _rc(_gclibo.GListServers(self._buf, _buf_size))
241 return str(self._buf.value.decode(_enc))
242
243 def GPublishServer(self, server_name, publish, save):
244 """@ingroup py_remote
245 Publish local gcaps server to the network.
246 """
247 c_server_name = _GCStringIn(server_name.encode(_enc))
248 _rc(_gclibo.GPublishServer(c_server_name, publish, save))
249 return
250
252 """@ingroup py_remote
253 Shows all remote addresses that are connected to the local server.
254 """
255 _rc(_gclibo.GRemoteConnections(self._buf, _buf_size))
256 return str(self._buf.value.decode(_enc))
257
258 def GInfo(self):
259 """@ingroup py_connection
260 Provides a useful connection string. Please include the output of this function on all support cases.
261 """
262 _rc(_gclibo.GInfo(self._gcon, self._buf, _buf_size))
263 return str(self._buf.value.decode(_enc))
264
265
266 def GIpRequests(self):
267 """@ingroup py_connection
268 Provides a dictionary of all Galil controllers requesting IP addresses via BOOT-P or DHCP.
269
270 Returns a dictionary mapping 'model-serial' --> 'mac address'
271 e.g. {'DMC4000-783': '00:50:4c:20:03:0f', 'DMC4103-9998': '00:50:4c:38:27:0e'}
272
273 Linux/OS X users must be root to use GIpRequests() and have UDP access to bind and listen on port 67.
274 """
275 _rc(_gclibo.GIpRequests(self._buf, _buf_size)) #get the c string from gclib
276 ip_req_dict = {}
277 for line in str(self._buf.value.decode(_enc)).splitlines():
278 line = line.replace(' ', '') #trim spaces throughout
279 if (line == ""): continue
280 fields = line.split(',')
281 #fields go [model, serial number, mac]
282 ip_req_dict[fields[0] + '-' + fields[1]] = fields[2] # e.g. DMC4000-783 maps to its MAC addr.
283 return ip_req_dict
284
285
286 def GAssign(self, ip, mac):
287 """@ingroup py_connection
288 Assigns IP address over the Ethernet to a controller at a given MAC address.
289 Linux/OS X users must be root to use GAssign() and have UDP access to send on port 68.
290 """
291 c_ip = _GCStringIn(ip.encode(_enc))
292 c_mac = _GCStringIn(mac.encode(_enc))
293 _rc(_gclibo.GAssign(c_ip, c_mac))
294 return
295
296
297 def GAddresses(self):
298 """@ingroup py_connection
299 Provides a dictionary of all available connection addresses.
300
301 Returns a dictionary mapping 'address' -> 'revision reports', where possible
302 e.g. {}
303 """
304 _rc(_gclibo.GAddresses(self._buf, _buf_size))
305 addr_dict = {}
306 for line in str(self._buf.value.decode(_enc)).splitlines():
307 fields = line.split(',')
308 if len(fields) >= 2:
309 addr_dict[fields[0]] = fields[1]
310 else:
311 addr_dict[fields[0]] = ''
312
313 return addr_dict
314
315
316 def GProgramDownload(self, program, preprocessor=""):
317 """@ingroup py_memory
318 Downloads a program to the controller's program buffer.
319 See the gclib docs for preprocessor options.
320 """
321 self._cc()
322 c_prog = _GCStringIn(program.encode(_enc))
323 c_pre = _GCStringIn(preprocessor.encode(_enc))
324 _rc(_gclib.GProgramDownload(self._gcon, c_prog, c_pre))
325 return
326
327
328 def GProgramUpload(self):
329 """@ingroup py_memory
330 Uploads a program from the controller's program buffer.
331 """
332 self._cc()
333 _rc(_gclib.GProgramUpload(self._gcon, self._buf, _buf_size))
334 return str(self._buf.value.decode(_enc))
335
336
337 def GProgramDownloadFile(self, file_path, preprocessor=""):
338 """@ingroup py_memory
339 Program download from file.
340 See the gclib docs for preprocessor options.
341 """
342 self._cc()
343 c_path = _GCStringIn(file_path.encode(_enc))
344 c_pre = _GCStringIn(preprocessor.encode(_enc))
345 _rc(_gclibo.GProgramDownloadFile(self._gcon, c_path, c_pre))
346 return
347
348 def GProgramUploadFile(self, file_path):
349 """@ingroup py_memory
350 Program upload to file.
351 """
352 self._cc()
353 c_path = _GCStringIn(file_path.encode(_enc))
354 _rc(_gclibo.GProgramUploadFile(self._gcon, c_path))
355 return
356
357 def GArrayDownload(self, name, first, last, array_data):
358 """@ingroup py_memory
359 Downloads array data to a pre-dimensioned array in the controller's array table.
360 array_data should be a list of values (e.g. int or float)
361 """
362 self._cc()
363 c_name = _GCStringIn(name.encode(_enc))
364 array_string = ""
365 for val in array_data:
366 array_string += str(val) + ","
367 c_data = _GCStringIn(array_string[:-1].encode(_enc)) #trim trailing command
368 _rc(_gclib.GArrayDownload(self._gcon, c_name, first, last, c_data))
369 return
370
371
372 def GArrayUploadFile(self, file_path, names = []):
373 """@ingroup py_memory
374 Uploads the entire controller array table or a subset and saves the data as a csv file specified by file_path.
375 names is optional and should be a list of array names on the controller.
376 """
377 self._cc()
378 c_path = _GCStringIn(file_path.encode(_enc))
379 names_string = ''
380 c_names = _GCStringIn(''.encode(_enc)) #in case empty list provided
381 for name in names:
382 names_string += name + ' '
383
384 c_names = _GCStringIn(names_string[:-1].encode(_enc)) #trim trailing space
385 _rc(_gclibo.GArrayUploadFile(self._gcon, c_path, c_names))
386 return
387
388
389 def GArrayDownloadFile(self, file_path):
390 """@ingroup py_memory
391 Downloads a csv file containing array data at file_path.
392 """
393 self._cc()
394 c_path = _GCStringIn(file_path.encode(_enc))
395 _rc(_gclibo.GArrayDownloadFile(self._gcon, c_path))
396 return
397
398
399 def GArrayUpload(self, name, first, last):
400 """@ingroup py_memory
401 Uploads array data from the controller's array table.
402 """
403 self._cc()
404 c_name = _GCStringIn(name.encode(_enc))
405 _rc(_gclib.GArrayUpload(self._gcon, c_name, first, last, 1, self._buf, _buf_size)) #1 is comma delimiter
406 string_list = str(self._buf.value.decode(_enc)).split(',')
407 float_list = []
408 for s in string_list:
409 float_list.append(float(s))
410 return float_list
411
412
413 def GTimeout(self, timeout):
414 """@ingroup py_connection
415 Set the library timeout. Set to -1 to use the initial library timeout, as specified in GOpen.
416 """
417 self._cc()
418 _rc(_gclibo.GTimeout(self._gcon, timeout))
419 self._timeout = timeout
420 return
421
422
423 @property
424 def timeout(self):
425 """@ingroup py_connection
426 Convenience property read access to timeout value. If -1, gclib uses the initial library timeout, as specified in GOpen.
427 """
428 return self._timeout
429
430 @timeout.setter
431 def timeout(self, timeout):
432 """@ingroup py_connection
433 Convenience property write access to timeout value. Set to -1 to use the initial library timeout, as specified in GOpen.
434 """
435 self.GTimeout(timeout)
436 return
437
438
439 def GFirmwareDownload(self, file_path):
440 """@ingroup py_memory
441 Upgrade firmware.
442 """
443 self._cc()
444 c_path = _GCStringIn(file_path.encode(_enc))
445 _rc(_gclib.GFirmwareDownload(self._gcon, c_path))
446 return
447
448
449 def GMessage(self):
450 """@ingroup py_unsolicited
451 Provides access to unsolicited messages from the controller.
452 """
453 self._cc()
454 _rc(_gclib.GMessage(self._gcon, self._buf, _buf_size))
455 return str(self._buf.value.decode(_enc))
456
457
458 def GMotionComplete(self, axes):
459 """@ingroup py_controller
460 Blocking call that returns once all axes specified have completed their motion.
461 """
462 self._cc()
463 c_axes = _GCStringIn(axes.encode(_enc))
464 _rc(_gclibo.GMotionComplete(self._gcon, c_axes))
465 return
466
467 def GInterrupt(self):
468 """@ingroup py_unsolicited
469 Provides access to PCI and UDP interrupts from the controller.
470 """
471 self._cc()
472 status = _GStatus(0)
473 _rc(_gclib.GInterrupt(self._gcon, byref(status)))
474 return status.value
475
476 def GSetupDownloadFile(self, file_path, options):
477 """@ingroup py_memory
478 Downloads specified sectors from a Galil compressed backup (gcb) file to a controller.
479
480 Returns a dictionary with the controller information stored in the gcb file.
481 If options is specified as 0, an additional "options" key will be in the dictionary indicating the info sectors available in the gcb
482 """
483 self._cc()
484 c_path = _GCStringIn(file_path.encode(_enc))
485
486 rc = _gclibo.GSetupDownloadFile(self._gcon, c_path, options, self._buf, _buf_size)
487 if (options != 0):
488 _rc(rc)
489
490 info_dict = {}
491 for line in str(self._buf.value.decode(_enc)).split("\"\n"):
492 fields = line.split(',',1)
493
494 if (fields[0] == ""): continue
495 elif len(fields) >= 2:
496 info_dict[fields[0].strip("\"\'")] = fields[1].strip("\"\'")
497 else:
498 info_dict[fields[0].strip("\"\'")] = ''
499
500 if (options == 0):
501 info_dict["options"] = rc
502
503 return info_dict
Error class for non-zero gclib return codes.
Definition gclib.py:146
_cc(self)
Checks if connection is established, throws error if not.
Definition gclib.py:169
int _timeout
Definition gclib.py:161
__del__(self)
Destructor for the Connection class.
Definition gclib.py:164
__init__(self)
Constructor for the Connection class.
Definition gclib.py:157
GOpen(self, address)
Opens a connection a galil controller.
Definition gclib.py:174
GTimeout(self, timeout)
Set the library timeout.
Definition gclib.py:413
GInfo(self)
Provides a useful connection string.
Definition gclib.py:258
GAddresses(self)
Provides a dictionary of all available connection addresses.
Definition gclib.py:297
timeout(self)
Convenience property read access to timeout value.
Definition gclib.py:424
GClose(self)
Closes a connection to a Galil Controller.
Definition gclib.py:184
GAssign(self, ip, mac)
Assigns IP address over the Ethernet to a controller at a given MAC address.
Definition gclib.py:286
GIpRequests(self)
Provides a dictionary of all Galil controllers requesting IP addresses via BOOT-P or DHCP.
Definition gclib.py:266
GCommand(self, command)
Performs a command-and-response transaction on the connection.
Definition gclib.py:194
GMotionComplete(self, axes)
Blocking call that returns once all axes specified have completed their motion.
Definition gclib.py:458
GArrayUploadFile(self, file_path, names=[])
Uploads the entire controller array table or a subset and saves the data as a csv file specified by f...
Definition gclib.py:372
GFirmwareDownload(self, file_path)
Upgrade firmware.
Definition gclib.py:439
GSetupDownloadFile(self, file_path, options)
Downloads specified sectors from a Galil compressed backup (gcb) file to a controller.
Definition gclib.py:476
GProgramDownloadFile(self, file_path, preprocessor="")
Program download from file.
Definition gclib.py:337
GArrayDownload(self, name, first, last, array_data)
Downloads array data to a pre-dimensioned array in the controller's array table.
Definition gclib.py:357
GProgramUpload(self)
Uploads a program from the controller's program buffer.
Definition gclib.py:328
GArrayUpload(self, name, first, last)
Uploads array data from the controller's array table.
Definition gclib.py:399
GProgramUploadFile(self, file_path)
Program upload to file.
Definition gclib.py:348
GProgramDownload(self, program, preprocessor="")
Downloads a program to the controller's program buffer.
Definition gclib.py:316
GArrayDownloadFile(self, file_path)
Downloads a csv file containing array data at file_path.
Definition gclib.py:389
GRemoteConnections(self)
Shows all remote addresses that are connected to the local server.
Definition gclib.py:251
GPublishServer(self, server_name, publish, save)
Publish local gcaps server to the network.
Definition gclib.py:243
GListServers(self)
Provide a list of all available gcaps servers on the local network.
Definition gclib.py:236
GSetServer(self, server_name)
Set the new active server.
Definition gclib.py:228
GServerStatus(self)
Provides the local server name and whether it is published to the local network.
Definition gclib.py:221
GInterrupt(self)
Provides access to PCI and UDP interrupts from the controller.
Definition gclib.py:467
GMessage(self)
Provides access to unsolicited messages from the controller.
Definition gclib.py:449
GVersion(self)
Provides the gclib version number.
Definition gclib.py:214
GSleep(self, val)
Provides a blocking sleep call which can be useful for timing-based chores.
Definition gclib.py:206