[Next] [Previous] [Top] [Contents] [Index]

Channel Access Client Tutorial

Appendix A

The following table lists the possible status codes that Channel Access uses to inform the client program of the validity of requests and of the success/failure of requested operations in the sever. The status codes are integer constants, defined in caerr.h.

The actual status of an operation can be obtained only by an event handler specified by routines that specify a callback function like ca_get_callback(). When such a request is made and sent to the server, the server causes the callback function to be called. It also fills in the structure passed to the event handler. In the case of ca_get_callback(), the server fills in the structure event_handler_args. This structure has a member called status which indicates if the operation failed or succeeded in the server. An event handler should access this member to determine which.

The status code that indicates a valid request or a successful operation is always ECA_NORMAL. The other status codes indicate different errors that can occur with requests and operations. Chapter 3 of the Channel Access Reference Manual lists the possible status codes for each client call and their requested operations. For instance, ca_get() returns ECA_NORMAL, ECA_BADTYPE, ECA_BADCHID, ECA_BADCOUNT, and ECA_GETFAIL. For operations on remote channels, ECA_GETFAIL and ECA_BADCOUNT are not possible status codes. However, if an error occurs while the server is carrying out the request, the status code will be either one or the other.

Each status code has an error message associated with it which is also given here. A client program can print this message by calling ca_message() with the status code, as in

printf("%s", ca_message(ECA_NORMAL);
which will print

Normal successful completion
In addition, each status code has an associated severity, which can be either SUCCESS, INFO, WARNING, ERROR, or FATAL. ECA_NORMAL is the only status codes that has SUCCESS as its severity. The other status codes have one of the other four status codes, where INFO is the least and FATAL the most severe. If a status code of FATAL severity is passed to the call ca_signal() or the macro SEVCHK(), the client program will be aborted.
status codeSeverityMessage
ECA_NORMALSUCCESSNormal successful completion
ECA_MAXIOCERRORMaximum simultaneous IOC connections exceeded
ECA_UKNHOSTERRORUnknown internet host
ECA_UKNSERVERRORUnknown internet service
ECA_SOCKERRORUnable to allocate a new socket
ECA_CONNWARNINGUnable to connect to internet host or service
ECA_ALLOCMEMWARNINGUnable to allocate additional dynamic memory
ECA_UKNCHANWARNINGUnknown IO channel
ECA_UKNFIELDWARNINGRecord field specified inappropriate for channel specified
ECA_TOLARGEERRORThe array or data structure specified will not fit in CA message buffer
ECA_TIMEOUTWARNINGUser specified timeout on IO operation expired
ECA_NOSUPPORTWARNINGSorry that feature is planned but not supported at this time
ECA_STRTOBIGWARNINGThe supplied string is unusually large
ECA_BADCHIDERRORThe request was ignored because the specified channel is disconnected
ECA_BADTYPEERRORThe type you have requested from this channel is unknown
ECA_CHIDNOTFNDINFORemote Channel not found
ECA_CHIDRETRYINFOUnable to locate all user specified channels
ECA_INTERNALFATALChannel Access Internal Failure
ECA_DBLCLFAILWARNINGThe requested local DB operation failed
ECA_GETFAILWARNINGCould not perform a database value get for that channel
ECA_PUTFAILWARNINGCould not perform a database value put for that channel
ECA_ADDFAILWARNINGCould not perform a database event add for that channel
ECA_BADCOUNTWARNINGCount requested inappropriate for that channel
ECA_BADSTRERRORThe supplied string has improper format
ECA_DISCONNINFONetwork connection lost
ECA_DBLCHNLINFOAmbiguous channel host (multiple IOC's have a channel by that name)
ECA_EVDISALLOWERRORThe CA routine called is inappropriate for use within an event handler
ECA_BUILDGETWARNINGDatabase value get for that channel failed during channel search
ECA_NEEDSFPINFOUnable to initialize without the vxWorks VX_FP_TASK task option set
ECA_OVEVFAILWARNINGEvent queue overflow has prevented first pass event after event add
ECA_BADMONIDERRORA monitor by that id cant be found
ECA_NEWADDRINFORemote channel has new network address
ECA_NEWCONNINFONew or resumed network connection
ECA_NOCACTXWARNINGAttempt to import from a task without a CA context failed
ECA_DEFUNCTFATALAttempt to use defunct CA feature failed
ECA_EMPTYSTRWARNINGThe supplied string is empty
ECA_NOREPEATERINFOUnable to spawn the CA repeater thread- auto reconnect will fail
ECA_NOCHANMSGINFONo channel id match for search reply- search reply ignored
ECA_DLCKRESTINFOResetting dead connection- will try to reconnect
ECA_SERVBEHINDINFOServer (IOC) has fallen behind or is not responding- still waiting
ECA_NOCASTWARNINGNo internet interface with broadcast available
ECA_BADMASKERRORThe event selection mask supplied is empty or inappropriate
ECA_IODONEINFOIO operations have completed
ECA_IOINPROGRESSINFOIO operations are in progress
ECA_BADSYNCGRPERRORInvalid synchronous group identifier
ECA_PUTCBINPROGERRORPut call back operation collision with put call back operation in progress
ECA_NORDACCESSWARNINGRead access denied
ECA_NOWTACCESSWARNINGWrite access denied
ECA_ANACHRONISMERRORSorry that anachronistic feature of CA is no longer supported
ECA_NOSEARCHADDRWARNINGThe search request/beacon address list was empty after initialization

Channel Access Client Tutorial - 4 NOV 1997
[Next] [Previous] [Top] [Contents] [Index]

| LANL | Lansce | UC | DOE |

L O S   A L A M O S   N A T I O N A L    L A B O R A T O R Y
Operated by the University of California for the US Department of Energy

Copyright © 1996 UC   Disclaimer   


For problems or questions regarding this web site contact George Vaughn.