43 #if defined __cplusplus
55 #define errh_Bugcheck(sts, str) \
56 (errh_Fatal("pwr bugcheck: <%s>, in file %s, at line %d\n%m", (str), \
57 __FILE__, __LINE__, sts), \
61 #ifndef errh_ReturnOrBugcheck
62 #define errh_ReturnOrBugcheck(a, sts, lsts, str) \
66 : (EVEN(lsts) ? (errh_Bugcheck(lsts, (str)), (lsts)) : (lsts))), \
74 #define errh_SeveritySuccess(sts) (((sts)&7) == 3)
75 #define errh_SeverityInfo(sts) (((sts)&7) == 1)
76 #define errh_SeverityWarning(sts) (((sts)&7) == 0)
77 #define errh_SeverityError(sts) (((sts)&7) == 2)
78 #define errh_SeverityFatal(sts) (((sts)&7) == 4)
85 errh_eSeverity_Success,
87 errh_eSeverity_Warning,
92 #define errh_cAnix_SrvSize 40
93 #define errh_cAnix_PlcSize 20
104 errh_eAnix_neth_acp = 4,
110 errh_eAnix_linksup = 10,
111 errh_eAnix_trend = 11,
112 errh_eAnix_fast = 12,
113 errh_eAnix_elog = 13,
114 errh_eAnix_webmon = 14,
115 errh_eAnix_webmonmh = 15,
116 errh_eAnix_sysmon = 16,
118 errh_eAnix_remote = 18,
119 errh_eAnix_opc_server = 19,
120 errh_eAnix_statussrv = 20,
121 errh_eAnix_post = 21,
122 errh_eAnix_report = 22,
123 errh_eAnix_sevhistmon = 23,
125 errh_eAnix_powerlink = 25,
126 errh_eAnix_videomgm = 26,
127 errh_eAnix_redcom = 27,
128 errh_eAnix_websocketserver = 28,
129 errh_eAnix_maintsupserver = 29,
130 errh_eAnix_mqtt_server = 30,
131 errh_eAnix_plc1 = 41,
132 errh_eAnix_plc2 = 42,
133 errh_eAnix_plc3 = 43,
134 errh_eAnix_plc4 = 44,
135 errh_eAnix_plc5 = 45,
136 errh_eAnix_plc6 = 46,
137 errh_eAnix_plc7 = 47,
138 errh_eAnix_plc8 = 48,
139 errh_eAnix_plc9 = 49,
140 errh_eAnix_plc10 = 50,
141 errh_eAnix_plc11 = 51,
142 errh_eAnix_plc12 = 52,
143 errh_eAnix_plc13 = 53,
144 errh_eAnix_plc14 = 54,
145 errh_eAnix_plc15 = 55,
146 errh_eAnix_plc16 = 56,
147 errh_eAnix_plc17 = 57,
148 errh_eAnix_plc18 = 58,
149 errh_eAnix_plc19 = 59,
150 errh_eAnix_plc20 = 60,
151 errh_eAnix_appl1 = 61,
152 errh_eAnix_appl2 = 62,
153 errh_eAnix_appl3 = 63,
154 errh_eAnix_appl4 = 64,
155 errh_eAnix_appl5 = 65,
156 errh_eAnix_appl6 = 66,
157 errh_eAnix_appl7 = 67,
158 errh_eAnix_appl8 = 68,
159 errh_eAnix_appl9 = 69,
160 errh_eAnix_appl10 = 70,
161 errh_eAnix_appl11 = 71,
162 errh_eAnix_appl12 = 72,
163 errh_eAnix_appl13 = 73,
164 errh_eAnix_appl14 = 74,
165 errh_eAnix_appl15 = 75,
166 errh_eAnix_appl16 = 76,
167 errh_eAnix_appl17 = 77,
168 errh_eAnix_appl18 = 78,
169 errh_eAnix_appl19 = 79,
170 errh_eAnix_appl20 = 80,
171 errh_eAnix_appl21 = 81,
172 errh_eAnix_appl22 = 82,
173 errh_eAnix_appl23 = 83,
174 errh_eAnix_appl24 = 84,
175 errh_eAnix_appl25 = 85,
176 errh_eAnix_appl26 = 86,
177 errh_eAnix_appl27 = 87,
178 errh_eAnix_appl28 = 88,
179 errh_eAnix_appl29 = 89,
180 errh_eAnix_appl30 = 90,
181 errh_eAnix_appl31 = 91,
182 errh_eAnix_appl32 = 92,
183 errh_eAnix_appl33 = 93,
184 errh_eAnix_appl34 = 94,
185 errh_eAnix_appl35 = 95,
186 errh_eAnix_appl36 = 96,
187 errh_eAnix_appl37 = 97,
188 errh_eAnix_appl38 = 98,
189 errh_eAnix_appl39 = 99,
190 errh_eAnix_appl40 = 100,
191 errh_eAnix_appl41 = 101,
192 errh_eAnix_appl42 = 102,
193 errh_eAnix_appl43 = 103,
194 errh_eAnix_appl44 = 104,
195 errh_eAnix_appl45 = 105,
196 errh_eAnix_appl46 = 106,
197 errh_eAnix_appl47 = 107,
198 errh_eAnix_appl48 = 108,
199 errh_eAnix_appl49 = 109,
200 errh_eAnix_appl50 = 110,
219 long int message_type;
223 char str[LOG_MAX_MSG_SIZE];
236 void errh_AnixName(
errh_eAnix anix,
char *name);
238 void errh_Interactive(
void);
239 char* errh_GetMsg(
const pwr_tStatus sts,
char* buf,
int bufSize);
240 char* errh_GetText(
const pwr_tStatus sts,
char* buf,
int bufSize);
241 char* errh_Log(
char* buff,
char severity,
const char* msg, ...);
247 void errh_LogFatal(errh_sLog*,
const char* msg, ...);
248 void errh_LogError(errh_sLog*,
const char* msg, ...);
249 void errh_LogWarning(errh_sLog*,
const char* msg, ...);
250 void errh_LogInfo(errh_sLog*,
const char* msg, ...);
251 void errh_LogSuccess(errh_sLog*,
const char* msg, ...);
253 void* errh_ErrArgAF(
char* s);
254 void* errh_ErrArgL(
int val);
256 char* errh_Message(
char*
string,
char severity,
char* msg, ...);
262 #if defined __cplusplus
void errh_Error(const char *msg,...)
Log an error message. The function has a variable argument list similar to sprintf.
pwr_tStatus errh_Init(const char *programName, errh_eAnix anix)
Initialize errh. Set up a queue to write to, set application name.
void errh_SetStatus(pwr_tStatus sts)
Set application status. The application status is showed in the Node graph. The application can set t...
errh_eAnix errh_Anix(void)
Get application index for the process.
void errh_Success(const char *msg,...)
Log a success message. The function has a variable argument list similar to sprintf.
void errh_SetName(char *name)
Set application name for the process.
void errh_Fatal(const char *msg,...)
Log a fatal message. The function has a variable argument list similar to sprintf.
void errh_SetAnix(errh_eAnix anix)
Set application index for the process.
void errh_Info(const char *msg,...)
Log an info message. The function has a variable argument list similar to sprintf.
void errh_Warning(const char *msg,...)
Log a warning message. The function has a variable argument list similar to sprintf.
unsigned int pwr_tBoolean
Boolean type.
int pwr_tStatus
Status type.
Include file for QCOM Queue Communication.