|
| |
[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 code | Severity | Message
| ECA_NORMAL | SUCCESS | Normal successful completion
| ECA_MAXIOC | ERROR | Maximum simultaneous IOC connections exceeded
| ECA_UKNHOST | ERROR | Unknown internet host
| ECA_UKNSERV | ERROR | Unknown internet service
| ECA_SOCK | ERROR | Unable to allocate a new socket
| ECA_CONN | WARNING | Unable to connect to internet host or service
| ECA_ALLOCMEM | WARNING | Unable to allocate additional dynamic memory
| ECA_UKNCHAN | WARNING | Unknown IO channel
| ECA_UKNFIELD | WARNING | Record field specified inappropriate for channel specified
| ECA_TOLARGE | ERROR | The array or data structure specified will not fit in CA message buffer
| ECA_TIMEOUT | WARNING | User specified timeout on IO operation expired
| ECA_NOSUPPORT | WARNING | Sorry that feature is planned but not supported at this time
| ECA_STRTOBIG | WARNING | The supplied string is unusually large
| ECA_BADCHID | ERROR | The request was ignored because the specified channel is disconnected
| ECA_BADTYPE | ERROR | The type you have requested from this channel is unknown
| ECA_CHIDNOTFND | INFO | Remote Channel not found
| ECA_CHIDRETRY | INFO | Unable to locate all user specified channels
| ECA_INTERNAL | FATAL | Channel Access Internal Failure
| ECA_DBLCLFAIL | WARNING | The requested local DB operation failed
| ECA_GETFAIL | WARNING | Could not perform a database value get for that channel
| ECA_PUTFAIL | WARNING | Could not perform a database value put for that channel
| ECA_ADDFAIL | WARNING | Could not perform a database event add for that channel
| ECA_BADCOUNT | WARNING | Count requested inappropriate for that channel
| ECA_BADSTR | ERROR | The supplied string has improper format
| ECA_DISCONN | INFO | Network connection lost
| ECA_DBLCHNL | INFO | Ambiguous channel host (multiple IOC's have a channel by that name)
| ECA_EVDISALLOW | ERROR | The CA routine called is inappropriate for use within an event handler
| ECA_BUILDGET | WARNING | Database value get for that channel failed during channel search
| ECA_NEEDSFP | INFO | Unable to initialize without the vxWorks VX_FP_TASK task option set
| ECA_OVEVFAIL | WARNING | Event queue overflow has prevented first pass event after event add
| ECA_BADMONID | ERROR | A monitor by that id cant be found
| ECA_NEWADDR | INFO | Remote channel has new network address
| ECA_NEWCONN | INFO | New or resumed network connection
| ECA_NOCACTX | WARNING | Attempt to import from a task without a CA context failed
| ECA_DEFUNCT | FATAL | Attempt to use defunct CA feature failed
| ECA_EMPTYSTR | WARNING | The supplied string is empty
| ECA_NOREPEATER | INFO | Unable to spawn the CA repeater thread- auto reconnect will fail
| ECA_NOCHANMSG | INFO | No channel id match for search reply- search reply ignored
| ECA_DLCKREST | INFO | Resetting dead connection- will try to reconnect
| ECA_SERVBEHIND | INFO | Server (IOC) has fallen behind or is not responding- still waiting
| ECA_NOCAST | WARNING | No internet interface with broadcast available
| ECA_BADMASK | ERROR | The event selection mask supplied is empty or inappropriate
| ECA_IODONE | INFO | IO operations have completed
| ECA_IOINPROGRESS | INFO | IO operations are in progress
| ECA_BADSYNCGRP | ERROR | Invalid synchronous group identifier
| ECA_PUTCBINPROG | ERROR | Put call back operation collision with put call back operation in progress
| ECA_NORDACCESS | WARNING | Read access denied
| ECA_NOWTACCESS | WARNING | Write access denied
| ECA_ANACHRONISM | ERROR | Sorry that anachronistic feature of CA is no longer supported
| ECA_NOSEARCHADDR | WARNING | The search request/beacon address list was empty after initialization | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |

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