| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Topics | Classes | Typedefs | Enumerations | Enumerator | Functions | Variables
C

## Topics
| Connection
| Discover available controllers and open connections
| Controller
| Manage a Galil controller

## Classes
struct | gclib_interrupt_t
| An interrupt generated by the controller. More...

## Typedefs
typedef struct Context * | gclib_handle
| A handle to an open connection given by gclib_open() for use in future API calls.
typedef struct DataRecord * | gclib_data_record_handle
| A handle to a data record, for use in Data Record API calls.
typedef enum gclib_result | gclib_result
| All gclib function return values.
typedef enum gclib_interrupt_type | gclib_interrupt_type
| All interrupt status types.
typedef struct gclib_interrupt_t | gclib_interrupt_t
| An interrupt generated by the controller.
typedef enum gclib_digital_input_flags | gclib_digital_input_flags
| Flags to enable or disable GCLIB_DIGITAL_INPUT_LOW interrupts per digital input, for use in gclib_set_interrupts().
typedef enum gclib_axis_flags | gclib_axis_flags
| Flags for building an axis mask, for example in gclib_set_interrupts().

## Enumerations
enum | gclib_result { GCLIB_SUCCESS , GCLIB_INVALID_ARGUMENT , GCLIB_INTERNAL_ERROR , GCLIB_TIMEOUT , GCLIB_COMMAND_ERROR , GCLIB_BUFFER_TOO_SMALL , GCLIB_NOT_CONNECTED , GCLIB_NOT_SUBSCRIBED }
| All gclib function return values. More...
enum | gclib_interrupt_type { GCLIB_NO_INTERRUPTS = 0 , GCLIB_USER_INTERRUPT = 0 , GCLIB_MOTION_COMPLETE = 1 << 0 , GCLIB_ALL_AXES_MOTION_COMPLETE = 1 << 8 , GCLIB_EXCESS_POSITION_ERROR = 1 << 9 , GCLIB_LIMIT_SWITCH = 1 << 10 , GCLIB_WATCHDOG_TIMER = 1 << 11 , GCLIB_PROGRAM_STOPPED = 1 << 13 , GCLIB_COMMAND_DONE = 1 << 14 , GCLIB_DIGITAL_INPUT_LOW = 1 << 15 , GCLIB_ALL_INTERRUPTS = (1 << 16) - 1 }
| All interrupt status types. More...
enum | gclib_digital_input_flags { GCLIB_NO_DIGITAL_INPUTS = 0 , GCLIB_DIGITAL_INPUT_1 = 1 << 0 , GCLIB_DIGITAL_INPUT_2 = 1 << 1 , GCLIB_DIGITAL_INPUT_3 = 1 << 2 , GCLIB_DIGITAL_INPUT_4 = 1 << 3 , GCLIB_DIGITAL_INPUT_5 = 1 << 4 , GCLIB_DIGITAL_INPUT_6 = 1 << 5 , GCLIB_DIGITAL_INPUT_7 = 1 << 6 , GCLIB_DIGITAL_INPUT_8 = 1 << 7 , GCLIB_ALL_DIGITAL_INPUTS = (1 << 8) - 1 }
| Flags to enable or disable GCLIB_DIGITAL_INPUT_LOW interrupts per digital input, for use in gclib_set_interrupts(). More...
enum | gclib_axis_flags { GCLIB_NO_AXES = 0 , GCLIB_AXIS_A = 1 << 0 , GCLIB_AXIS_B = 1 << 1 , GCLIB_AXIS_C = 1 << 2 , GCLIB_AXIS_D = 1 << 3 , GCLIB_AXIS_E = 1 << 4 , GCLIB_AXIS_F = 1 << 5 , GCLIB_AXIS_G = 1 << 6 , GCLIB_AXIS_H = 1 << 7 , GCLIB_ALL_AXES = (1 << 8) - 1 }
| Flags for building an axis mask, for example in gclib_set_interrupts(). More...

