gclib 2.5.0
Galil Communications Library
Loading...
Searching...
No Matches
C

Topics

 Connection
 Controller

Classes

struct  gclib_interrupt_t
 An interrupt generated by the controller. More...

Typedefs

typedef struct gclib_context * gclib_handle
 A handle to an open connection given by gclib_open() for use in future API calls.
typedef void * gclib_data_record_handle
 A handle to a data record, for use in Data Record API calls.
typedef enum gclib_result gclib_result
typedef enum gclib_interrupt_type gclib_interrupt_type
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
}
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
}
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.

Detailed Description

Typedef Documentation

◆ gclib_handle

typedef struct gclib_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 void* 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

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

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

◆ gclib_axis_flags

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

Enumeration Type Documentation

◆ 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

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

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

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
versionOutput buffer for gclib library version.
lenLength 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_versionOutput buffer for gcaps library version.
lenLength of output buffer.
Returns
GCLIB_NOT_CONNECTED if unable to reach gcaps