gclib 2.4.0
Galil Communications Library
Loading...
Searching...
No Matches
Data Record

Used to get values from a data record handle. More...

Topics

 Amp
 Amp error statuses.
 Axis
 Axis-specific values, such as position or torque.
 Coordinated Move
 Coordinated move values, relevant for LM and CM modes of motion.

Typedefs

typedef enum gclib_mode_of_motion_t gclib_mode_of_motion_t
 The controller's current mode of motion, given by gclib_data_record_mode_of_motion().
typedef enum gclib_ethernet_status_t gclib_ethernet_status_t
 The current status of an ethernet handle, given by gclib_data_record_ethernet_status().

Enumerations

enum  gclib_mode_of_motion_t {
  GCLIB_NO_MOTION , GCLIB_CONTOUR , GCLIB_POSITION_ABSOLUTE , GCLIB_POSITION_RELATIVE ,
  GCLIB_FIND_EDGE , GCLIB_FIND_INDEX , GCLIB_HOME , GCLIB_VECTOR_MOVE ,
  GCLIB_LINEAR_MOVE = GCLIB_VECTOR_MOVE
}
 The controller's current mode of motion, given by gclib_data_record_mode_of_motion(). More...
enum  gclib_ethernet_status_t {
  HANDLE_FREE = 0 , UDP_SLAVE = 1 , TCP_SLAVE = 2 , UDP_MASTER = -1 ,
  TCP_MASTER = -2 , ESTABLISHING_UDP = -5 , ESTABLISHING_TCP = -6
}
 The current status of an ethernet handle, given by gclib_data_record_ethernet_status(). More...

Functions

uint16_t gclib_data_record_sample (gclib_data_record_handle h)
 The sample in which this data record was generated.
bool gclib_data_record_input (gclib_data_record_handle h, size_t index)
 Get an input.
bool gclib_data_record_output (gclib_data_record_handle h, size_t index)
 Get an output.
uint8_t gclib_data_record_input_bank (gclib_data_record_handle h, size_t index)
 Get a bank of inputs.
uint8_t gclib_data_record_output_bank (gclib_data_record_handle h, size_t index)
 Get a bank of outputs.
uint8_t gclib_data_record_error_code (gclib_data_record_handle h)
 Get the error code.
uint32_t gclib_data_record_contour_segment_count (gclib_data_record_handle h)
 Get the contour segment count.
uint16_t gclib_data_record_contour_buffer_available (gclib_data_record_handle h)
 Get remaining contour buffer.
bool gclib_data_record_thread_running (gclib_data_record_handle h, size_t thread)
 Returns true if a given thread is running.
gclib_ethernet_status_t gclib_data_record_ethernet_status (gclib_data_record_handle h, char handle)
 Get ethernet handle status.
gclib_result gclib_data_record_bytes (gclib_data_record_handle h, char *data_record, size_t len)
 Copy data record to user buffer.

Detailed Description

Used to get values from a data record handle.

For obtaining data records, see gclib_subscribe_data_records().

Typedef Documentation

◆ gclib_mode_of_motion_t

The controller's current mode of motion, given by gclib_data_record_mode_of_motion().

◆ gclib_ethernet_status_t

The current status of an ethernet handle, given by gclib_data_record_ethernet_status().

Enumeration Type Documentation

◆ gclib_mode_of_motion_t

The controller's current mode of motion, given by gclib_data_record_mode_of_motion().

Enumerator
GCLIB_NO_MOTION 
GCLIB_CONTOUR 
GCLIB_POSITION_ABSOLUTE 
GCLIB_POSITION_RELATIVE 
GCLIB_FIND_EDGE 
GCLIB_FIND_INDEX 
GCLIB_HOME 
GCLIB_VECTOR_MOVE 
GCLIB_LINEAR_MOVE 

Definition at line 601 of file gclib.h.

◆ gclib_ethernet_status_t

The current status of an ethernet handle, given by gclib_data_record_ethernet_status().

Enumerator
HANDLE_FREE 
UDP_SLAVE 
TCP_SLAVE 
UDP_MASTER 
TCP_MASTER 
ESTABLISHING_UDP 
ESTABLISHING_TCP 

Definition at line 614 of file gclib.h.

Function Documentation

◆ gclib_data_record_sample()

uint16_t gclib_data_record_sample ( gclib_data_record_handle h)

The sample in which this data record was generated.

◆ gclib_data_record_input()

bool gclib_data_record_input ( gclib_data_record_handle h,
size_t index )

Get an input.

Generally, controllers have 8 inputs and outputs per axis bank.

Note
Inputs are active low, meaning this function returns true if current is NOT flowing.
Parameters
hA data record handle.
indexThe index of the input to check. Starts at 1.
Returns
true if input is active.

◆ gclib_data_record_output()

bool gclib_data_record_output ( gclib_data_record_handle h,
size_t index )

Get an output.

◆ gclib_data_record_input_bank()

uint8_t gclib_data_record_input_bank ( gclib_data_record_handle h,
size_t index )

Get a bank of inputs.

◆ gclib_data_record_output_bank()

uint8_t gclib_data_record_output_bank ( gclib_data_record_handle h,
size_t index )

Get a bank of outputs.

◆ gclib_data_record_error_code()

uint8_t gclib_data_record_error_code ( gclib_data_record_handle h)

Get the error code.

◆ gclib_data_record_contour_segment_count()

uint32_t gclib_data_record_contour_segment_count ( gclib_data_record_handle h)

Get the contour segment count.

◆ gclib_data_record_contour_buffer_available()

uint16_t gclib_data_record_contour_buffer_available ( gclib_data_record_handle h)

Get remaining contour buffer.

◆ gclib_data_record_thread_running()

bool gclib_data_record_thread_running ( gclib_data_record_handle h,
size_t thread )

Returns true if a given thread is running.

◆ gclib_data_record_ethernet_status()

gclib_ethernet_status_t gclib_data_record_ethernet_status ( gclib_data_record_handle h,
char handle )

Get ethernet handle status.

Parameters
hdata record handle.
handleThe ethernet handle to check, A - H.
Returns
gclib_ethernet_status_t The ethernet handle status.

◆ gclib_data_record_bytes()

gclib_result gclib_data_record_bytes ( gclib_data_record_handle h,
char * data_record,
size_t len )

Copy data record to user buffer.

Useful if your device has a nonstandard data record.

Parameters
hdata record handle.
data_recordpointer to user buffer.
lensize of user buffer.
Returns
GCLIB_BUFFER_TOO_SMALL if output does not fit in buffer.