## Functions
gclib_result | gclib_version (char *version, size_t len)
| Get library version.
gclib_result | gclib_gcaps_version (char *gcaps_version, size_t len)
| Get library version used by current gcaps server.

## Variables
gclib_interrupt_type | gclib_interrupt_t::type
char gclib_interrupt_t::axis |
| If type is GCLIB_MOTION_COMPLETE, holds the axis that triggered the interrupt. More...
uint8_t gclib_interrupt_t::digital_input |
| If type is GCLIB_DIGITAL_INPUT_LOW, holds the digital input that triggered the interrupt. More...
uint8_t gclib_interrupt_t::user_interrupt |
| If type is GCLIB_USER_INTERRUPT, holds the user input that was triggered. More...
union { |
char gclib_interrupt_t::axis |
| If type is GCLIB_MOTION_COMPLETE, holds the axis that triggered the interrupt. More...
uint8_t gclib_interrupt_t::digital_input |
| If type is GCLIB_DIGITAL_INPUT_LOW, holds the digital input that triggered the interrupt. More...
uint8_t gclib_interrupt_t::user_interrupt |
| If type is GCLIB_USER_INTERRUPT, holds the user input that was triggered. More...
}; |
uint8_t | gclib_interrupt_t::status
| The raw status byte generated by the controller. See the EI command reference for all possible values.

## Detailed Description

## Typedef Documentation

## ◆ gclib_handle

typedef struct Context* gclib_handle

A handle to an open connection given by gclib_open() for use in future API calls.

Definition at line 23 of file gclib.h.

## ◆ gclib_data_record_handle

typedef struct DataRecord* gclib_data_record_handle

A handle to a data record, for use in Data Record API calls.

Definition at line 25 of file gclib.h.

## ◆ gclib_result

typedef enum gclib_result gclib_result

All gclib function return values.

See gclib_error() for a more detailed error string.

## ◆ gclib_interrupt_type

typedef enum gclib_interrupt_type gclib_interrupt_type

All interrupt status types.

Used in gclib_set_interrupts() to configure which interrupts should be generated by the controller, and in gclib_interrupt_t once an interrupt has been read from the controller.

## ◆ gclib_interrupt_t

typedef struct gclib_interrupt_t gclib_interrupt_t

An interrupt generated by the controller.

## ◆ gclib_digital_input_flags

typedef enum gclib_digital_input_flags gclib_digital_input_flags

Flags to enable or disable GCLIB_DIGITAL_INPUT_LOW interrupts per digital input, for use in gclib_set_interrupts().

## ◆ gclib_axis_flags

typedef enum gclib_axis_flags gclib_axis_flags

Flags for building an axis mask, for example in gclib_set_interrupts().

## Enumeration Type Documentation

## ◆ gclib_result

enum gclib_result

All gclib function return values.

See gclib_error() for a more detailed error string.

Enumerator
GCLIB_SUCCESS |
GCLIB_INVALID_ARGUMENT |
GCLIB_INTERNAL_ERROR |
GCLIB_TIMEOUT |
GCLIB_COMMAND_ERROR |
GCLIB_BUFFER_TOO_SMALL |
GCLIB_NOT_CONNECTED |
GCLIB_NOT_SUBSCRIBED |

Definition at line 29 of file gclib.h.

## ◆ gclib_interrupt_type

enum gclib_interrupt_type

All interrupt status types.

Used in gclib_set_interrupts() to configure which interrupts should be generated by the controller, and in gclib_interrupt_t once an interrupt has been read from the controller.

Enumerator
GCLIB_NO_INTERRUPTS |
GCLIB_USER_INTERRUPT |
GCLIB_MOTION_COMPLETE |
GCLIB_ALL_AXES_MOTION_COMPLETE |
GCLIB_EXCESS_POSITION_ERROR | Must be reenabled with gclib_set_interrupts() after occurrence.
GCLIB_LIMIT_SWITCH | Must be reenabled with gclib_set_interrupts() after each occurrence.
GCLIB_WATCHDOG_TIMER |
GCLIB_PROGRAM_STOPPED | If multiple threads are running, this interrupt is only triggered when all threads are finished.
GCLIB_COMMAND_DONE |
GCLIB_DIGITAL_INPUT_LOW | Must be reenabled with gclib_set_interrupts() after each occurrence.
GCLIB_ALL_INTERRUPTS |

