API Error Codes
General
LayGO API functions use a unified set of error codes defined in
laygodef.h. All error codes have negative values.
If unsuccessful, API functions return a negative error code indicating
the reason for the failure. The auxiliary function, lgo_ErrorMessage(),
translates error return codes into human-readable strings.
As negative return values indicate failure, non-negative return values
indicate success. Any further interpretation
of a non-negative return value depends on the function involved.
For instance, a non-negative return value from
lgo_Read() is the number of bytes read from a connection into the
user's data buffer. In contrast, a non-negative return value from
lgo_Event() is an event type identifier, while a non-negative return value from
lgo_Pop() has no
significance other than that the function call has completed successfully.
Alphabetical Listing of Error Codes
- lgo_ERROR_BUFFER_POOL_INITIALIZATION_FAILURE
- The system buffer pool could not be initialized as configured.
Usually, this means that not enough system memory is available.
- lgo_ERROR_BUFFER_SIZE
- The output buffer is too small to contain the data waiting
or the input buffer has the size 0.
- lgo_ERROR_CLIENTS_CONNECTED
- The server cannot be shutdown because clients are still connected.
- lgo_ERROR_CONFIGURATION_FILE_NOT_FOUND
- The configuration file specified cannot be found or is not readable.
- lgo_ERROR_CONFIGURATION_FILE_READ_ERROR
- The configuration file is either not a LayGO configuration
file or contains invalid or incorrectly formatted configuration
records.
- lgo_ERROR_CONFIGURATION_FILE_WRITE_ERROR
- An error occurred writing the configuration file to disk.
- lgo_ERROR_CONFIGURATION_NOT_DEFINED
- No configuration data is defined for the protocol.
- lgo_ERROR_CONFIGURATION_NOT_FOUND
- No configuration data for the specified protocol was found
in the configuration file.
- lgo_ERROR_DATA_WAITING
- A read for a control event was requested, but a data event
is next in the queue.
- lgo_ERROR_DRIVER_MODULE_FILE_NOT_FOUND
- The file containing the downloadable driver module for an intelligent board cannot be found.
- lgo_ERROR_DRIVER_MODULE_FILE_READ_ERROR
- An error occurred reading the downloadable driver module for an intelligent board from disk.
- lgo_ERROR_DRIVER_MODULE_INITIALIZATION_FAILURE
- The downloadable driver module for an intelligent board failed to initialize.
- lgo_ERROR_DRIVER_NOT_INSTALLED
- The stack cannot find or cannot load the driver.
- lgo_ERROR_EVENT_WAITING
- A read for a data event was requested, but a control event
is next in the queue.
- lgo_ERROR_INVALID_BOARD_ID
- The board ID does not refer to an installed board.
- lgo_ERROR_INVALID_CID
- The CID specified has not been opened.
- lgo_ERROR_INVALID_COMMAND
- The LayGO command is not valid for the state of the API.
- lgo_ERROR_INVALID_DRIVER_CONFIGURATION
- The driver configuration of the system stack is invalid.
- lgo_ERROR_INVALID_DRIVER_MODULE
- The module read from disk is not a valid downloadable driver module for the installed board.
- lgo_ERROR_INVALID_HARDWARE_CONFIGURATION
- The hardware configuration used to initialize the stack contains
invalid values.
- lgo_ERROR_INVALID_INPUT_BUFFER
- The input buffer is
NULL
and/or the size is less than 1.
- lgo_ERROR_INVALID_CONFIGURATION
- The configuration is not valid for the specified protocol.
- lgo_ERROR_INVALID_DRIVER_VERSION
- The version of an installed driver is not valid for the version of the LayGO libraries.
- lgo_ERROR_INVALID_HARDWARE_VERSION
- The installed driver is not valid for the version of the communication board.
- lgo_ERROR_INVALID_IOCTL_FUNCTION
- The ioctl function code is invalid for the service for which
it was requested.
- lgo_ERROR_INVALID_IOCTL_PARAMETERS
- The ioctl parameters input are invalid for the function requested.
- lgo_ERROR_INVALID_OUTPUT_BUFFER
- The output buffer is
NULL
and/or its size is less than 1.
- lgo_ERROR_INVALID_PROTOCOL
- The specified protocol does not have a default configuration in the protocol stack.
Either the protocol identifier is reserved, refers to a protocol which does not have
a default configuration or refers to a protocol the stack does not have.
- lgo_ERROR_INVALID_STACK_CONFIGURATION
- The stack configuration used to initialize was invalid.
- lgo_ERROR_INVALID_STACK_ID
- The stack id given does not refer to a configured stack.
- lgo_ERROR_INVALID_USER_ID
- The user id given does not match the stored value.
- lgo_ERROR_INVALID_WRITE_DATA_SIZE
- The number of bytes written to the CID is larger than the CID is configured to
allow. This condition was previously part of the lgo_ERROR_NO_SYSTEM_BUFFER condition.
- lgo_ERROR_HARDWARE_CONFIGURATION_CONFLICT
- The hardware configuration used to initialize the stack contains
conflicting values.
- lgo_ERROR_HARDWARE_INITIALIZATION_FAILURE
- Initialization of the communication hardware for which the
system is configured has failed. Either the configuration data
is incorrect, the hardware is incorrectly configured or installed
or the hardware is not operational.
- lgo_ERROR_NO_SYSTEM_BUFFER
- No system buffer of the required size is available in the system buffer pool.
- lgo_ERROR_NOTHING_WAITING
- A read was requested, but no events are waiting in the queue.
- lgo_ERROR_OUT_OF_CONNECTIONS
- All CIDs are in use.
- lgo_ERROR_OUT_OF_MEMORY
- The requested operation cannot be performed because the memory
could not be allocated.
- lgo_ERROR_PROTOCOL_BLOCKING
- The protocol layer of the CID is no longer in data transfer state. An event
has been queued for the CID which explains the reason. This condition
was previously part of the lgo_ERROR_NO_SYSTEM_BUFFER
condition.
- lgo_ERROR_SERVER_CONNECTED
- The application cannot connect to or shut down a LayGO RPC server while connected to any server.
- lgo_ERROR_SERVER_NOT_CONNECTED
- The application cannot disconnect from a LayGO RPC server because it is not connected.
- lgo_ERROR_SERVER_NOT_FOUND
- The requested LayGO RPC server was not found on the network.
- lgo_ERROR_SERVER_ACCESS_NOT_ENABLED
- Access to LayGO RPC servers has not enabled.
- lgo_ERROR_SERVICE_DATABASE_NOT_FOUND
- The file containing the service database cannot be found or is unreadable.
- lgo_ERROR_SERVICE_NOT_AVAILABLE
- The requested service is either in use or system resources are insufficient for it to operate.
- lgo_ERROR_SERVICE_UNKNOWN
- There is no entry in the service database matching the service requested.
- lgo_ERROR_SPECIAL_DATA_WAITING
- A read for a control event or data event was requested, but a special data event is next in the queue.
- lgo_ERROR_STACK_INITIALIZATION_FAILURE
- Initialization of the protocol services for which the stack is configured has failed.
- lgo_ERROR_TOO_MANY_CLIENTS
- Connection to the server is refused because it has the maximum number of client connections.
- lgo_ERROR_TRANSMISSION_BLOCKED
- A service below the protocol layer of the CID is not in data transfer state.
- lgo_ERROR_UNKNOWN_PROTOCOL
- The system has not been configured for the specified protocol.
- lgo_ERROR_WRITE_QUEUE_FULL
- The protocol layer's write queue cannot accept another buffer at this time. This
condition was previously part of the lgo_ERROR_NO_SYSTEM_BUFFER condition.