gclib 2.2.1
Galil Communications Library
Loading...
Searching...
No Matches
gclib_errors.h File Reference

Go to the source code of this file.

Macros

#define G_NO_ERROR   0
 Return value if function succeeded.
 
#define G_NO_ERROR_S   "no error"
 
#define G_GCLIB_ERROR   -1
 General library error. Indicates internal API caught an unexpected error. Contact Galil support if this error is returned, softw.nosp@m.ares.nosp@m.uppor.nosp@m.t@ga.nosp@m.lil.c.nosp@m.om.
 
#define G_GCLIB_ERROR_S   "gclib unexpected error"
 
#define G_GCLIB_UTILITY_ERROR   -2
 An invalid request value was specified to GUtility.
 
#define G_GCLIB_UTILITY_ERROR_S   "invalid request value or bad arguments were specified to GUtility()"
 
#define G_GCLIB_UTILITY_IP_TAKEN   -3
 The IP cannot be assigned because ping returned a reply.
 
#define G_GCLIB_UTILITY_IP_TAKEN_S   "ip address is already taken by a device on the network"
 
#define G_GCLIB_NON_BLOCKING_READ_EMPTY   -4
 GMessage, GInterrupt, and GRecord can be called with a zero timeout. If there wasn't data waiting in memory, this error is returned.
 
#define G_GCLIB_NON_BLOCKING_READ_EMPTY_S   "data was not waiting for a zero-timeout read"
 
#define G_GCLIB_POLLING_FAILED   -5
 GWaitForBool out of polling trials.
 
#define G_GCLIB_POLLING_FAILED_S   "exit condition not met in specified polling period"
 
#define G_TIMEOUT   -1100
 Operation timed out. Timeout is set by the –timeout option in GOpen() and can be overriden by GTimeout().
 
#define G_TIMEOUT_S   "device timed out"
 
#define G_OPEN_ERROR   -1101
 Device could not be opened. E.G. Serial port or PCI device already open.
 
#define G_OPEN_ERROR_S   "device failed to open"
 
#define G_ALREADY_OPEN   -1111
 Serial or PCI file has a flock placed on it, presumably by another gclib connection.
 
#define G_ALREADY_OPEN_S   "Serial or PCI port already open"
 
#define G_READ_ERROR   -1103
 Device read failed. E.G. Socket was closed by remote host. See G_UTIL_GCAPS_KEEPALIVE.
 
#define G_READ_ERROR_S   "device read error"
 
#define G_WRITE_ERROR   -1104
 Device write failed. E.G. Socket was closed by remote host. See G_UTIL_GCAPS_KEEPALIVE.
 
#define G_WRITE_ERROR_S   "device write error"
 
#define G_INVALID_PREPROCESSOR_OPTIONS   -1204
 GProgramDownload was called with a bad preprocessor directive.
 
#define G_INVALID_PREPROCESSOR_OPTIONS_S   "preprocessor did not recognize options"
 
#define G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND   -1106
 GCommand() was called with an illegal command, e.g. ED, DL or QD.
 
#define G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND_S   "illegal command passed to command call"
 
#define G_DATA_RECORD_ERROR   -1107
 Data record error, e.g. DR attempted on serial connection.
 
#define G_DATA_RECORD_ERROR_S   "data record error"
 
#define G_UNSUPPORTED_FUNCTION   -1109
 Function cannot be called on this bus. E.G. GInterrupt() on serial.
 
#define G_UNSUPPORTED_FUNCTION_S   "function not supported on this communication bus"
 
#define G_FIRMWARE_LOAD_NOT_SUPPORTED   -1110
 Firmware is not supported on this bus, e.g. Ethernet for the DMC-21x3 series.
 
#define G_FIRMWARE_LOAD_NOT_SUPPORTED_S   "firmware cannot be loaded on this communication bus to this hardware"
 
#define G_ARRAY_NOT_DIMENSIONED   -1200
 Array operation was called on an array that was not in the controller's array table, see LA command.
 
#define G_ARRAY_NOT_DIMENSIONED_S   "array not dimensioned on controller or wrong size"
 
#define G_CONNECTION_NOT_ESTABLISHED   -1201
 Function was called with no connection.
 
#define G_CONNECTION_NOT_ESTABLISHED_S   "connection to hardware not established"
 
#define G_ILLEGAL_DATA_IN_PROGRAM   -1202
 Data to download not valid, e.g. \ in data.
 
#define G_ILLEGAL_DATA_IN_PROGRAM_S   "illegal ASCII character in program"
 
#define G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT   -1203
 Program preprocessor could not compress the program within the user's constraints.
 
#define G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT_S   "program cannot be compressed to fit on the controller"
 