Definition at line 41 of file gclib.h.

## ◆ gclib_digital_input_flags

enum gclib_digital_input_flags

Flags to enable or disable GCLIB_DIGITAL_INPUT_LOW interrupts per digital input, for use in gclib_set_interrupts().

Enumerator
GCLIB_NO_DIGITAL_INPUTS |
GCLIB_DIGITAL_INPUT_1 |
GCLIB_DIGITAL_INPUT_2 |
GCLIB_DIGITAL_INPUT_3 |
GCLIB_DIGITAL_INPUT_4 |
GCLIB_DIGITAL_INPUT_5 |
GCLIB_DIGITAL_INPUT_6 |
GCLIB_DIGITAL_INPUT_7 |
GCLIB_DIGITAL_INPUT_8 |
GCLIB_ALL_DIGITAL_INPUTS |

Definition at line 65 of file gclib.h.

## ◆ gclib_axis_flags

enum gclib_axis_flags

Flags for building an axis mask, for example in gclib_set_interrupts().

Enumerator
GCLIB_NO_AXES |
GCLIB_AXIS_A |
GCLIB_AXIS_B |
GCLIB_AXIS_C |
GCLIB_AXIS_D |
GCLIB_AXIS_E |
GCLIB_AXIS_F |
GCLIB_AXIS_G |
GCLIB_AXIS_H |
GCLIB_ALL_AXES |

Definition at line 78 of file gclib.h.

## Function Documentation

## ◆ gclib_version()

gclib_result gclib_version | ( | char * | version,
|  | size_t | len )

Get library version.

Parameters

  version | Output buffer for gclib library version.
  len | Length of output buffer.

Returns
  GCLIB_BUFFER_TOO_SMALL if output does not fit in buffer.

## ◆ gclib_gcaps_version()

gclib_result gclib_gcaps_version | ( | char * | gcaps_version,
|  | size_t | len )

Get library version used by current gcaps server.

Parameters

  gcaps_version | Output buffer for gcaps library version.
  len | Length of output buffer.

Returns
  GCLIB_NOT_CONNECTED if unable to reach gcaps

## Variable Documentation

## ◆ type

gclib_interrupt_type gclib_interrupt_t::type

Definition at line 56 of file gclib.h.

## ◆ axis [1/2]

char gclib_interrupt_t::axis

If type is GCLIB_MOTION_COMPLETE, holds the axis that triggered the interrupt.

Definition at line 58 of file gclib.h.

## ◆ [] [2/2]

char { ... } ::axis

If type is GCLIB_MOTION_COMPLETE, holds the axis that triggered the interrupt.

Definition at line 58 of file gclib.h.

## ◆ digital_input [1/2]

uint8_t gclib_interrupt_t::digital_input

If type is GCLIB_DIGITAL_INPUT_LOW, holds the digital input that triggered the interrupt.

Definition at line 59 of file gclib.h.

## ◆ [] [2/2]

uint8_t { ... } ::digital_input

If type is GCLIB_DIGITAL_INPUT_LOW, holds the digital input that triggered the interrupt.

Definition at line 59 of file gclib.h.

## ◆ user_interrupt [1/2]

uint8_t gclib_interrupt_t::user_interrupt

If type is GCLIB_USER_INTERRUPT, holds the user input that was triggered.

Definition at line 60 of file gclib.h.

## ◆ [] [2/2]

uint8_t { ... } ::user_interrupt

If type is GCLIB_USER_INTERRUPT, holds the user input that was triggered.

Definition at line 60 of file gclib.h.

## ◆ [union]

union { ... } gclib_interrupt_t

## ◆ status

uint8_t gclib_interrupt_t::status

The raw status byte generated by the controller. See the EI command reference for all possible values.

Definition at line 62 of file gclib.h.