| gclib 450 Communications API for Galil controllers and PLCs |

gcaps

gcaps is a communication server natively supported by gclib to multiplex Galil hardware communication features. It runs in the background on the host computer, as a service or daemon.

Incidentally, the name gcaps is an acronym for the improbable name Galil Controller Asynchronous Proxy Server. Yet another tidbit to impress friends at parties.

## gclib & gcaps

gclib will attempt to use gcaps whenever GOpen() is called without the `--direct` or `-d` switch. Other than this small difference, gclib function calls through gcaps operate as if the connetion was direct. The first version of gclib supporting gcaps is 299.

At this time, gcaps must be running on the same host as gclib (localhost). Contact Galil if connection to a remote host is desired.

### Other gcaps Usage

The following functions will attempt to use gcaps first to gather data. If gcaps is not found, the functions will fall back to user space calls to populate information.

gclib Function | Usage | If gcaps unavailable
--- | --- | ---
GVersion() | Provide the version of gclib and gcaps (if available). | No gcaps version.
GIpRequests() | Provide a list of all Galil controllers requesting IP addresses via BOOT-P or DHCP. | Must be root.
GAssign() | Assigns an IP address over the Ethernet to a controller at a given MAC address. | Must be root.
GAddresses() | Provides a listing of all available connection addresses. | Must be root, or user must be in device group.

Because gcaps runs as a service on Windows, and as a system daemon on Linux, gcaps runs with root privileges. See If gcaps unavailable column in the above table when running without gcaps.

If gcaps is unavailable when these functions are run, a ~1 second delay will be incurred while gclib searches for the absent server. In order to prevent gcaps usage in these functions, comment out the symbol G_USE_GCAPS in gclibo.h and rebuild gclibo. See Rebuilding gclibo.

## gcaps Benefits

- Connections through gcaps multiplex a single connection resource. This means that single-channel connection protocols like USB, RS232, or PCI can be shared with as many simultaneous connections as needed. Furthermore, Ethernet-based connections with gcaps leave plenty of Ethernet handles available for other communications, such as MODBUS.
- All communications features are available to all connecting clients. This means that a software application can be running simultaneosly with Galil's diagnostic software (Galil Design Kit). This significantly simplifies support and aides in debugging.
- Data Records, Messages, and Interrupts everywhere. No longer does one connection steal data streams from another.
- gcaps runs as a service providing more capabilities than a user space application. This allows functions like GIpRequests() and GAssign() to operate from a gclib application without root privileges.

## gcaps Installation

See the installation page to see if gcaps is available on your OS. Support is marked with a diamond (♦).

If gcaps is needed on a different OS, please email softw.nosp@m.ares.nosp@m.uppor.nosp@m.t@ga.nosp@m.lil.c.nosp@m.om, or call Galil Applications.

### Windows

gcaps is bundled in the gclib and GDK installer packages. Install with defaults to get the gcaps service included. gcaps is also available as a standalone installer. Downloads are available on the release notes page.

gcaps is currently available only on 64 bit Windows.

### Linux

Instructions to install gcaps are listed with the instructions to install gclib. Follow the link for your OS on the installation page.

gcaps is currently available only on 64 bit versions of Linux.

## Changes and updates to gcaps

See the release notes page.