This is Unofficial EPICS BASE Doxygen Site
caerr.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 /*
10  *
11  * L O S A L A M O S
12  * Los Alamos National Laboratory
13  * Los Alamos, New Mexico 87545
14  *
15  * Copyright, 1986, The Regents of the University of California.
16  *
17  * Author: Jeffrey O. Hill
18  *
19  */
20 
21 
22 #ifndef INC_caerr_H
23 #define INC_caerr_H
24 
25 #include "epicsTypes.h"
26 
27 #include "libCaAPI.h"
28 
29 /* CA Status Code Definitions */
30 
31 #define CA_K_INFO 3 /* successful */
32 #define CA_K_ERROR 2 /* failed- continue */
33 #define CA_K_SUCCESS 1 /* successful */
34 #define CA_K_WARNING 0 /* unsuccessful */
35 #define CA_K_SEVERE 4 /* failed- quit */
36 #define CA_K_FATAL CA_K_ERROR | CA_K_SEVERE
37 
38 #define CA_M_MSG_NO 0x0000FFF8
39 #define CA_M_SEVERITY 0x00000007
40 #define CA_M_LEVEL 0x00000003
41 #define CA_M_SUCCESS 0x00000001
42 #define CA_M_ERROR 0x00000002
43 #define CA_M_SEVERE 0x00000004
44 
45 #define CA_S_MSG_NO 0x0D
46 #define CA_S_SEVERITY 0x03
47 
48 #define CA_V_MSG_NO 0x03
49 #define CA_V_SEVERITY 0x00
50 #define CA_V_SUCCESS 0x00
51 
52 /* Define MACROS to extract/insert individual fields from a status value */
53 
54 #define CA_EXTRACT_MSG_NO(code)\
55 ( ( (code) & CA_M_MSG_NO ) >> CA_V_MSG_NO )
56 #define CA_EXTRACT_SEVERITY(code)\
57 ( ( (code) & CA_M_SEVERITY ) >> CA_V_SEVERITY )
58 #define CA_EXTRACT_SUCCESS(code)\
59 ( ( (code) & CA_M_SUCCESS ) >> CA_V_SUCCESS )
60 
61 #define CA_INSERT_MSG_NO(code)\
62 ( ((code)<< CA_V_MSG_NO) & CA_M_MSG_NO )
63 #define CA_INSERT_SEVERITY(code)\
64 ( ((code)<< CA_V_SEVERITY)& CA_M_SEVERITY )
65 #define CA_INSERT_SUCCESS(code)\
66 ( ((code)<< CA_V_SUCCESS) & CA_M_SUCCESS )
67 
68 #define DEFMSG(SEVERITY,NUMBER)\
69 (CA_INSERT_MSG_NO(NUMBER) | CA_INSERT_SEVERITY(SEVERITY))
70 
71 /*
72  * In the lines below "defunct" indicates that current release
73  * servers and client library will not return this error code, but
74  * servers on earlier releases that communicate with current clients
75  * might still generate exceptions with these error constants
76  */
77 #define ECA_NORMAL DEFMSG(CA_K_SUCCESS, 0) /* success */
78 #define ECA_MAXIOC DEFMSG(CA_K_ERROR, 1) /* defunct */
79 #define ECA_UKNHOST DEFMSG(CA_K_ERROR, 2) /* defunct */
80 #define ECA_UKNSERV DEFMSG(CA_K_ERROR, 3) /* defunct */
81 #define ECA_SOCK DEFMSG(CA_K_ERROR, 4) /* defunct */
82 #define ECA_CONN DEFMSG(CA_K_WARNING, 5) /* defunct */
83 #define ECA_ALLOCMEM DEFMSG(CA_K_WARNING, 6)
84 #define ECA_UKNCHAN DEFMSG(CA_K_WARNING, 7) /* defunct */
85 #define ECA_UKNFIELD DEFMSG(CA_K_WARNING, 8) /* defunct */
86 #define ECA_TOLARGE DEFMSG(CA_K_WARNING, 9)
87 #define ECA_TIMEOUT DEFMSG(CA_K_WARNING, 10)
88 #define ECA_NOSUPPORT DEFMSG(CA_K_WARNING, 11) /* defunct */
89 #define ECA_STRTOBIG DEFMSG(CA_K_WARNING, 12) /* defunct */
90 #define ECA_DISCONNCHID DEFMSG(CA_K_ERROR, 13) /* defunct */
91 #define ECA_BADTYPE DEFMSG(CA_K_ERROR, 14)
92 #define ECA_CHIDNOTFND DEFMSG(CA_K_INFO, 15) /* defunct */
93 #define ECA_CHIDRETRY DEFMSG(CA_K_INFO, 16) /* defunct */
94 #define ECA_INTERNAL DEFMSG(CA_K_FATAL, 17)
95 #define ECA_DBLCLFAIL DEFMSG(CA_K_WARNING, 18) /* defunct */
96 #define ECA_GETFAIL DEFMSG(CA_K_WARNING, 19)
97 #define ECA_PUTFAIL DEFMSG(CA_K_WARNING, 20)
98 #define ECA_ADDFAIL DEFMSG(CA_K_WARNING, 21) /* defunct */
99 #define ECA_BADCOUNT DEFMSG(CA_K_WARNING, 22)
100 #define ECA_BADSTR DEFMSG(CA_K_ERROR, 23)
101 #define ECA_DISCONN DEFMSG(CA_K_WARNING, 24)
102 #define ECA_DBLCHNL DEFMSG(CA_K_WARNING, 25)
103 #define ECA_EVDISALLOW DEFMSG(CA_K_ERROR, 26)
104 #define ECA_BUILDGET DEFMSG(CA_K_WARNING, 27) /* defunct */
105 #define ECA_NEEDSFP DEFMSG(CA_K_WARNING, 28) /* defunct */
106 #define ECA_OVEVFAIL DEFMSG(CA_K_WARNING, 29) /* defunct */
107 #define ECA_BADMONID DEFMSG(CA_K_ERROR, 30)
108 #define ECA_NEWADDR DEFMSG(CA_K_WARNING, 31) /* defunct */
109 #define ECA_NEWCONN DEFMSG(CA_K_INFO, 32) /* defunct */
110 #define ECA_NOCACTX DEFMSG(CA_K_WARNING, 33) /* defunct */
111 #define ECA_DEFUNCT DEFMSG(CA_K_FATAL, 34) /* defunct */
112 #define ECA_EMPTYSTR DEFMSG(CA_K_WARNING, 35) /* defunct */
113 #define ECA_NOREPEATER DEFMSG(CA_K_WARNING, 36) /* defunct */
114 #define ECA_NOCHANMSG DEFMSG(CA_K_WARNING, 37) /* defunct */
115 #define ECA_DLCKREST DEFMSG(CA_K_WARNING, 38) /* defunct */
116 #define ECA_SERVBEHIND DEFMSG(CA_K_WARNING, 39) /* defunct */
117 #define ECA_NOCAST DEFMSG(CA_K_WARNING, 40) /* defunct */
118 #define ECA_BADMASK DEFMSG(CA_K_ERROR, 41)
119 #define ECA_IODONE DEFMSG(CA_K_INFO, 42)
120 #define ECA_IOINPROGRESS DEFMSG(CA_K_INFO, 43)
121 #define ECA_BADSYNCGRP DEFMSG(CA_K_ERROR, 44)
122 #define ECA_PUTCBINPROG DEFMSG(CA_K_ERROR, 45)
123 #define ECA_NORDACCESS DEFMSG(CA_K_WARNING, 46)
124 #define ECA_NOWTACCESS DEFMSG(CA_K_WARNING, 47)
125 #define ECA_ANACHRONISM DEFMSG(CA_K_ERROR, 48)
126 #define ECA_NOSEARCHADDR DEFMSG(CA_K_WARNING, 49)
127 #define ECA_NOCONVERT DEFMSG(CA_K_WARNING, 50)
128 #define ECA_BADCHID DEFMSG(CA_K_ERROR, 51)
129 #define ECA_BADFUNCPTR DEFMSG(CA_K_ERROR, 52)
130 #define ECA_ISATTACHED DEFMSG(CA_K_WARNING, 53)
131 #define ECA_UNAVAILINSERV DEFMSG(CA_K_WARNING, 54)
132 #define ECA_CHANDESTROY DEFMSG(CA_K_WARNING, 55)
133 #define ECA_BADPRIORITY DEFMSG(CA_K_ERROR, 56)
134 #define ECA_NOTTHREADED DEFMSG(CA_K_ERROR, 57)
135 #define ECA_16KARRAYCLIENT DEFMSG(CA_K_WARNING, 58)
136 #define ECA_CONNSEQTMO DEFMSG(CA_K_WARNING, 59)
137 #define ECA_UNRESPTMO DEFMSG(CA_K_WARNING, 60)
138 
139 #ifdef __cplusplus
140 extern "C" {
141 #endif
142 
143 LIBCA_API const char * epicsStdCall ca_message(long ca_status);
144 
145 LIBCA_API extern const char * ca_message_text [];
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif
LIBCA_API const char *epicsStdCall ca_message(long ca_status)
Definition: access.cpp:561
LIBCA_API const char * ca_message_text[]
Definition: access.cpp:49