Line data Source code
1 : /********************************************************************\
2 :
3 : Name: MRPC.C
4 : Created by: Stefan Ritt
5 :
6 : Contents: List of MIDAS RPC functions with parameters
7 :
8 : $Id$
9 :
10 : \********************************************************************/
11 :
12 : /**dox***************************************************************/
13 : /** @file mrpc.c
14 : The Midas RPC file
15 : */
16 :
17 : /** @defgroup mrpcstructc Midas RPC_LIST
18 : */
19 :
20 : /**dox***************************************************************/
21 : /** @addtogroup mrpcincludecode
22 : *
23 : * @{ */
24 :
25 : /**dox***************************************************************/
26 : /** @addtogroup mrpcstructc
27 : *
28 : * @{ */
29 :
30 : /**dox***************************************************************/
31 : #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 :
33 : #include "midas.h"
34 : #include "msystem.h"
35 :
36 : /**dox***************************************************************/
37 : #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 :
39 : /**dox***************************************************************/
40 : /**
41 : rpc_list_library contains all MIDAS library functions and gets
42 : registerd whenever a connection to the MIDAS server is established
43 : */
44 : static RPC_LIST rpc_list_library[] = {
45 :
46 : /* common functions */
47 : {RPC_CM_SET_CLIENT_INFO, "cm_set_client_info",
48 : {{TID_INT32, RPC_IN},
49 : {TID_INT32, RPC_OUT},
50 : {TID_STRING, RPC_IN},
51 : {TID_STRING, RPC_IN},
52 : {TID_INT32, RPC_IN},
53 : {TID_STRING, RPC_IN},
54 : {TID_INT32, RPC_IN},
55 : {0}}},
56 :
57 : {RPC_CM_CHECK_CLIENT, "cm_check_client",
58 : {{TID_INT32, RPC_IN},
59 : {TID_INT32, RPC_IN},
60 : {0}}},
61 :
62 : {RPC_CM_SET_WATCHDOG_PARAMS, "cm_set_watchdog_params",
63 : {{TID_BOOL, RPC_IN},
64 : {TID_INT32, RPC_IN},
65 : {0}}},
66 :
67 : {RPC_CM_CLEANUP, "cm_cleanup",
68 : {{TID_STRING, RPC_IN},
69 : {TID_BOOL, RPC_IN},
70 : {0}}},
71 :
72 : {RPC_CM_GET_WATCHDOG_INFO, "cm_get_watchdog_info",
73 : {{TID_INT32, RPC_IN},
74 : {TID_STRING, RPC_IN},
75 : {TID_UINT32, RPC_OUT},
76 : {TID_UINT32, RPC_OUT},
77 : {0}}},
78 :
79 : {RPC_CM_MSG, "cm_msg",
80 : {{TID_INT32, RPC_IN},
81 : {TID_STRING, RPC_IN},
82 : {TID_INT32, RPC_IN},
83 : {TID_STRING, RPC_IN},
84 : {TID_STRING, RPC_IN},
85 : {0}}},
86 :
87 : {RPC_CM_MSG_LOG, "cm_msg_log",
88 : {{TID_INT32, RPC_IN},
89 : {TID_STRING, RPC_IN},
90 : {TID_STRING, RPC_IN},
91 : {0}}},
92 :
93 : {RPC_CM_EXECUTE, "cm_execute",
94 : {{TID_STRING, RPC_IN},
95 : {TID_STRING, RPC_OUT},
96 : {TID_INT32, RPC_IN},
97 : {0}}},
98 :
99 : {RPC_CM_EXIST, "cm_exist",
100 : {{TID_STRING, RPC_IN},
101 : {TID_BOOL, RPC_IN},
102 : {0}}},
103 :
104 : {RPC_CM_SYNCHRONIZE, "cm_synchronize",
105 : {{TID_UINT32, RPC_OUT},
106 : {0}}},
107 :
108 : {RPC_CM_ASCTIME, "cm_asctime",
109 : {{TID_STRING, RPC_OUT},
110 : {TID_INT32, RPC_IN},
111 : {0}}},
112 :
113 : {RPC_CM_TIME, "cm_time",
114 : {{TID_UINT32, RPC_OUT},
115 : {0}}},
116 :
117 : {RPC_CM_MSG_RETRIEVE, "cm_msg_retrieve",
118 : {{TID_INT32, RPC_IN},
119 : {TID_STRING, RPC_OUT},
120 : {TID_INT32, RPC_IN},
121 : {0}}},
122 :
123 : /* buffer manager functions */
124 :
125 : {RPC_BM_OPEN_BUFFER, "bm_open_buffer",
126 : {{TID_STRING, RPC_IN},
127 : {TID_INT32, RPC_IN},
128 : {TID_INT32, RPC_OUT},
129 : {0}}},
130 :
131 : {RPC_BM_CLOSE_BUFFER, "bm_close_buffer",
132 : {{TID_INT32, RPC_IN},
133 : {0}}},
134 :
135 : {RPC_BM_CLOSE_ALL_BUFFERS, "bm_close_all_buffers",
136 : {{0}}},
137 :
138 : {RPC_BM_GET_BUFFER_INFO, "bm_get_buffer_info",
139 : {{TID_INT32, RPC_IN},
140 : {TID_STRUCT, RPC_OUT, sizeof(BUFFER_HEADER)},
141 : {0}}},
142 :
143 : {RPC_BM_GET_BUFFER_LEVEL, "bm_get_buffer_level",
144 : {{TID_INT32, RPC_IN},
145 : {TID_INT32, RPC_OUT},
146 : {0}}},
147 :
148 : {RPC_BM_INIT_BUFFER_COUNTERS, "bm_init_buffer_counters",
149 : {{TID_INT32, RPC_IN},
150 : {0}}},
151 :
152 : {RPC_BM_SET_CACHE_SIZE, "bm_set_cache_size",
153 : {{TID_INT32, RPC_IN},
154 : {TID_INT32, RPC_IN},
155 : {TID_INT32, RPC_IN},
156 : {0}}},
157 :
158 : {RPC_BM_ADD_EVENT_REQUEST, "bm_add_event_request",
159 : {{TID_INT32, RPC_IN},
160 : {TID_INT16, RPC_IN},
161 : {TID_INT16, RPC_IN},
162 : {TID_INT32, RPC_IN},
163 : {TID_INT32, RPC_IN},
164 : {TID_INT32, RPC_IN},
165 : {0}}},
166 :
167 : {RPC_BM_REMOVE_EVENT_REQUEST, "bm_remove_event_request",
168 : {{TID_INT32, RPC_IN},
169 : {TID_INT32, RPC_IN},
170 : {0}}},
171 :
172 : {RPC_BM_SEND_EVENT, "bm_send_event",
173 : {{TID_INT32, RPC_IN},
174 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
175 : {TID_INT32, RPC_IN},
176 : {TID_INT32, RPC_IN},
177 : {0}}},
178 :
179 :
180 : {RPC_BM_FLUSH_CACHE, "bm_flush_cache",
181 : {{TID_INT32, RPC_IN},
182 : {TID_INT32, RPC_IN},
183 : {0}}},
184 :
185 :
186 : {RPC_BM_RECEIVE_EVENT, "bm_receive_event",
187 : {{TID_INT32, RPC_IN},
188 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
189 : {TID_INT32, RPC_IN | RPC_OUT},
190 : {TID_INT32, RPC_IN},
191 : {0}}},
192 :
193 :
194 : {RPC_BM_SKIP_EVENT, "bm_skip_event",
195 : {{TID_INT32, RPC_IN},
196 : {0}}},
197 :
198 : {RPC_BM_MARK_READ_WAITING, "bm_mark_read_waiting",
199 : {{TID_BOOL, RPC_IN},
200 : {0}}},
201 :
202 : {RPC_BM_EMPTY_BUFFERS, "bm_empty_buffers",
203 : {{0}}},
204 :
205 : /* online database functions */
206 :
207 : {RPC_DB_OPEN_DATABASE, "db_open_database",
208 : {{TID_STRING, RPC_IN},
209 : {TID_INT32, RPC_IN},
210 : {TID_INT32, RPC_OUT},
211 : {TID_STRING, RPC_IN},
212 : {0}}},
213 :
214 : {RPC_DB_CLOSE_DATABASE, "db_close_database",
215 : {{TID_INT32, RPC_IN},
216 : {0}}},
217 :
218 : {RPC_DB_FLUSH_DATABASE, "db_flush_database",
219 : {{TID_INT32, RPC_IN},
220 : {0}}},
221 :
222 : {RPC_DB_CLOSE_ALL_DATABASES, "db_close_all_databases",
223 : {{0}
224 : }
225 : }
226 : ,
227 :
228 : {RPC_DB_CREATE_KEY, "db_create_key",
229 : {{TID_INT32, RPC_IN},
230 : {TID_INT32, RPC_IN},
231 : {TID_STRING, RPC_IN},
232 : {TID_UINT32, RPC_IN},
233 : {0}}},
234 :
235 : {RPC_DB_CREATE_LINK, "db_create_link",
236 : {{TID_INT32, RPC_IN},
237 : {TID_INT32, RPC_IN},
238 : {TID_STRING, RPC_IN},
239 : {TID_STRING, RPC_IN},
240 : {0}}},
241 :
242 : {RPC_DB_SET_VALUE, "db_set_value",
243 : {{TID_INT32, RPC_IN},
244 : {TID_INT32, RPC_IN},
245 : {TID_STRING, RPC_IN},
246 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
247 : {TID_INT32, RPC_IN},
248 : {TID_INT32, RPC_IN},
249 : {TID_UINT32, RPC_IN},
250 : {0}}},
251 :
252 : {RPC_DB_GET_VALUE, "db_get_value",
253 : {{TID_INT32, RPC_IN},
254 : {TID_INT32, RPC_IN},
255 : {TID_STRING, RPC_IN},
256 : {TID_ARRAY, RPC_IN | RPC_OUT | RPC_VARARRAY},
257 : {TID_INT32, RPC_IN | RPC_OUT},
258 : {TID_UINT32, RPC_IN},
259 : {TID_BOOL, RPC_IN},
260 : {0}}},
261 :
262 : {RPC_DB_FIND_KEY, "db_find_key",
263 : {{TID_INT32, RPC_IN},
264 : {TID_INT32, RPC_IN},
265 : {TID_STRING, RPC_IN},
266 : {TID_INT32, RPC_OUT},
267 : {0}}},
268 :
269 : {RPC_DB_FIND_LINK, "db_fink_link",
270 : {{TID_INT32, RPC_IN},
271 : {TID_INT32, RPC_IN},
272 : {TID_STRING, RPC_IN},
273 : {TID_INT32, RPC_OUT},
274 : {0}}},
275 :
276 : {RPC_DB_GET_PARENT, "db_get_parent",
277 : {{TID_INT32, RPC_IN},
278 : {TID_INT32, RPC_IN},
279 : {TID_INT32, RPC_OUT},
280 : {0}}},
281 :
282 : {RPC_DB_COPY_XML, "db_copy_xml",
283 : {{TID_INT32, RPC_IN},
284 : {TID_INT32, RPC_IN},
285 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
286 : {TID_INT32, RPC_IN | RPC_OUT},
287 : {TID_BOOL, RPC_IN},
288 : {0}}},
289 :
290 : {RPC_DB_GET_PATH, "db_get_path",
291 : {{TID_INT32, RPC_IN},
292 : {TID_INT32, RPC_IN},
293 : {TID_STRING, RPC_OUT},
294 : {TID_INT32, RPC_IN},
295 : {0}}},
296 :
297 : {RPC_DB_DELETE_KEY, "db_delete_key",
298 : {{TID_INT32, RPC_IN},
299 : {TID_INT32, RPC_IN},
300 : {TID_BOOL, RPC_IN},
301 : {0}}},
302 :
303 : {RPC_DB_ENUM_KEY, "db_enum_key",
304 : {{TID_INT32, RPC_IN},
305 : {TID_INT32, RPC_IN},
306 : {TID_INT32, RPC_IN},
307 : {TID_INT32, RPC_OUT},
308 : {0}}},
309 :
310 : {RPC_DB_ENUM_LINK, "db_enum_link",
311 : {{TID_INT32, RPC_IN},
312 : {TID_INT32, RPC_IN},
313 : {TID_INT32, RPC_IN},
314 : {TID_INT32, RPC_OUT},
315 : {0}}},
316 :
317 : {RPC_DB_GET_KEY, "db_get_key",
318 : {{TID_INT32, RPC_IN},
319 : {TID_INT32, RPC_IN},
320 : {TID_STRUCT, RPC_OUT, sizeof(KEY)},
321 : {0}}},
322 :
323 : {RPC_DB_GET_LINK, "db_get_link",
324 : {{TID_INT32, RPC_IN},
325 : {TID_INT32, RPC_IN},
326 : {TID_STRUCT, RPC_OUT, sizeof(KEY)},
327 : {0}}},
328 :
329 : {RPC_DB_GET_KEY_INFO, "db_get_key_info",
330 : {{TID_INT32, RPC_IN},
331 : {TID_INT32, RPC_IN},
332 : {TID_STRING, RPC_OUT},
333 : {TID_INT32, RPC_IN},
334 : {TID_INT32, RPC_OUT},
335 : {TID_INT32, RPC_OUT},
336 : {TID_INT32, RPC_OUT},
337 : {0}}},
338 :
339 : {RPC_DB_GET_KEY_TIME, "db_get_key_time",
340 : {{TID_INT32, RPC_IN},
341 : {TID_INT32, RPC_IN},
342 : {TID_UINT32, RPC_OUT},
343 : {0}}},
344 :
345 : {RPC_DB_RENAME_KEY, "db_rename_key",
346 : {{TID_INT32, RPC_IN},
347 : {TID_INT32, RPC_IN},
348 : {TID_STRING, RPC_IN},
349 : {0}}},
350 :
351 : {RPC_DB_REORDER_KEY, "db_reorder_key",
352 : {{TID_INT32, RPC_IN},
353 : {TID_INT32, RPC_IN},
354 : {TID_INT32, RPC_IN},
355 : {0}}},
356 :
357 : {RPC_DB_GET_DATA, "db_get_data",
358 : {{TID_INT32, RPC_IN},
359 : {TID_INT32, RPC_IN},
360 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
361 : {TID_INT32, RPC_IN | RPC_OUT},
362 : {TID_UINT32, RPC_IN},
363 : {0}}},
364 :
365 : {RPC_DB_GET_LINK_DATA, "db_get_data",
366 : {{TID_INT32, RPC_IN},
367 : {TID_INT32, RPC_IN},
368 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
369 : {TID_INT32, RPC_IN | RPC_OUT},
370 : {TID_UINT32, RPC_IN},
371 : {0}}},
372 :
373 : {RPC_DB_GET_DATA1, "db_get_data1",
374 : {{TID_INT32, RPC_IN},
375 : {TID_INT32, RPC_IN},
376 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
377 : {TID_INT32, RPC_IN | RPC_OUT},
378 : {TID_UINT32, RPC_IN},
379 : {TID_INT32, RPC_OUT},
380 : {0}}},
381 :
382 : {RPC_DB_GET_DATA_INDEX, "db_get_data_index",
383 : {{TID_INT32, RPC_IN},
384 : {TID_INT32, RPC_IN},
385 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
386 : {TID_INT32, RPC_IN | RPC_OUT},
387 : {TID_INT32, RPC_IN},
388 : {TID_UINT32, RPC_IN},
389 : {0}}},
390 :
391 : {RPC_DB_SET_DATA, "db_set_data",
392 : {{TID_INT32, RPC_IN},
393 : {TID_INT32, RPC_IN},
394 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
395 : {TID_INT32, RPC_IN},
396 : {TID_INT32, RPC_IN},
397 : {TID_UINT32, RPC_IN},
398 : {0}}},
399 :
400 : {RPC_DB_SET_DATA1, "db_set_data1",
401 : {{TID_INT32, RPC_IN},
402 : {TID_INT32, RPC_IN},
403 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
404 : {TID_INT32, RPC_IN},
405 : {TID_INT32, RPC_IN},
406 : {TID_UINT32, RPC_IN},
407 : {0}}},
408 :
409 : {RPC_DB_NOTIFY_CLIENTS_ARRAY, "db_notify_clients_array",
410 : {{TID_INT32, RPC_IN},
411 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
412 : {TID_INT32, RPC_IN},
413 : {0}}},
414 :
415 : {RPC_DB_SET_LINK_DATA, "db_set_link_data",
416 : {{TID_INT32, RPC_IN},
417 : {TID_INT32, RPC_IN},
418 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
419 : {TID_INT32, RPC_IN},
420 : {TID_INT32, RPC_IN},
421 : {TID_UINT32, RPC_IN},
422 : {0}}},
423 :
424 : {RPC_DB_SET_DATA_INDEX, "db_set_data_index",
425 : {{TID_INT32, RPC_IN},
426 : {TID_INT32, RPC_IN},
427 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
428 : {TID_INT32, RPC_IN},
429 : {TID_INT32, RPC_IN},
430 : {TID_UINT32, RPC_IN},
431 : {0}}},
432 :
433 : {RPC_DB_SET_LINK_DATA_INDEX, "db_set_link_data_index",
434 : {{TID_INT32, RPC_IN},
435 : {TID_INT32, RPC_IN},
436 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
437 : {TID_INT32, RPC_IN},
438 : {TID_INT32, RPC_IN},
439 : {TID_UINT32, RPC_IN},
440 : {0}}},
441 :
442 : {RPC_DB_SET_DATA_INDEX1, "db_set_data_index1",
443 : {{TID_INT32, RPC_IN},
444 : {TID_INT32, RPC_IN},
445 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
446 : {TID_INT32, RPC_IN},
447 : {TID_INT32, RPC_IN},
448 : {TID_UINT32, RPC_IN},
449 : {TID_BOOL, RPC_IN},
450 : {0}}},
451 :
452 : {RPC_DB_SET_NUM_VALUES, "db_set_num_values",
453 : {{TID_INT32, RPC_IN},
454 : {TID_INT32, RPC_IN},
455 : {TID_INT32, RPC_IN},
456 : {0}}},
457 :
458 : {RPC_DB_SET_MODE, "db_set_mode",
459 : {{TID_INT32, RPC_IN},
460 : {TID_INT32, RPC_IN},
461 : {TID_UINT16, RPC_IN},
462 : {TID_BOOL, RPC_IN},
463 : {0}}},
464 :
465 : {RPC_DB_CREATE_RECORD, "db_create_record",
466 : {{TID_INT32, RPC_IN},
467 : {TID_INT32, RPC_IN},
468 : {TID_STRING, RPC_IN},
469 : {TID_STRING, RPC_IN},
470 : {0}}},
471 :
472 : {RPC_DB_CHECK_RECORD, "db_check_record",
473 : {{TID_INT32, RPC_IN},
474 : {TID_INT32, RPC_IN},
475 : {TID_STRING, RPC_IN},
476 : {TID_STRING, RPC_IN},
477 : {TID_BOOL, RPC_IN},
478 : {0}}},
479 :
480 : {RPC_DB_GET_RECORD, "db_get_record",
481 : {{TID_INT32, RPC_IN},
482 : {TID_INT32, RPC_IN},
483 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
484 : {TID_INT32, RPC_IN | RPC_OUT},
485 : {TID_INT32, RPC_IN},
486 : {0}}},
487 :
488 : {RPC_DB_GET_RECORD_SIZE, "db_get_record_size",
489 : {{TID_INT32, RPC_IN},
490 : {TID_INT32, RPC_IN},
491 : {TID_INT32, RPC_IN},
492 : {TID_INT32, RPC_OUT},
493 : {0}}},
494 :
495 : {RPC_DB_SET_RECORD, "db_set_record",
496 : {{TID_INT32, RPC_IN},
497 : {TID_INT32, RPC_IN},
498 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
499 : {TID_INT32, RPC_IN},
500 : {TID_INT32, RPC_IN},
501 : {0}}},
502 :
503 : {RPC_DB_ADD_OPEN_RECORD, "db_add_open_record",
504 : {{TID_INT32, RPC_IN},
505 : {TID_INT32, RPC_IN},
506 : {TID_UINT16, RPC_IN},
507 : {0}}},
508 :
509 : {RPC_DB_REMOVE_OPEN_RECORD, "db_remove_open_record",
510 : {{TID_INT32, RPC_IN},
511 : {TID_INT32, RPC_IN},
512 : {TID_BOOL, RPC_IN},
513 : {0}}},
514 :
515 : {RPC_DB_LOAD, "db_load",
516 : {{TID_INT32, RPC_IN},
517 : {TID_INT32, RPC_IN},
518 : {TID_STRING, RPC_IN},
519 : {TID_BOOL, RPC_IN},
520 : {0}}},
521 :
522 : {RPC_DB_SAVE, "db_save",
523 : {{TID_INT32, RPC_IN},
524 : {TID_INT32, RPC_IN},
525 : {TID_STRING, RPC_IN},
526 : {TID_BOOL, RPC_IN},
527 : {0}}},
528 :
529 : {RPC_DB_SET_CLIENT_NAME, "db_set_client_name",
530 : {{TID_INT32, RPC_IN},
531 : {TID_STRING, RPC_IN},
532 : {0}}},
533 :
534 : {RPC_DB_GET_OPEN_RECORDS, "db_get_open_records",
535 : {{TID_INT32, RPC_IN},
536 : {TID_INT32, RPC_IN},
537 : {TID_STRING, RPC_OUT},
538 : {TID_INT32, RPC_IN},
539 : {TID_BOOL, RPC_IN},
540 : {0}}},
541 :
542 : /* elog funcions */
543 :
544 : {RPC_EL_SUBMIT, "el_submit",
545 : {{TID_INT32, RPC_IN},
546 : {TID_STRING, RPC_IN},
547 : {TID_STRING, RPC_IN},
548 : {TID_STRING, RPC_IN},
549 : {TID_STRING, RPC_IN},
550 : {TID_STRING, RPC_IN},
551 : {TID_STRING, RPC_IN},
552 : {TID_STRING, RPC_IN},
553 : {TID_STRING, RPC_IN},
554 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
555 : {TID_INT32, RPC_IN},
556 : {TID_STRING, RPC_IN},
557 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
558 : {TID_INT32, RPC_IN},
559 : {TID_STRING, RPC_IN},
560 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
561 : {TID_INT32, RPC_IN},
562 : {TID_STRING, RPC_IN, RPC_OUT},
563 : {TID_INT32, RPC_IN},
564 : {0}}},
565 :
566 : /* alarm funcions */
567 :
568 : {RPC_AL_CHECK, "al_check",
569 : {{0}}},
570 :
571 : {RPC_AL_TRIGGER_ALARM, "al_trigger_alarm",
572 : {{TID_STRING, RPC_IN},
573 : {TID_STRING, RPC_IN},
574 : {TID_STRING, RPC_IN},
575 : {TID_STRING, RPC_IN},
576 : {TID_INT32, RPC_IN},
577 : {0}}},
578 :
579 : /* run control */
580 :
581 : {RPC_RC_TRANSITION, "rc_transition",
582 : {{TID_INT32, RPC_IN},
583 : {TID_INT32, RPC_IN},
584 : {TID_STRING, RPC_OUT},
585 : {TID_INT32, RPC_IN},
586 : {TID_INT32, RPC_IN},
587 : {0}}},
588 :
589 : /* analyzer control */
590 :
591 : {RPC_ANA_CLEAR_HISTOS, "ana_clear_histos",
592 : {{TID_INT32, RPC_IN},
593 : {TID_INT32, RPC_IN},
594 : {0}}},
595 :
596 : /* logger control */
597 :
598 : {RPC_LOG_REWIND, "log_rewind",
599 : {{TID_INT32, RPC_IN},
600 : {0}}},
601 :
602 : /* test functions */
603 :
604 : {RPC_TEST, "test",
605 : {{TID_UINT8, RPC_IN},
606 : {TID_UINT16, RPC_IN},
607 : {TID_INT32, RPC_IN},
608 : {TID_FLOAT, RPC_IN},
609 : {TID_DOUBLE, RPC_IN},
610 : {TID_UINT8, RPC_OUT},
611 : {TID_UINT16, RPC_OUT},
612 : {TID_INT32, RPC_OUT},
613 : {TID_FLOAT, RPC_OUT},
614 : {TID_DOUBLE, RPC_OUT},
615 : {0}}},
616 :
617 : {RPC_TEST2, "test2",
618 : {{TID_INT32, RPC_IN},
619 : {TID_INT32, RPC_OUT},
620 : {TID_INT32, RPC_IN | RPC_OUT},
621 : {TID_STRING, RPC_IN},
622 : {TID_STRING, RPC_OUT},
623 : {TID_INT32, RPC_IN}, // string size
624 : {TID_STRING, RPC_OUT},
625 : {TID_INT32, RPC_IN}, // string size
626 : {TID_STRING,RPC_IN | RPC_OUT},
627 : {TID_INT32, RPC_IN}, // string size
628 : {TID_STRUCT, RPC_IN, sizeof(KEY)},
629 : {TID_STRUCT, RPC_OUT, sizeof(KEY)},
630 : {TID_STRUCT, RPC_IN | RPC_OUT, sizeof(KEY)},
631 : {TID_UINT32, RPC_IN | RPC_OUT | RPC_VARARRAY},
632 : {TID_INT32, RPC_IN | RPC_OUT}, // RPC_VARARRAY size
633 : {TID_ARRAY, RPC_IN | RPC_VARARRAY},
634 : {TID_INT32, RPC_IN}, // RPC_VARARRAY size
635 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY},
636 : {TID_INT32, RPC_IN | RPC_OUT}, // RPC_VARARRAY size
637 : {0}}},
638 :
639 : /* CAMAC server */
640 :
641 : {RPC_CNAF16, "cnaf16",
642 : {{TID_UINT32, RPC_IN}, /* command */
643 : {TID_UINT32, RPC_IN}, /* branch */
644 : {TID_UINT32, RPC_IN}, /* crate */
645 : {TID_UINT32, RPC_IN}, /* station */
646 : {TID_UINT32, RPC_IN}, /* subaddress */
647 : {TID_UINT32, RPC_IN}, /* function */
648 : {TID_UINT16, RPC_IN | RPC_OUT | RPC_VARARRAY}, /* data */
649 : {TID_UINT32, RPC_IN | RPC_OUT}, /* array size */
650 : {TID_UINT32, RPC_OUT}, /* x */
651 : {TID_UINT32, RPC_OUT}, /* q */
652 : {0}}},
653 :
654 : {RPC_CNAF24, "cnaf24",
655 : {{TID_UINT32, RPC_IN}, /**< command */
656 : {TID_UINT32, RPC_IN}, /**< branch */
657 : {TID_UINT32, RPC_IN}, /**< crate */
658 : {TID_UINT32, RPC_IN}, /**< station */
659 : {TID_UINT32, RPC_IN}, /**< subaddress */
660 : {TID_UINT32, RPC_IN}, /**< function */
661 : {TID_UINT32, RPC_IN | RPC_OUT | RPC_VARARRAY}, /**< data */
662 : {TID_UINT32, RPC_IN | RPC_OUT}, /**< array size */
663 : {TID_UINT32, RPC_OUT}, /**< x */
664 : {TID_UINT32, RPC_OUT}, /**< q */
665 : {0}}},
666 :
667 : /* manual triggered equipment */
668 :
669 : {RPC_MANUAL_TRIG, "manual_trig",
670 : {{TID_UINT16, RPC_IN}, /* event id */
671 : {0}}},
672 :
673 : /* json rpc */
674 :
675 : {RPC_JRPC, "json_rpc",
676 : {{TID_STRING, RPC_IN}, // command
677 : {TID_STRING, RPC_IN}, // arguments (JSON-encoded)
678 : {TID_STRING, RPC_OUT}, // return string (JSON-encoded)
679 : {TID_INT32, RPC_IN}, // maximum length of the return string
680 : {0}}},
681 :
682 : /* binary rpc */
683 :
684 : {RPC_BRPC, "binary_rpc",
685 : {{TID_STRING, RPC_IN}, // command
686 : {TID_STRING, RPC_IN}, // arguments (JSON-encoded)
687 : {TID_ARRAY, RPC_OUT | RPC_VARARRAY}, // return binary data
688 : {TID_INT32, RPC_IN | RPC_OUT}, // maximum length of the return string
689 : {0}}},
690 :
691 : {0}
692 :
693 : };
694 :
695 : /**dox***************************************************************/
696 : /**
697 : rpc_list_system contains MIDAS system functions and gets
698 : registerd whenever a RPC server is registered
699 : */
700 : static RPC_LIST rpc_list_system[] = {
701 :
702 : /* system functions */
703 : {RPC_ID_WATCHDOG, "id_watchdog",
704 : {{0}}},
705 :
706 : {RPC_ID_SHUTDOWN, "id_shutdown",
707 : {{0}}},
708 :
709 : {RPC_ID_EXIT, "id_exit",
710 : {{0}}},
711 :
712 : {0}
713 :
714 : };
715 :
716 358 : RPC_LIST *rpc_get_internal_list(INT flag)
717 : {
718 358 : if (flag)
719 176 : return rpc_list_library;
720 : else
721 182 : return rpc_list_system;
722 : }
723 :
724 : /*------------------------------------------------------------------*/
725 :
726 : /**dox***************************************************************/
727 : /** @} */ /* end of mrpcstructc */
728 :
729 : /**dox***************************************************************/
730 : /** @} */ /* end of mrpcincludecode */
|