#define G_BAD_RESPONSE_QUESTION_MARK   -10000
 Operation received a ?, indicating controller has a TC error.
 
#define G_BAD_RESPONSE_QUESTION_MARK_S   "question mark returned by controller"
 
#define G_BAD_VALUE_RANGE   -10002
 Bad value or range, e.g. GCon g variable passed to function was bad.
 
#define G_BAD_VALUE_RANGE_S   "value passed to function was bad or out of range"
 
#define G_BAD_FULL_MEMORY   -10003
 Not enough memory for an operation, e.g. all connections allowed for a process already taken.
 
#define G_BAD_FULL_MEMORY_S   "operation could not complete because of a memory error"
 
#define G_BAD_LOST_DATA   -10004
 Lost data, e.g. GCommand() response buffer was too small for the controller's response.
 
#define G_BAD_LOST_DATA_S   "data was lost due to buffer or fifo limitations"
 
#define G_BAD_FILE   -10005
 Bad file path, bad file contents, or bad write.
 
#define G_BAD_FILE_S   "file was not found, contents are invalid, or write failed"
 
#define G_BAD_ADDRESS   -10006
 Bad address.
 
#define G_BAD_ADDRESS_S   "a bad address was specified in open"
 
#define G_BAD_FIRMWARE_LOAD   -10008
 Bad firmware upgrade.
 
#define G_BAD_FIRMWARE_LOAD_S   "Firmware upgrade failed"
 
#define G_GCAPS_OPEN_ERROR   -20000
 gcaps connection couldn't open. Server is not running or is not reachable.
 
#define G_GCAPS_OPEN_ERROR_S   "gcaps connection could not be opened"
 
#define G_GCAPS_SUBSCRIPTION_ERROR   -20002
 GMessage(), GRecord(), GInterrupt() called on a connection without –subscribe switch.
 
#define G_GCAPS_SUBSCRIPTION_ERROR_S   "function requires subscription not specified in GOpen()"
 

Detailed Description

Defines values for the Galil C Library return codes and error strings.

Definition in file gclib_errors.h.

Macro Definition Documentation

◆ G_NO_ERROR

#define G_NO_ERROR   0

Return value if function succeeded.

Definition at line 9 of file gclib_errors.h.

◆ G_NO_ERROR_S

#define G_NO_ERROR_S   "no error"

Definition at line 10 of file gclib_errors.h.

◆ G_GCLIB_ERROR

#define G_GCLIB_ERROR   -1

General library error. Indicates internal API caught an unexpected error. Contact Galil support if this error is returned, softw.nosp@m.ares.nosp@m.uppor.nosp@m.t@ga.nosp@m.lil.c.nosp@m.om.

Definition at line 12 of file gclib_errors.h.

◆ G_GCLIB_ERROR_S

#define G_GCLIB_ERROR_S   "gclib unexpected error"

Definition at line 13 of file gclib_errors.h.

◆ G_GCLIB_UTILITY_ERROR

#define G_GCLIB_UTILITY_ERROR   -2

An invalid request value was specified to GUtility.

Definition at line 15 of file gclib_errors.h.

◆ G_GCLIB_UTILITY_ERROR_S

#define G_GCLIB_UTILITY_ERROR_S   "invalid request value or bad arguments were specified to GUtility()"

Definition at line 16 of file gclib_errors.h.

◆ G_GCLIB_UTILITY_IP_TAKEN

#define G_GCLIB_UTILITY_IP_TAKEN   -3

The IP cannot be assigned because ping returned a reply.

Definition at line 18 of file gclib_errors.h.

◆ G_GCLIB_UTILITY_IP_TAKEN_S

#define G_GCLIB_UTILITY_IP_TAKEN_S   "ip address is already taken by a device on the network"

Definition at line 19 of file gclib_errors.h.

◆ G_GCLIB_NON_BLOCKING_READ_EMPTY

#define G_GCLIB_NON_BLOCKING_READ_EMPTY   -4

GMessage, GInterrupt, and GRecord can be called with a zero timeout. If there wasn't data waiting in memory, this error is returned.

Definition at line 21 of file gclib_errors.h.

◆ G_GCLIB_NON_BLOCKING_READ_EMPTY_S

#define G_GCLIB_NON_BLOCKING_READ_EMPTY_S   "data was not waiting for a zero-timeout read"

Definition at line 22 of file gclib_errors.h.

◆ G_GCLIB_POLLING_FAILED

#define G_GCLIB_POLLING_FAILED   -5

GWaitForBool out of polling trials.

Definition at line 24 of file gclib_errors.h.

◆ G_GCLIB_POLLING_FAILED_S

#define G_GCLIB_POLLING_FAILED_S   "exit condition not met in specified polling period"

Definition at line 25 of file gclib_errors.h.

◆ G_TIMEOUT

