| gclib 2.4.1 Galil Communications Library

Loading...
Searching...
No Matches
Topics | Functions
Controller
C

Manage a Galil controller More...

## Topics
| Data Record
| Used to get values from a data record handle.
| Memory
| Manage controller firmware, program, and arrays.
| Unsolicited Data
| Get unsolicited messages, interrupts, or data records, in blocking or callback mode.

## Functions
gclib_result | gclib_revision_information (gclib_handle h, char *rev_info, size_t len)
| Get revision information (^R^V) from controller.
gclib_result | gclib_serial_number (gclib_handle h, uint32_t *serial_number)
| Get serial number from controller.
gclib_result | gclib_command (gclib_handle h, const char *command, char *buf, size_t len)
| Issues a command to the controller and provides the response.
void | gclib_set_compat ()
gclib_result | gclib_set_timeout (gclib_handle h, size_t timeout)

## Detailed Description

Manage a Galil controller

## Function Documentation

## ◆ gclib_revision_information()

gclib_result gclib_revision_information | ( | gclib_handle | h,
|  | char * | rev_info,
|  | size_t | len )

Get revision information (^R^V) from controller.

Parameters

  h | Handle to an open connection.
  rev_info | Output buffer for revision information.
  len | Size of output buffer.

Returns
  - GCLIB_INVALID_ARGUMENT if handle is NULL.
  - GCLIB_NOT_CONNECTED if not connected.
  - GCLIB_BUFFER_TOO_SMALL if output does not fit in buffer.

## ◆ gclib_serial_number()

gclib_result gclib_serial_number | ( | gclib_handle | h,
|  | uint32_t * | serial_number )

Get serial number from controller.

Parameters

  h | Handle to an open connection.
  serial_number | Will be set to the serial number of the controller, or 0 on failure.

Returns
  GCLIB_INTERNAL_ERROR if serial number could not be retrieved.

## ◆ gclib_command()

gclib_result gclib_command | ( | gclib_handle | h,
|  | const char * | command,
|  | char * | buf,
|  | size_t | len )

Issues a command to the controller and provides the response.

Note that a single command cannot be longer than 80 characters, similar to a program line.

Parameters

  h | Handle to an open connection.
  command | Command to be sent to the controller. Will be terminated with a carriage return.
  buf | Output buffer for controller response.
  len | Length of output buffer.

Returns
  - GCLIB_TIMEOUT if no response is received from the controller.
  - GCLIB_COMMAND_ERROR if the controller responds with ?
  - `GCLIB_BUFFER_TOO_SMALL if the command response cannot fit in the provided buffer.

## ◆ gclib_set_compat()

void gclib_set_compat | ( |  | ) |

## ◆ gclib_set_timeout()

gclib_result gclib_set_timeout | ( | gclib_handle | h,
|  | size_t | timeout )