| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Classes | Functions
Connection
.NET (C# / VB)

Discover available controllers and open connections. More...

## Classes
class | gclib
| Provides a class that binds to gclib's unmanaged dll. More...

## Functions
string[] | gclib.GAddresses ()
| Return a string array of available connection addresses.
void | gclib.GAssign (string ip, string mac)
| Assigns IP address over the Ethernet to a controller at a given MAC address.
void | gclib.GClose ()
| Used to close a connection to Galil hardware.
string | gclib.GInfo ()
| Provides a useful connection string.
string[] | gclib.GIpRequests ()
| Provides a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP.
void | gclib.GOpen (string address)
| Used to open a connection to Galil hardware.
void | gclib.GTimeout (Int16 timeout_ms)
| Set the timeout of communication transactions.

## Detailed Description

Discover available controllers and open connections.

## Function Documentation

## ◆ GAddresses()

string[] gclib.GAddresses | ( |  | ) |
| inline

Return a string array of available connection addresses.

Returns
  String array containing all available Galil Ethernet controllers, PCI controllers, and COM ports.

Wrapper around gclib GAddresses(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclibo_8h.html#a6a6114683ed5749519b64f19512c24d6 An empty array is returned on error.

Definition at line 79 of file gclib.cs.

## ◆ GAssign()

void gclib.GAssign | ( | string | ip,
|  | string | mac )
| inline

Assigns IP address over the Ethernet to a controller at a given MAC address.

Parameters

  ip | The ip address to assign. The hardware should not yet have an IP address.
  mac | The MAC address of the hardware.

Wrapper around gclib GAssign(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclibo_8h.html#acc996b7c22cfed8e5573d096ef1ab759

Exceptions

  System.Exception | Will throw an exception if anything other than G_NO_ERROR is received from gclib.

Definition at line 206 of file gclib.cs.

## ◆ GClose()

void gclib.GClose | ( |  | ) |
| inline

Used to close a connection to Galil hardware.

Wrapper around gclib GClose(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclib_8h.html#a24a437bcde9637b0db4b94176563a052 Be sure to call GClose() whenever a connection is finished.

Definition at line 222 of file gclib.cs.

## ◆ GInfo()

string gclib.GInfo | ( |  | ) |
| inline

Provides a useful connection string.

Wrapper around gclib GInfo(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclibo_8h.html#a08abfcff8a1a85a01987859473167518

Returns
  String containing connection information, e.g. "192.168.0.43, DMC4020 Rev 1.2c, 291". A null string indicates an error was returned from the library.

Definition at line 333 of file gclib.cs.

## ◆ GIpRequests()

string[] gclib.GIpRequests | ( |  | ) |
| inline

Provides a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP.

Returns
  Each line of the returned data will be of the form "model, serial_number, mac".

Wrapper around gclib GIpRequests(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclibo_8h.html#a0afb4c82642a4ef86f997c39a5518952 An empty array is returned on error. Call will take roughly 5 seconds to return.

Definition at line 377 of file gclib.cs.

## ◆ GOpen()

void gclib.GOpen | ( | string | address | ) |
| inline

Used to open a connection to Galil hardware.

Parameters

  address | Address string including any connection switches. See gclib documentation for GOpen().

Wrapper around gclib GOpen(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclib_8h.html#aef4aec8a85630eed029b7a46aea7db54

Exceptions

  System.Exception | Will throw an exception if anything other than G_NO_ERROR is received from gclib.

Definition at line 439 of file gclib.cs.

## ◆ GTimeout()

void gclib.GTimeout | ( | Int16 | timeout_ms | ) |
| inline

Set the timeout of communication transactions.

Use -1 to set the original timeout from GOpen().

Parameters

  timeout_ms | New timeout in miliseconds.

Wrapper around gclib GTimeout(), http://www.galil.com/sw/pub/all/doc/gclib/html/gclibo_8h.html#a179aa2d1b8e2227944cc06a7ceaf5640

Definition at line 605 of file gclib.cs.