#define G_TIMEOUT   -1100

Operation timed out. Timeout is set by the –timeout option in GOpen() and can be overriden by GTimeout().

Definition at line 27 of file gclib_errors.h.

◆ G_TIMEOUT_S

#define G_TIMEOUT_S   "device timed out"

Definition at line 28 of file gclib_errors.h.

◆ G_OPEN_ERROR

#define G_OPEN_ERROR   -1101

Device could not be opened. E.G. Serial port or PCI device already open.

Definition at line 30 of file gclib_errors.h.

◆ G_OPEN_ERROR_S

#define G_OPEN_ERROR_S   "device failed to open"

Definition at line 31 of file gclib_errors.h.

◆ G_ALREADY_OPEN

#define G_ALREADY_OPEN   -1111

Serial or PCI file has a flock placed on it, presumably by another gclib connection.

Definition at line 33 of file gclib_errors.h.

◆ G_ALREADY_OPEN_S

#define G_ALREADY_OPEN_S   "Serial or PCI port already open"

Definition at line 34 of file gclib_errors.h.

◆ G_READ_ERROR

#define G_READ_ERROR   -1103

Device read failed. E.G. Socket was closed by remote host. See G_UTIL_GCAPS_KEEPALIVE.

Definition at line 36 of file gclib_errors.h.

◆ G_READ_ERROR_S

#define G_READ_ERROR_S   "device read error"

Definition at line 37 of file gclib_errors.h.

◆ G_WRITE_ERROR

#define G_WRITE_ERROR   -1104

Device write failed. E.G. Socket was closed by remote host. See G_UTIL_GCAPS_KEEPALIVE.

Definition at line 39 of file gclib_errors.h.

◆ G_WRITE_ERROR_S

#define G_WRITE_ERROR_S   "device write error"

Definition at line 40 of file gclib_errors.h.

◆ G_INVALID_PREPROCESSOR_OPTIONS

#define G_INVALID_PREPROCESSOR_OPTIONS   -1204

GProgramDownload was called with a bad preprocessor directive.

Definition at line 42 of file gclib_errors.h.

◆ G_INVALID_PREPROCESSOR_OPTIONS_S

#define G_INVALID_PREPROCESSOR_OPTIONS_S   "preprocessor did not recognize options"

Definition at line 43 of file gclib_errors.h.

◆ G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND

#define G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND   -1106

GCommand() was called with an illegal command, e.g. ED, DL or QD.

Definition at line 45 of file gclib_errors.h.

◆ G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND_S

#define G_COMMAND_CALLED_WITH_ILLEGAL_COMMAND_S   "illegal command passed to command call"

Definition at line 46 of file gclib_errors.h.

◆ G_DATA_RECORD_ERROR

#define G_DATA_RECORD_ERROR   -1107

Data record error, e.g. DR attempted on serial connection.

Definition at line 48 of file gclib_errors.h.

◆ G_DATA_RECORD_ERROR_S

#define G_DATA_RECORD_ERROR_S   "data record error"

Definition at line 49 of file gclib_errors.h.

◆ G_UNSUPPORTED_FUNCTION

#define G_UNSUPPORTED_FUNCTION   -1109

Function cannot be called on this bus. E.G. GInterrupt() on serial.

Definition at line 51 of file gclib_errors.h.

◆ G_UNSUPPORTED_FUNCTION_S

#define G_UNSUPPORTED_FUNCTION_S   "function not supported on this communication bus"

Definition at line 52 of file gclib_errors.h.

◆ G_FIRMWARE_LOAD_NOT_SUPPORTED

#define G_FIRMWARE_LOAD_NOT_SUPPORTED   -1110

Firmware is not supported on this bus, e.g. Ethernet for the DMC-21x3 series.

Definition at line 54 of file gclib_errors.h.

◆ G_FIRMWARE_LOAD_NOT_SUPPORTED_S

#define G_FIRMWARE_LOAD_NOT_SUPPORTED_S   "firmware cannot be loaded on this communication bus to this hardware"

Definition at line 55 of file gclib_errors.h.

◆ G_ARRAY_NOT_DIMENSIONED

#define G_ARRAY_NOT_DIMENSIONED   -1200

Array operation was called on an array that was not in the controller's array table, see LA command.

Definition at line 57 of file gclib_errors.h.

◆ G_ARRAY_NOT_DIMENSIONED_S

#define G_ARRAY_NOT_DIMENSIONED_S   "array not dimensioned on controller or wrong size"

Definition at line 58 of file gclib_errors.h.

◆ G_CONNECTION_NOT_ESTABLISHED

#define G_CONNECTION_NOT_ESTABLISHED   -1201

Function was called with no connection.

Definition at line 60 of file gclib_errors.h.

◆ G_CONNECTION_NOT_ESTABLISHED_S

#define G_CONNECTION_NOT_ESTABLISHED_S   "connection to hardware not established"

Definition at line 61 of file gclib_errors.h.

◆ G_ILLEGAL_DATA_IN_PROGRAM

#define G_ILLEGAL_DATA_IN_PROGRAM   -1202

Data to download not valid, e.g. \ in data.

Definition at line 63 of file gclib_errors.h.

◆ G_ILLEGAL_DATA_IN_PROGRAM_S

#define G_ILLEGAL_DATA_IN_PROGRAM_S   "illegal ASCII character in program"

Definition at line 64 of file gclib_errors.h.

◆ G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT

#define G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT   -1203

Program preprocessor could not compress the program within the user's constraints.

Definition at line 66 of file gclib_errors.h.

◆ G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT_S

#define G_UNABLE_TO_COMPRESS_PROGRAM_TO_FIT_S   "program cannot be compressed to fit on the controller"

Definition at line 67 of file gclib_errors.h.

◆ G_BAD_RESPONSE_QUESTION_MARK

#define G_BAD_RESPONSE_QUESTION_MARK   -10000

Operation received a ?, indicating controller has a TC error.

Definition at line 69 of file gclib_errors.h.

◆ G_BAD_RESPONSE_QUESTION_MARK_S

#define G_BAD_RESPONSE_QUESTION_MARK_S   "question mark returned by controller"

Definition at line 70 of file gclib_errors.h.

◆ G_BAD_VALUE_RANGE

#define G_BAD_VALUE_RANGE   -10002

Bad value or range, e.g. GCon g variable passed to function was bad.

Definition at line 72 of file gclib_errors.h.

◆ G_BAD_VALUE_RANGE_S

#define G_BAD_VALUE_RANGE_S   "value passed to function was bad or out of range"

Definition at line 73 of file gclib_errors.h.

◆ G_BAD_FULL_MEMORY

#define G_BAD_FULL_MEMORY   -10003

Not enough memory for an operation, e.g. all connections allowed for a process already taken.

Definition at line 75 of file gclib_errors.h.

◆ G_BAD_FULL_MEMORY_S

#define G_BAD_FULL_MEMORY_S   "operation could not complete because of a memory error"

Definition at line 76 of file gclib_errors.h.

◆ G_BAD_LOST_DATA

#define G_BAD_LOST_DATA   -10004

Lost data, e.g. GCommand() response buffer was too small for the controller's response.

Definition at line 78 of file gclib_errors.h.

◆ G_BAD_LOST_DATA_S

#define G_BAD_LOST_DATA_S   "data was lost due to buffer or fifo limitations"

Definition at line 79 of file gclib_errors.h.

◆ G_BAD_FILE

#define G_BAD_FILE   -10005

Bad file path, bad file contents, or bad write.

Definition at line 81 of file gclib_errors.h.

◆ G_BAD_FILE_S

#define G_BAD_FILE_S   "file was not found, contents are invalid, or write failed"

Definition at line 82 of file gclib_errors.h.

◆ G_BAD_ADDRESS

#define G_BAD_ADDRESS   -10006

Bad address.

Definition at line 84 of file gclib_errors.h.

◆ G_BAD_ADDRESS_S

#define G_BAD_ADDRESS_S   "a bad address was specified in open"

Definition at line 85 of file gclib_errors.h.

◆ G_BAD_FIRMWARE_LOAD

#define G_BAD_FIRMWARE_LOAD   -10008

Bad firmware upgrade.

Definition at line 87 of file gclib_errors.h.

◆ G_BAD_FIRMWARE_LOAD_S

#define G_BAD_FIRMWARE_LOAD_S   "Firmware upgrade failed"

Definition at line 88 of file gclib_errors.h.

◆ G_GCAPS_OPEN_ERROR

#define G_GCAPS_OPEN_ERROR   -20000

gcaps connection couldn't open. Server is not running or is not reachable.

Definition at line 90 of file gclib_errors.h.

◆ G_GCAPS_OPEN_ERROR_S

#define G_GCAPS_OPEN_ERROR_S   "gcaps connection could not be opened"

Definition at line 91 of file gclib_errors.h.

◆ G_GCAPS_SUBSCRIPTION_ERROR

#define G_GCAPS_SUBSCRIPTION_ERROR   -20002

GMessage(), GRecord(), GInterrupt() called on a connection without –subscribe switch.

Definition at line 93 of file gclib_errors.h.

◆ G_GCAPS_SUBSCRIPTION_ERROR_S

#define G_GCAPS_SUBSCRIPTION_ERROR_S   "function requires subscription not specified in GOpen()"

Definition at line 94 of file gclib_errors.h.