ET System  16.4
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
et.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*
2  * Copyright (c) 1998 Southeastern Universities Research Association, *
3  * Thomas Jefferson National Accelerator Facility *
4  * *
5  * This software was developed under a United States Government license *
6  * described in the NOTICE file included as part of this distribution. *
7  * *
8  * Author: Carl Timmer *
9  * timmer@jlab.org Jefferson Lab, MS-12H *
10  * Phone: (757) 269-5130 12000 Jefferson Ave. *
11  * Fax: (757) 269-5800 Newport News, VA 23606 *
12  * *
13  *----------------------------------------------------------------------------*
14  *
15  * Description:
16  * Header file for ET system
17  *
18  *----------------------------------------------------------------------------*/
19 
20 #ifndef _ET_H_
21 #define _ET_H_
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 #include <pthread.h>
27 #include <stdint.h>
28 
29 
30 #define INET_ATON_ERR 0
31 #include <inttypes.h>
32 
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
39 /*********************************************************************/
40 /* The following default values may be changed */
41 /*********************************************************************/
42 /* station stuff */
43 #define ET_STATION_CUE 10
44 #define ET_STATION_PRESCALE 1
46 /* system stuff */
47 #define ET_SYSTEM_EVENTS 300
48 #define ET_SYSTEM_NTEMPS 300
49 #define ET_SYSTEM_ESIZE 1000
50 #define ET_SYSTEM_NSTATS 200
52 /* network stuff */
53 #define ET_UDP_PORT 11111
54 #define ET_SERVER_PORT 11111
55 #define ET_MULTICAST_PORT 11111
56 #define ET_BROADCAST_PORT 11111
58 #define ET_MULTICAST_ADDR "239.200.0.0"
60 #define ET_EVENT_GROUPS_MAX 200
62 /*********************************************************************/
63 /* WARNING */
64 /* Changing ET_STATION_SELECT_INTS requires a full recompile of all */
65 /* ET libraries (local & remote) whose users interact in any way. */
66 /*********************************************************************/
67 
69 #define ET_STATION_SELECT_INTS 6
70 
71 /*********************************************************************/
72 /* DO NOT CHANGE ANYTHING BELOW THIS LINE !!! */
73 /*********************************************************************/
74 
76 #define ET_MULTICAST_TTL 32
77 
78 /* ET server is on host that is ... */
79 #define ET_HOST_LOCAL ".local"
80 #define ET_HOST_REMOTE ".remote"
81 #define ET_HOST_ANYWHERE ".anywhere"
83 /* Treat local ET server as local or remote? */
84 #define ET_HOST_AS_LOCAL 1
85 #define ET_HOST_AS_REMOTE 0
87 /* Policy to pick a single responder from many after broad/multicast */
88 #define ET_POLICY_FIRST 0
89 #define ET_POLICY_LOCAL 1
90 #define ET_POLICY_ERROR 2
92 /* Name lengths */
93 #define ET_FILENAME_LENGTH 100
94 #define ET_FUNCNAME_LENGTH 48
95 #define ET_STATNAME_LENGTH 48
97 #define ET_TEMPNAME_LENGTH (ET_FILENAME_LENGTH+12)
98 
99 /*----------------*/
100 /* Station stuff. */
101 /*----------------*/
102 
103 #define ET_GRANDCENTRAL 0
105 /* Station status. */
106 #define ET_STATION_UNUSED 0
107 #define ET_STATION_CREATING 1
108 #define ET_STATION_IDLE 2
109 #define ET_STATION_ACTIVE 3
111 /* How many user process can attach */
112 #define ET_STATION_USER_MULTI 0
113 #define ET_STATION_USER_SINGLE 1
115 /* Can block for event flow or not */
116 #define ET_STATION_NONBLOCKING 0
117 #define ET_STATION_BLOCKING 1
120 /* Criterion for event selection */
121 #define ET_STATION_SELECT_ALL 1
122 #define ET_STATION_SELECT_MATCH 2
123 #define ET_STATION_SELECT_USER 3
124 #define ET_STATION_SELECT_RROBIN 4
125 #define ET_STATION_SELECT_EQUALCUE 5
128 /* How to restore events in dead user process */
129 #define ET_STATION_RESTORE_OUT 0
130 #define ET_STATION_RESTORE_IN 1
131 #define ET_STATION_RESTORE_GC 2
132 #define ET_STATION_RESTORE_REDIST 3
135 /* How events flow through a (group of) station(s) */
136 #define ET_STATION_SERIAL 0
137 #define ET_STATION_PARALLEL 1
139 #define ET_STATION_PARALLEL_HEAD 2
151 #define ET_OK 0
152 #define ET_ERROR -1
153 #define ET_ERROR_TOOMANY -2
154 #define ET_ERROR_EXISTS -3
155 #define ET_ERROR_WAKEUP -4
156 #define ET_ERROR_TIMEOUT -5
157 #define ET_ERROR_EMPTY -6
158 #define ET_ERROR_BUSY -7
159 #define ET_ERROR_DEAD -8
160 #define ET_ERROR_READ -9
161 #define ET_ERROR_WRITE -10
162 #define ET_ERROR_REMOTE -11
163 #define ET_ERROR_NOREMOTE -12
164 #define ET_ERROR_TOOBIG -13
165 #define ET_ERROR_NOMEM -14
166 #define ET_ERROR_BADARG -15
167 #define ET_ERROR_SOCKET -16
168 #define ET_ERROR_NETWORK -17
169 #define ET_ERROR_CLOSED -18
170 #define ET_ERROR_JAVASYS -19
173 /* Debug levels */
174 #define ET_DEBUG_NONE 0
175 #define ET_DEBUG_SEVERE 1
176 #define ET_DEBUG_ERROR 2
177 #define ET_DEBUG_WARN 3
178 #define ET_DEBUG_INFO 4
180 /* Event priority */
181 #define ET_LOW 0
182 #define ET_HIGH 1
184 #define ET_PRIORITY_MASK 1
187 #define ET_SYS -1
189 #define ET_END -1
190 
192 #define ET_NEWHEAD -2
193 
194 /* Event is temporary or not */
195 #define ET_EVENT_TEMP 1
197 #define ET_EVENT_NORMAL 0
199 /* Event is new (obtained thru et_event(s)_new) or not */
200 #define ET_EVENT_NEW 1
202 #define ET_EVENT_USED 0
204 /* Event get/new routines' wait mode flags */
205 #define ET_SLEEP 0
206 #define ET_TIMED 1
208 #define ET_ASYNC 2
209 #define ET_WAIT_MASK 3
210 /* event get/new routines' event flow flags */
211 #define ET_MODIFY 4
212 #define ET_MODIFY_HEADER 8
213 #define ET_DUMP 16
215 #define ET_NOALLOC 32
217 /* et_open waiting modes */
218 #define ET_OPEN_NOWAIT 0
219 #define ET_OPEN_WAIT 1
221 /* Are we remote or local? */
222 #define ET_REMOTE 0
223 #define ET_LOCAL 1
224 #define ET_LOCAL_NOSHARE 2
226 /* Use broadcast, multicast, both or direct connection to find server port */
227 #define ET_MULTICAST 0
228 #define ET_BROADCAST 1
229 #define ET_DIRECT 2
230 #define ET_BROADANDMULTICAST 3
232 /* Options for et_open_config_add(remove)broadcast */
233 #define ET_SUBNET_ALL ".subnetsAll"
235 /* Status of data in an event */
236 #define ET_DATA_OK 0
237 #define ET_DATA_CORRUPT 1
238 #define ET_DATA_POSSIBLY_CORRUPT 2
239 #define ET_DATA_MASK 0x30
240 #define ET_DATA_SHIFT 4
242 /* Endian values */
243 #define ET_ENDIAN_BIG 0
244 #define ET_ENDIAN_LITTLE 1
245 #define ET_ENDIAN_LOCAL 2
246 #define ET_ENDIAN_NOTLOCAL 3
247 #define ET_ENDIAN_SWITCH 4
249 /* do we swap data or not? */
250 #define ET_NOSWAP 0
251 #define ET_SWAP 1
253 /* Macros for swapping ints of various sizes */
256 #define ET_SWAP16(x) \
257  ((uint16_t)((((uint16_t)(x)) >> 8) | \
258  (((uint16_t)(x)) << 8)))
259 
261 #define ET_SWAP32(x) \
262  ((uint32_t)((((uint32_t)(x)) >> 24) | \
263  (((uint32_t)(x) & 0x00ff0000) >> 8) | \
264  (((uint32_t)(x) & 0x0000ff00) << 8) | \
265  (((uint32_t)(x)) << 24)))
266 
268 #define ET_SWAP64(x) \
269  ((uint64_t)((((uint64_t)(x)) >> 56) | \
270  (((uint64_t)(x) & 0x00ff000000000000ULL) >> 40) | \
271  (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | \
272  (((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | \
273  (((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | \
274  (((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | \
275  (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | \
276  (((uint64_t)(x)) << 56)))
277 
278 
281 #define err_abort(code,text) do { \
282  fprintf (stderr, "%s at \"%s\":%d: %s\n", \
283  text, __FILE__, __LINE__, strerror (code)); \
284  exit (-1); \
285 } while (0)
286 
287 
288 /* STRUCTURES */
289 
294 typedef struct et_event_t {
295  struct et_event_t *next;
296  void *tempdata;
302  void *pdata;
304  char *data;
305  uint64_t length;
306  uint64_t memsize;
308  /* for remote events */
309  uint64_t pointer;
311  int modify;
317  /* ----------------- */
318 
319  int priority;
320  int owner;
321  int temp;
322  int age;
324  int datastatus;
326  int byteorder;
327  int group;
329  int place;
334 
336 typedef int (*ET_SWAP_FUNCPTR) (et_event *, et_event*, int, int);
338 /* TYPES */
339 typedef void *et_sys_id;
340 typedef void *et_statconfig;
341 typedef void *et_sysconfig;
342 typedef void *et_openconfig;
343 typedef void *et_bridgeconfig;
344 typedef int et_stat_id;
345 typedef int et_proc_id;
346 typedef int et_att_id;
348 /***********************/
349 /* Extern declarations */
350 /***********************/
352 /* event functions */
353 extern int et_event_new(et_sys_id id, et_att_id att, et_event **pe,
354  int mode, struct timespec *deltatime, size_t size);
355 extern int et_events_new(et_sys_id id, et_att_id att, et_event *pe[],
356  int mode, struct timespec *deltatime, size_t size,
357  int num, int *nread);
358 extern int et_event_new_group(et_sys_id id, et_att_id att, et_event **pe,
359  int mode, struct timespec *deltatime,
360  size_t size, int group);
361 extern int et_events_new_group(et_sys_id id, et_att_id att, et_event *pe[],
362  int mode, struct timespec *deltatime,
363  size_t size, int num, int group, int *nread);
364 
365 extern int et_event_get(et_sys_id id, et_att_id att, et_event **pe,
366  int mode, struct timespec *deltatime);
367 extern int et_events_get(et_sys_id id, et_att_id att, et_event *pe[],
368  int mode, struct timespec *deltatime,
369  int num, int *nread);
370 
371 extern int et_event_put(et_sys_id id, et_att_id att, et_event *pe);
372 extern int et_events_put(et_sys_id id, et_att_id att, et_event *pe[],
373  int num);
374 
375 extern int et_event_dump(et_sys_id id, et_att_id att, et_event *pe);
376 extern int et_events_dump(et_sys_id id, et_att_id att, et_event *pe[],
377  int num);
378 
379 extern int et_event_getgroup(et_event *pe, int *grp);
380 
381 extern int et_event_setpriority(et_event *pe, int pri);
382 extern int et_event_getpriority(et_event *pe, int *pri);
383 
384 extern int et_event_setlength(et_event *pe, size_t len);
385 extern int et_event_getlength(et_event *pe, size_t *len);
386 
387 extern int et_event_setcontrol(et_event *pe, int con[], int num);
388 extern int et_event_getcontrol(et_event *pe, int con[]);
389 
390 extern int et_event_setdatastatus(et_event *pe, int datastatus);
391 extern int et_event_getdatastatus(et_event *pe, int *datastatus);
392 
393 extern int et_event_setendian(et_event *pe, int endian);
394 extern int et_event_getendian(et_event *pe, int *endian);
395 
396 extern int et_event_getdata(et_event *pe, void **data);
397 extern int et_event_setdatabuffer(et_sys_id id, et_event *pe, void *data);
398 extern int et_event_needtoswap(et_event *pe, int *swap);
399 
400 /* system functions */
401 extern int et_open(et_sys_id* id, const char *filename, et_openconfig openconfig);
402 extern int et_close(et_sys_id id);
403 extern int et_forcedclose(et_sys_id id);
404 extern int et_kill(et_sys_id id);
405 extern int et_system_start(et_sys_id* id, et_sysconfig sconfig);
406 extern int et_system_close(et_sys_id id);
407 extern int et_alive(et_sys_id id);
408 extern int et_wait_for_alive(et_sys_id id);
409 extern char* et_perror(int err);
410 
411 /* attachment functions */
412 extern int et_wakeup_attachment(et_sys_id id, et_att_id att);
413 extern int et_wakeup_all(et_sys_id id, et_stat_id stat_id);
414 extern int et_attach_geteventsput(et_sys_id id, et_att_id att_id,
415  uint64_t *events);
416 extern int et_attach_geteventsget(et_sys_id id, et_att_id att_id,
417  uint64_t *events);
418 extern int et_attach_geteventsdump(et_sys_id id, et_att_id att_id,
419  uint64_t *events);
420 extern int et_attach_geteventsmake(et_sys_id id, et_att_id att_id,
421  uint64_t *events);
422 
423 /* station manipulation */
424 extern int et_station_create_at(et_sys_id id, et_stat_id *stat_id,
425  const char *stat_name, et_statconfig sconfig,
426  int position, int parallelposition);
427 extern int et_station_create(et_sys_id id, et_stat_id *stat_id,
428  const char *stat_name, et_statconfig sconfig);
429 extern int et_station_remove(et_sys_id id, et_stat_id stat_id);
430 extern int et_station_attach(et_sys_id id, et_stat_id stat_id,
431  et_att_id *att);
432 extern int et_station_detach(et_sys_id id, et_att_id att);
433 extern int et_station_setposition(et_sys_id id, et_stat_id stat_id, int position,
434  int parallelposition);
435 extern int et_station_getposition(et_sys_id id, et_stat_id stat_id, int *position,
436  int *parallelposition);
437 
438 /***************************************************************/
439 /* routines to store and read station config parameters used */
440 /* to define a station upon its creation. */
441 /***************************************************************/
442 extern int et_station_config_init(et_statconfig* sconfig);
443 extern int et_station_config_destroy(et_statconfig sconfig);
444 
445 extern int et_station_config_setblock(et_statconfig sconfig, int val);
446 extern int et_station_config_getblock(et_statconfig sconfig, int *val);
447 
448 extern int et_station_config_setflow(et_statconfig sconfig, int val);
449 extern int et_station_config_getflow(et_statconfig sconfig, int *val);
450 
451 extern int et_station_config_setselect(et_statconfig sconfig, int val);
452 extern int et_station_config_getselect(et_statconfig sconfig, int *val);
453 
454 extern int et_station_config_setuser(et_statconfig sconfig, int val);
455 extern int et_station_config_getuser(et_statconfig sconfig, int *val);
456 
457 extern int et_station_config_setrestore(et_statconfig sconfig, int val);
458 extern int et_station_config_getrestore(et_statconfig sconfig, int *val);
459 
460 extern int et_station_config_setcue(et_statconfig sconfig, int val);
461 extern int et_station_config_getcue(et_statconfig sconfig, int *val);
462 
463 extern int et_station_config_setprescale(et_statconfig sconfig, int val);
464 extern int et_station_config_getprescale(et_statconfig sconfig, int *val);
465 
466 extern int et_station_config_setselectwords(et_statconfig sconfig, int val[]);
467 extern int et_station_config_getselectwords(et_statconfig sconfig, int val[]);
468 
469 extern int et_station_config_setfunction(et_statconfig sconfig, const char *val);
470 extern int et_station_config_getfunction(et_statconfig sconfig, char *val);
471 
472 extern int et_station_config_setlib(et_statconfig sconfig, const char *val);
473 extern int et_station_config_getlib(et_statconfig sconfig, char *val);
474 
475 extern int et_station_config_setclass(et_statconfig sconfig, const char *val);
476 extern int et_station_config_getclass(et_statconfig sconfig, char *val);
477 
478 /**************************************************************/
479 /* routines to get & set existing station's parameters */
480 /**************************************************************/
481 extern int et_station_isattached(et_sys_id id, et_stat_id stat_id, et_att_id att);
482 extern int et_station_exists(et_sys_id id, et_stat_id *stat_id, const char *stat_name);
483 extern int et_station_name_to_id(et_sys_id id, et_stat_id *stat_id, const char *stat_name);
484 
485 extern int et_station_getattachments(et_sys_id id, et_stat_id stat_id, int *numatts);
486 extern int et_station_getstatus(et_sys_id id, et_stat_id stat_id, int *status);
487 extern int et_station_getinputcount(et_sys_id id, et_stat_id stat_id, int *cnt);
488 extern int et_station_getoutputcount(et_sys_id id, et_stat_id stat_id, int *cnt);
489 extern int et_station_getselect(et_sys_id id, et_stat_id stat_id, int *select);
490 extern int et_station_getlib(et_sys_id id, et_stat_id stat_id, char *lib);
491 extern int et_station_getclass(et_sys_id id, et_stat_id stat_id, char *classs);
492 extern int et_station_getfunction(et_sys_id id, et_stat_id stat_id,
493  char *function);
494 
495 extern int et_station_getblock(et_sys_id id, et_stat_id stat_id, int *block);
496 extern int et_station_setblock(et_sys_id id, et_stat_id stat_id, int block);
497 
498 extern int et_station_getrestore(et_sys_id id, et_stat_id stat_id, int *restore);
499 extern int et_station_setrestore(et_sys_id id, et_stat_id stat_id, int restore);
500 
501 extern int et_station_getuser(et_sys_id id, et_stat_id stat_id, int *user);
502 extern int et_station_setuser(et_sys_id id, et_stat_id stat_id, int user);
503 
504 extern int et_station_getprescale(et_sys_id id, et_stat_id stat_id,int *prescale);
505 extern int et_station_setprescale(et_sys_id id, et_stat_id stat_id,int prescale);
506 
507 extern int et_station_getcue(et_sys_id id, et_stat_id stat_id, int *cue);
508 extern int et_station_setcue(et_sys_id id, et_stat_id stat_id, int cue);
509 
510 extern int et_station_getselectwords(et_sys_id id, et_stat_id stat_id, int select[]);
511 extern int et_station_setselectwords(et_sys_id id, et_stat_id stat_id, int select[]);
512 
513 
514 /*************************************************************/
515 /* routines to store and read system config parameters used */
516 /* to define a system upon its creation. */
517 /*************************************************************/
518 extern int et_system_config_init(et_sysconfig *sconfig);
519 extern int et_system_config_destroy(et_sysconfig sconfig);
520 
521 extern int et_system_config_setevents(et_sysconfig sconfig, int val);
522 extern int et_system_config_getevents(et_sysconfig sconfig, int *val);
523 
524 extern int et_system_config_setsize(et_sysconfig sconfig, size_t val);
525 extern int et_system_config_getsize(et_sysconfig sconfig, size_t *val);
526 
527 extern int et_system_config_settemps(et_sysconfig sconfig, int val);
528 extern int et_system_config_gettemps(et_sysconfig sconfig, int *val);
529 
530 extern int et_system_config_setstations(et_sysconfig sconfig, int val);
531 extern int et_system_config_getstations(et_sysconfig sconfig, int *val);
532 
533 extern int et_system_config_setprocs(et_sysconfig sconfig, int val);
534 extern int et_system_config_getprocs(et_sysconfig sconfig, int *val);
535 
536 extern int et_system_config_setattachments(et_sysconfig sconfig, int val);
537 extern int et_system_config_getattachments(et_sysconfig sconfig, int *val);
538 
539 extern int et_system_config_setgroups(et_sysconfig sconfig, int groups[], int size);
540 
541 extern int et_system_config_setfile(et_sysconfig sconfig, const char *val);
542 extern int et_system_config_getfile(et_sysconfig sconfig, char *val);
543 
544 /* does nothing, only here for backwards compatibility
545 extern int et_system_config_setcast(et_sysconfig sconfig, int val);
546 extern int et_system_config_getcast(et_sysconfig sconfig, int *val);
547 */
548 
549 extern int et_system_config_setport(et_sysconfig sconfig, int val);
550 extern int et_system_config_getport(et_sysconfig sconfig, int *val);
551 
552 extern int et_system_config_setserverport(et_sysconfig sconfig, int val);
553 extern int et_system_config_getserverport(et_sysconfig sconfig, int *val);
554 
555 /* deprecated, use ...addmulticast and ...removemulticast instead
556 extern int et_system_config_setaddress(et_sysconfig sconfig, const char *val);
557 extern int et_system_config_getaddress(et_sysconfig sconfig, char *val);
558 */
559 
560 extern int et_system_config_addmulticast(et_sysconfig sconfig, const char *val);
561 extern int et_system_config_removemulticast(et_sysconfig sconfig, const char *val);
562 
563 extern int et_system_config_settcp(et_sysconfig sconfig, int rBufSize, int sBufSize, int noDelay);
564 extern int et_system_config_gettcp(et_sysconfig sconfig, int *rBufSize, int *sBufSize, int *noDelay);
565 
566 /*************************************************************/
567 /* routines to store & read system information */
568 /*************************************************************/
569 extern int et_system_setgroup(et_sys_id id, int group);
570 extern int et_system_getgroup(et_sys_id id, int *group);
571 extern int et_system_setdebug(et_sys_id id, int debug);
572 extern int et_system_getdebug(et_sys_id id, int *debug);
573 extern int et_system_getlocality(et_sys_id id, int *locality);
574 extern int et_system_getnumevents(et_sys_id id, int *numevents);
575 extern int et_system_geteventsize(et_sys_id id, size_t *eventsize);
576 extern int et_system_gettempsmax(et_sys_id id, int *tempsmax);
577 extern int et_system_getstationsmax(et_sys_id id, int *stationsmax);
578 extern int et_system_getprocsmax(et_sys_id id, int *procsmax);
579 extern int et_system_getattsmax(et_sys_id id, int *attsmax);
580 extern int et_system_getheartbeat(et_sys_id id, int *heartbeat);
581 extern int et_system_getpid(et_sys_id id, pid_t *pid);
582 extern int et_system_getprocs(et_sys_id id, int *procs);
583 extern int et_system_getattachments(et_sys_id id, int *atts);
584 extern int et_system_getstations(et_sys_id id, int *stations);
585 extern int et_system_gettemps(et_sys_id id, int *temps);
586 extern int et_system_getserverport(et_sys_id id, int *port);
587 extern int et_system_gethost(et_sys_id id, char *host);
588 extern int et_system_getlocaladdress(et_sys_id id, char *address);
589 
590 /*************************************************************/
591 /* routines to store and read system config parameters used */
592 /* to open an ET system */
593 /*************************************************************/
594 extern int et_open_config_init(et_openconfig *sconfig);
595 extern int et_open_config_destroy(et_openconfig sconfig);
596 
597 extern int et_open_config_setwait(et_openconfig sconfig, int val);
598 extern int et_open_config_getwait(et_openconfig sconfig, int *val);
599 
600 extern int et_open_config_setcast(et_openconfig sconfig, int val);
601 extern int et_open_config_getcast(et_openconfig sconfig, int *val);
602 
603 extern int et_open_config_setTTL(et_openconfig sconfig, int val);
604 extern int et_open_config_getTTL(et_openconfig sconfig, int *val);
605 
606 extern int et_open_config_setmode(et_openconfig sconfig, int val);
607 extern int et_open_config_getmode(et_openconfig sconfig, int *val);
608 
609 extern int et_open_config_setdebugdefault(et_openconfig sconfig, int val);
610 extern int et_open_config_getdebugdefault(et_openconfig sconfig, int *val);
611 
612 extern int et_open_config_setport(et_openconfig sconfig, int val);
613 extern int et_open_config_getport(et_openconfig sconfig, int *val);
614 
615 extern int et_open_config_setserverport(et_openconfig sconfig, int val);
616 extern int et_open_config_getserverport(et_openconfig sconfig, int *val);
617 
618 extern int et_open_config_settimeout(et_openconfig sconfig, struct timespec val);
619 extern int et_open_config_gettimeout(et_openconfig sconfig, struct timespec *val);
620 
621 /* deprecated, use ...addbroadcast, ...addmulticast, etc. instead */
622 extern int et_open_config_setaddress(et_openconfig sconfig, const char *val);
623 extern int et_open_config_getaddress(et_openconfig sconfig, char *val);
624 
625 extern int et_open_config_sethost(et_openconfig sconfig, const char *val);
626 extern int et_open_config_gethost(et_openconfig sconfig, char *val);
627 
628 extern int et_open_config_addbroadcast(et_openconfig sconfig, const char *val);
629 extern int et_open_config_removebroadcast(et_openconfig sconfig, const char *val);
630 
631 extern int et_open_config_addmulticast(et_openconfig sconfig, const char *val);
632 extern int et_open_config_removemulticast(et_openconfig sconfig, const char *val);
633 
634 extern int et_open_config_setpolicy(et_openconfig sconfig, int val);
635 extern int et_open_config_getpolicy(et_openconfig sconfig, int *val);
636 
637 extern int et_open_config_setinterface(et_openconfig sconfig, const char *val);
638 extern int et_open_config_getinterface(et_openconfig sconfig, char *val);
639 
640 extern int et_open_config_settcp(et_openconfig sconfig, int rBufSize, int sBufSize, int noDelay);
641 extern int et_open_config_gettcp(et_openconfig sconfig, int *rBufSize, int *sBufSize, int *noDelay);
642 
643 
644 /*************************************************************
645  * routines to store and read system bridge parameters used *
646  * to bridge (transfer events between) 2 ET systems *
647  *************************************************************/
648 extern int et_bridge_config_init(et_bridgeconfig *config);
649 extern int et_bridge_config_destroy(et_bridgeconfig sconfig);
650 
651 extern int et_bridge_config_setmodefrom(et_bridgeconfig config, int val);
652 extern int et_bridge_config_getmodefrom(et_bridgeconfig config, int *val);
653 
654 extern int et_bridge_config_setmodeto(et_bridgeconfig config, int val);
655 extern int et_bridge_config_getmodeto(et_bridgeconfig config, int *val);
656 
657 extern int et_bridge_config_setchunkfrom(et_bridgeconfig config, int val);
658 extern int et_bridge_config_getchunkfrom(et_bridgeconfig config, int *val);
659 
660 extern int et_bridge_config_setchunkto(et_bridgeconfig config, int val);
661 extern int et_bridge_config_getchunkto(et_bridgeconfig config, int *val);
662 
663 extern int et_bridge_config_settimeoutfrom(et_bridgeconfig config, struct timespec val);
664 extern int et_bridge_config_gettimeoutfrom(et_bridgeconfig config, struct timespec *val);
665 
666 extern int et_bridge_config_settimeoutto(et_bridgeconfig config, struct timespec val);
667 extern int et_bridge_config_gettimeoutto(et_bridgeconfig config, struct timespec *val);
668 
669 extern int et_bridge_config_setfunc(et_bridgeconfig config, ET_SWAP_FUNCPTR func);
670 
671 extern int et_events_bridge(et_sys_id id_from, et_sys_id id_to,
672  et_att_id att_from, et_att_id att_to,
673  et_bridgeconfig bconfig,
674  int num, int *ntransferred);
675 
676 #ifdef __cplusplus
677 }
678 #endif
679 
680 #endif
int et_events_get(et_sys_id id, et_att_id att, et_event *pe[], int mode, struct timespec *deltatime, int num, int *nread)
This routine is called when a user wants to read an array of events from the ET system.
Definition: et_event.c:1156
int et_open_config_addbroadcast(et_openconfig sconfig, const char *val)
This routine adds an IP subnet broadcast address to a list of destinations used in broadcast discover...
Definition: et_openconfig.c:575
struct et_event_t * next
Next event in linked list.
Definition: et.h:306
int group
Group number, events are divided into groups for limiting the number of events producers have access ...
Definition: et.h:338
char * et_perror(int error)
This routine returns a string describing the given error condition.
Definition: et_common.c:470
int et_station_config_getclass(et_statconfig sconfig, char *val)
This routine gets a station configuration&#39;s name of the Java class which is used for loading a user&#39;s...
Definition: et_statconfig.c:736
int(* ET_SWAP_FUNCPTR)(et_event *, et_event *, int, int)
Used to define a data-swapping function.
Definition: et.h:347
int et_system_config_setevents(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s total number of events.
Definition: et_sysconfig.c:139
int et_station_config_getlib(et_statconfig sconfig, char *val)
This routine gets a station configuration&#39;s name of the shared library which is used for loading a us...
Definition: et_statconfig.c:675
int et_open_config_settimeout(et_openconfig sconfig, struct timespec val)
This routine sets the maximum time to wait for a valid ET system to be detected.
Definition: et_openconfig.c:522
int et_bridge_config_getmodeto(et_bridgeconfig config, int *val)
This routine gets the mode of getting new events from the &quot;to&quot; ET system.
Definition: et_bridge.c:206
int et_station_setuser(et_sys_id id, et_stat_id stat_id, int user)
This routine sets a station&#39;s user mode which is the maximum number of simultaneous attachments allow...
Definition: et_station.c:2055
int et_open_config_getcast(et_openconfig sconfig, int *val)
This routine gets the method for a remote user to discover the ET system.
Definition: et_openconfig.c:229
int et_open_config_getTTL(et_openconfig sconfig, int *val)
This routine gets the &quot;ttl&quot; value for multicasting.
Definition: et_openconfig.c:279
int et_stat_id
ET station id.
Definition: et.h:355
int et_station_config_getfunction(et_statconfig sconfig, char *val)
This routine gets a station configuration&#39;s name of the user-defined function which is loaded from a ...
Definition: et_statconfig.c:616
int et_station_config_init(et_statconfig *sconfig)
This routine initializes a configuration used to create a station in the ET system.
Definition: et_statconfig.c:49
int et_system_getheartbeat(et_sys_id id, int *heartbeat)
This routine gets the current value of the heartbeat of the ET system.
Definition: et_sysconfig.c:1255
uint64_t length
Size of actual data in bytes.
Definition: et.h:316
int et_station_config_getrestore(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s restore mode which determines where events go when the at...
Definition: et_statconfig.c:392
int et_station_getselect(et_sys_id id, et_stat_id stat_id, int *select)
This routine gets a station&#39;s select mode which determines the algorithm this station uses to decide ...
Definition: et_station.c:2745
int et_station_detach(et_sys_id id, et_att_id att)
This routine will detach the user from a station.
Definition: et_station.c:1044
int et_system_config_gettcp(et_sysconfig sconfig, int *rBufSize, int *sBufSize, int *noDelay)
This routine gets the configuration&#39;s TCP socket options used when communicating with remote users ov...
Definition: et_sysconfig.c:691
int et_open_config_settcp(et_openconfig sconfig, int rBufSize, int sBufSize, int noDelay)
This routine sets the parameters of any TCP connection to the ET system.
Definition: et_openconfig.c:1040
int et_bridge_config_settimeoutfrom(et_bridgeconfig config, struct timespec val)
This routine sets the time to wait for the &quot;from&quot; ET system during all et_events_get calls when the m...
Definition: et_bridge.c:323
int et_open_config_getport(et_openconfig sconfig, int *val)
This routine gets the port number for the UDP broad/multicasting used to discover the ET system...
Definition: et_openconfig.c:438
int et_system_config_getstations(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s maximum number of stations that may be created (including GRAND...
Definition: et_sysconfig.c:330
int et_system_config_settcp(et_sysconfig sconfig, int rBufSize, int sBufSize, int noDelay)
This routine sets the configuration&#39;s TCP socket options used when communicating with remote users ov...
Definition: et_sysconfig.c:655
void * et_openconfig
ET open configuration.
Definition: et.h:353
void * et_statconfig
ET station configuration.
Definition: et.h:351
int et_system_config_init(et_sysconfig *sconfig)
This routine initializes a configuration used to define an ET system.
Definition: et_sysconfig.c:61
int et_open_config_sethost(et_openconfig sconfig, const char *val)
This routine sets host or computer on which the ET system is running.
Definition: et_openconfig.c:923
void * et_bridgeconfig
ET bridge id.
Definition: et.h:354
int et_system_getlocaladdress(et_sys_id id, char *address)
This routine gets the local IP address, if any, used to connect remotely to the ET system...
Definition: et_sysconfig.c:1472
int et_open_config_setinterface(et_openconfig sconfig, const char *val)
This routine sets the network interface to use when communicating over the network with the ET system...
Definition: et_openconfig.c:979
int et_event_getdatastatus(et_event *pe, int *datastatus)
This routine gets an event&#39;s data status.
Definition: et_event.c:2010
int et_station_config_setselectwords(et_statconfig sconfig, int val[])
This routine sets a station configuration&#39;s array of selection integers.
Definition: et_statconfig.c:525
struct et_event_t et_event
This structure defines an Event which exists in shared memory, holds data, and gets passed from stati...
int et_open_config_gethost(et_openconfig sconfig, char *val)
This routine gets the host or computer on which the ET system is running.
Definition: et_openconfig.c:950
int et_system_config_gettemps(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s maximum number of temporary events.
Definition: et_sysconfig.c:279
int et_event_getdata(et_event *pe, void **data)
This routine gets the pointer to an event&#39;s data.
Definition: et_event.c:1900
int et_system_getpid(et_sys_id id, pid_t *pid)
This routine gets the unix process id of the ET system process.
Definition: et_sysconfig.c:1284
int et_system_setdebug(et_sys_id id, int debug)
This routine sets the level of debug output for the ET client.
Definition: et_sysconfig.c:1008
int et_bridge_config_init(et_bridgeconfig *config)
This routine initializes a configuration used to establish a bridge between 2 ET systems.
Definition: et_bridge.c:69
int et_station_config_setcue(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s queue size which is the max number of events allowed in t...
Definition: et_statconfig.c:421
int et_station_getstatus(et_sys_id id, et_stat_id stat_id, int *status)
This routine gets the status of a station which may be one of the following values.
Definition: et_station.c:1652
int et_system_config_addmulticast(et_sysconfig sconfig, const char *val)
This routine adds a multicast address to a list, each address of which the ET system is listening on ...
Definition: et_sysconfig.c:735
int priority
Event priority, either ET_HIGH or ET_LOW.
Definition: et.h:330
int et_system_config_setgroups(et_sysconfig sconfig, int groups[], int size)
This routine sets the configuration&#39;s number of event groups and how many events are in each group...
Definition: et_sysconfig.c:603
int et_station_config_getuser(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s user mode.
Definition: et_statconfig.c:328
char filename[ET_TEMPNAME_LENGTH]
Filename of temp event.
Definition: et.h:343
int et_event_setpriority(et_event *pe, int pri)
This routine sets the priority of an event to either ET_LOW which is the default or ET_HIGH...
Definition: et_event.c:1833
int et_station_getuser(et_sys_id id, et_stat_id stat_id, int *user)
This routine gets a station&#39;s user mode which is the maximum number of simultaneous attachments allow...
Definition: et_station.c:1986
int et_system_config_setserverport(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s TCP listening port number used to communicate with remote users...
Definition: et_sysconfig.c:538
int et_station_config_getflow(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s flow mode.
Definition: et_statconfig.c:194
int et_event_new(et_sys_id id, et_att_id att, et_event **pe, int mode, struct timespec *deltatime, size_t size)
This routine is called when a user wants a blank or fresh event from the ET system into which data ca...
Definition: et_event.c:124
int et_system_gettempsmax(et_sys_id id, int *tempsmax)
This routine gets the maximum number of temporary events allowed in the ET system.
Definition: et_sysconfig.c:1136
int et_station_getinputcount(et_sys_id id, et_stat_id stat_id, int *cnt)
This routine gets the number of events in a station&#39;s input list.
Definition: et_station.c:1710
int et_events_dump(et_sys_id id, et_att_id att, et_event *pe[], int num)
This routine is called when a user wants to get rid of an array of previously read or new events so t...
Definition: et_event.c:1690
int et_proc_id
ET process id.
Definition: et.h:356
int et_bridge_config_setchunkfrom(et_bridgeconfig config, int val)
This routine sets the maximum number of events to get from the &quot;from&quot; ET system in a single call to e...
Definition: et_bridge.c:230
int et_station_getcue(et_sys_id id, et_stat_id stat_id, int *cue)
This routine gets a station&#39;s queue size, the size of the input event list for nonblocking stations...
Definition: et_station.c:2437
int et_bridge_config_getchunkfrom(et_bridgeconfig config, int *val)
This routine gets the maximum number of events to get from the &quot;from&quot; ET system in a single call to e...
Definition: et_bridge.c:253
int et_station_getrestore(et_sys_id id, et_stat_id stat_id, int *restore)
This routine gets a station&#39;s restore mode which determines where events go when the attachment that ...
Definition: et_station.c:2128
int et_bridge_config_setfunc(et_bridgeconfig config, ET_SWAP_FUNCPTR func)
This routine sets the function used to automatically swap data from one endian to another when bridgi...
Definition: et_bridge.c:427
int et_event_setdatabuffer(et_sys_id id, et_event *pe, void *data)
This routine set an event&#39;s data buffer for a remote user.
Definition: et_remote.c:1683
int et_open_config_getserverport(et_openconfig sconfig, int *val)
This routine gets the TCP port number for opening an ET system directly without broadcasting or multi...
Definition: et_openconfig.c:491
int et_bridge_config_getchunkto(et_bridgeconfig config, int *val)
This routine gets the maximum number of new events to get from the &quot;to&quot; ET system in a single call to...
Definition: et_bridge.c:300
int et_event_getpriority(et_event *pe, int *pri)
This routine gets the priority of an event, either ET_LOW or ET_HIGH.
Definition: et_event.c:1852
int et_system_gettemps(et_sys_id id, int *temps)
This routine gets the number of temporary events currently in the ET system.
Definition: et_sysconfig.c:1400
int et_attach_geteventsdump(et_sys_id id, et_att_id att_id, uint64_t *events)
This routine gets the number of events an attachment dumped by calling et_event_dump, or et_events_dump.
Definition: et_attachment.c:325
int et_system_config_settemps(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s maximum number of temporary events.
Definition: et_sysconfig.c:251
int age
ET_EVENT_NEW if it&#39;s a new event, else ET_EVENT_USED (new events always go to GrandCentral if user cr...
Definition: et.h:333
int et_system_config_setport(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s UDP listening port used by remote users trying to find the ET s...
Definition: et_sysconfig.c:481
int et_system_start(et_sys_id *id, et_sysconfig sconfig)
This routine creates an ET system.
Definition: et_system.c:90
int et_event_setdatastatus(et_event *pe, int datastatus)
This routine sets an event&#39;s data status.
Definition: et_event.c:1977
int et_station_setposition(et_sys_id id, et_stat_id stat_id, int position, int parallelposition)
This routine sets a station&#39;s position in the linked list of active and idle stations and its positio...
Definition: et_station.c:1192
int et_system_close(et_sys_id id)
This routine closes or shuts down an ET system.
Definition: et_system.c:461
int et_open_config_getaddress(et_openconfig sconfig, char *val)
int et_open_config_gettcp(et_openconfig sconfig, int *rBufSize, int *sBufSize, int *noDelay)
This routine gets the parameters of any TCP connection to the ET system.
Definition: et_openconfig.c:1078
int et_station_config_setselect(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s select mode which determines the algorithm this station u...
Definition: et_statconfig.c:241
int et_system_config_getfile(et_sysconfig sconfig, char *val)
This routine gets the configuration&#39;s ET system file name.
Definition: et_sysconfig.c:880
int et_station_getattachments(et_sys_id id, et_stat_id stat_id, int *numatts)
This routine gets the number of attachments to the given station.
Definition: et_station.c:1582
int et_station_remove(et_sys_id id, et_stat_id stat_id)
This routine deletes a station provided it is not GRAND_CENTRAL and provided there are no attached pr...
Definition: et_station.c:726
int et_open_config_addmulticast(et_openconfig sconfig, const char *val)
This routine adds an IP multicast address to a list of destinations used in multicast discovery of th...
Definition: et_openconfig.c:728
int owner
Id of attachment that owns this event, else the system (-1).
Definition: et.h:331
uint64_t pointer
For remote events, pointer to this event in the server&#39;s space (used for writing of modified events)...
Definition: et.h:320
int et_open_config_setwait(et_openconfig sconfig, int val)
This routine sets the means to wait for a valid ET system to be detected.
Definition: et_openconfig.c:139
int et_alive(et_sys_id id)
This routine tells if an open ET system is alive (heartbeat is going).
Definition: et_common.c:415
int et_event_getendian(et_event *pe, int *endian)
This routine gets an event&#39;s data endian value.
Definition: et_event.c:2078
int et_event_setendian(et_event *pe, int endian)
This routine sets an event&#39;s data endian value.
Definition: et_event.c:2034
int et_station_config_setprescale(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s prescale value.
Definition: et_statconfig.c:472
int modify
When &quot;getting&quot; events from a remote client, this flag tells server whether this event will be modif...
Definition: et.h:322
int et_system_config_setstations(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s maximum number of stations that may be created (including GRAND...
Definition: et_sysconfig.c:303
int et_station_config_setblock(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s block mode.
Definition: et_statconfig.c:109
int et_system_config_getevents(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s total number of events.
Definition: et_sysconfig.c:173
int et_events_new_group(et_sys_id id, et_att_id att, et_event *pe[], int mode, struct timespec *deltatime, size_t size, int num, int group, int *nread)
This routine is called when a user wants an array of blank or fresh event from the ET system into whi...
Definition: et_event.c:668
int et_station_setcue(et_sys_id id, et_stat_id stat_id, int cue)
This routine sets a station&#39;s queue size, the size of the input event list for nonblocking stations...
Definition: et_station.c:2504
int et_station_config_getcue(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s queue size which is the max number of events allowed in t...
Definition: et_statconfig.c:449
int et_station_config_setlib(et_statconfig sconfig, const char *val)
This routine sets a station configuration&#39;s name of the shared library which is used for loading a us...
Definition: et_statconfig.c:642
int et_bridge_config_settimeoutto(et_bridgeconfig config, struct timespec val)
This routine sets the time to wait for the &quot;to&quot; ET system during all et_events_new calls when the mod...
Definition: et_bridge.c:369
int et_station_getposition(et_sys_id id, et_stat_id stat_id, int *position, int *parallelposition)
This routine gets a station&#39;s position in the linked list of active and idle stations and its positio...
Definition: et_station.c:1322
int et_open_config_setport(et_openconfig sconfig, int val)
This routine sets the port number for the UDP broad/multicasting used to discover the ET system...
Definition: et_openconfig.c:413
int et_system_getprocsmax(et_sys_id id, int *procsmax)
This routine gets the maximum number of local processes that are allowed to open the ET system...
Definition: et_sysconfig.c:1195
int et_station_getoutputcount(et_sys_id id, et_stat_id stat_id, int *cnt)
This routine gets the number of events in a station&#39;s output list.
Definition: et_station.c:1767
int et_station_config_destroy(et_statconfig sconfig)
This routine frees the memory allocated when a configuration is initialized by et_station_config_init...
Definition: et_statconfig.c:87
int et_station_getprescale(et_sys_id id, et_stat_id stat_id, int *prescale)
This routine gets a station&#39;s prescale value.
Definition: et_station.c:2285
int et_station_getclass(et_sys_id id, et_stat_id stat_id, char *classs)
This routine gets the Java class defining an event selection method provided by the user for Java-bas...
Definition: et_station.c:2894
int et_bridge_config_setchunkto(et_bridgeconfig config, int val)
This routine sets the maximum number of new events to get from the &quot;to&quot; ET system in a single call to...
Definition: et_bridge.c:277
int et_event_new_group(et_sys_id id, et_att_id att, et_event **pe, int mode, struct timespec *deltatime, size_t size, int group)
This routine is called when a user wants a blank or fresh event from the ET system into which it can ...
Definition: et_event.c:618
int et_system_config_getsize(et_sysconfig sconfig, size_t *val)
This routine gets the configuration&#39;s event size in bytes.
Definition: et_sysconfig.c:222
int et_wait_for_alive(et_sys_id id)
This routine waits until given ET system is alive.
Definition: et_common.c:440
int et_system_getattsmax(et_sys_id id, int *attsmax)
This routine gets the maximum number of attachments that are allowed to be made to the ET system...
Definition: et_sysconfig.c:1225
int temp
ET_EVENT_TEMP if temporary event, else ET_EVENT_NORMAL.
Definition: et.h:332
int et_system_setgroup(et_sys_id id, int group)
This routine sets the default group number of the ET client.
Definition: et_sysconfig.c:929
int et_open_config_getpolicy(et_openconfig sconfig, int *val)
This routine gets the return policy from calls to et_open.
Definition: et_openconfig.c:891
int et_close(et_sys_id id)
This routine closes an open ET system.
Definition: et_common.c:316
int et_open_config_setaddress(et_openconfig sconfig, const char *val)
int et_event_getgroup(et_event *pe, int *grp)
This routine gets the group number that the event is associated with.
Definition: et_event.c:1816
int et_attach_geteventsmake(et_sys_id id, et_att_id att_id, uint64_t *events)
This routine gets the number of events an attachment created by calling et_event_new, et_events_new, et_event_new_group, or et_events_new_group.
Definition: et_attachment.c:381
int et_events_bridge(et_sys_id id_from, et_sys_id id_to, et_att_id att_from, et_att_id att_to, et_bridgeconfig bconfig, int num, int *ntransferred)
This routine transfers events between two ET systems in which events are copied from the &quot;from&quot; ET sy...
Definition: et_bridge.c:475
int et_open(et_sys_id *id, const char *filename, et_openconfig openconfig)
This routine opens an ET system for client use.
Definition: et_common.c:188
int et_events_new(et_sys_id id, et_att_id att, et_event *pe[], int mode, struct timespec *deltatime, size_t size, int num, int *nread)
This routine is called when a user wants an array of blank or fresh events from the ET system into wh...
Definition: et_event.c:360
int et_system_config_setfile(et_sysconfig sconfig, const char *val)
This routine sets the configuration&#39;s ET system file name.
Definition: et_sysconfig.c:851
int et_bridge_config_getmodefrom(et_bridgeconfig config, int *val)
This routine gets the mode of getting events from the &quot;from&quot; ET system.
Definition: et_bridge.c:152
int et_open_config_setcast(et_openconfig sconfig, int val)
This routine sets the method for a remote user to discover the ET system.
Definition: et_openconfig.c:200
int et_bridge_config_setmodeto(et_bridgeconfig config, int val)
This routine sets the mode of getting new events from the &quot;to&quot; ET system.
Definition: et_bridge.c:177
int et_station_getfunction(et_sys_id id, et_stat_id stat_id, char *function)
This routine gets the name of the selection function in the shared library provided by the user...
Definition: et_station.c:2976
int et_forcedclose(et_sys_id id)
This routine closes an open ET system but differs from et_close in that it automatically closes all a...
Definition: et_common.c:349
int et_open_config_setTTL(et_openconfig sconfig, int val)
This routine sets the &quot;ttl&quot; value for multicasting.
Definition: et_openconfig.c:254
int et_wakeup_all(et_sys_id id, et_stat_id stat_id)
This routine wakes up all attachments waiting to read events.
Definition: et_attachment.c:127
int et_open_config_init(et_openconfig *sconfig)
This routine initializes a configuration used to open an ET system.
Definition: et_openconfig.c:49
void * pdata
Set to either data field pointer (shared mem), or to temp event buffer.
Definition: et.h:313
int et_open_config_getmode(et_openconfig sconfig, int *val)
This routine gets whether the ET system treats the user running this routine as local (if it is local...
Definition: et_openconfig.c:334
int et_att_id
ET attachment id.
Definition: et.h:357
int et_system_config_getport(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s UDP listening port used by remote users trying to find the ET s...
Definition: et_sysconfig.c:510
uint64_t memsize
Total size of available data memory in bytes.
Definition: et.h:317
int et_bridge_config_gettimeoutfrom(et_bridgeconfig config, struct timespec *val)
This routine gets the time to wait for the &quot;from&quot; ET system during all et_events_get calls when the m...
Definition: et_bridge.c:346
int et_system_config_setattachments(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s maximum number of attachments that may be created.
Definition: et_sysconfig.c:424
int et_event_getlength(et_event *pe, size_t *len)
This routine gets the length of an event&#39;s data in bytes.
Definition: et_event.c:1884
int et_system_config_setprocs(et_sysconfig sconfig, int val)
This routine sets the configuration&#39;s maximum number of processes that may be created.
Definition: et_sysconfig.c:363
int et_station_config_getblock(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s block mode.
Definition: et_statconfig.c:138
int et_open_config_destroy(et_openconfig sconfig)
This routine frees the memory allocated when an open configuration is initialized by et_open_config_i...
Definition: et_openconfig.c:100
int et_station_getblock(et_sys_id id, et_stat_id stat_id, int *block)
This routine gets the block mode of a station which may be ET_STATION_BLOCKING or ET_STATION_NONBLOCK...
Definition: et_station.c:1830
int et_event_dump(et_sys_id id, et_att_id att, et_event *pe)
This routine is called when a user wants to get rid of a single, previously read or new event so that...
Definition: et_event.c:1587
int et_station_exists(et_sys_id id, et_stat_id *stat_id, const char *stat_name)
This routine tells whether a station exists or not, given the name of a station, If it does...
Definition: et_station.c:1488
int et_station_setrestore(et_sys_id id, et_stat_id stat_id, int restore)
This routine sets a station&#39;s restore mode which determines where events go when the attachment that ...
Definition: et_station.c:2200
int et_station_setprescale(et_sys_id id, et_stat_id stat_id, int prescale)
This routine sets a station&#39;s prescale value.
Definition: et_station.c:2350
int et_system_config_destroy(et_sysconfig sconfig)
This routine frees the memory allocated when a system configuration is initialized by et_system_confi...
Definition: et_sysconfig.c:118
int et_system_config_removemulticast(et_sysconfig sconfig, const char *val)
This routine removes a multicast address from a list, so that the ET system no longer listens on it f...
Definition: et_sysconfig.c:795
void * tempdata
For MacOS or non mutex-sharing systems, a temp event gotten by the server thread needs its data point...
Definition: et.h:307
int et_open_config_setdebugdefault(et_openconfig sconfig, int val)
This routine sets the default level of debug output.
Definition: et_openconfig.c:361
int et_attach_geteventsget(et_sys_id id, et_att_id att_id, uint64_t *events)
This routine gets the number of events an attachment obtained by calling et_event_get, or et_events_get.
Definition: et_attachment.c:269
int et_event_get(et_sys_id id, et_att_id att, et_event **pe, int mode, struct timespec *deltatime)
This routine is called when a user wants to read a single event from the ET system.
Definition: et_event.c:937
#define ET_STATION_SELECT_INTS
Number of control integers associated with each station.
Definition: et.h:69
int byteorder
Use to track the data&#39;s endianness (set to 0x04030201).
Definition: et.h:337
int et_system_getstationsmax(et_sys_id id, int *stationsmax)
This routine gets the maximum number of stations allowed in the ET system.
Definition: et_sysconfig.c:1164
int et_system_getstations(et_sys_id id, int *stations)
This routine gets the number of stations in the ET system.
Definition: et_sysconfig.c:1370
char * data
Pointer to shared memory data.
Definition: et.h:315
int datastatus
ET_DATA_OK normally, ET_DATA_CORRUPT if data corrupt, ET_DATA_POSSIBLY_CORRUPT if data questionable...
Definition: et.h:335
int et_system_getprocs(et_sys_id id, int *procs)
This routine gets the number of local processes that have opened the ET system.
Definition: et_sysconfig.c:1314
int et_station_config_getselect(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s select mode.
Definition: et_statconfig.c:273
int et_station_getselectwords(et_sys_id id, et_stat_id stat_id, int select[])
This routine gets a station&#39;s array of selection integers used to select events.
Definition: et_station.c:2581
#define ET_TEMPNAME_LENGTH
Max length of temp event file name + 1, leaves room for _temp&lt;#######&gt;.
Definition: et.h:97
int et_open_config_setpolicy(et_openconfig sconfig, int val)
This routine sets the return policy from calls to et_open.
Definition: et_openconfig.c:862
int et_bridge_config_setmodefrom(et_bridgeconfig config, int val)
This routine sets the mode of getting events from the &quot;from&quot; ET system.
Definition: et_bridge.c:123
int et_open_config_getwait(et_openconfig sconfig, int *val)
This routine gets the means being used to wait for a valid ET system to be detected.
Definition: et_openconfig.c:164
int et_station_config_setflow(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s flow mode.
Definition: et_statconfig.c:166
int et_system_config_setsize(et_sysconfig sconfig, size_t val)
This routine sets the configuration&#39;s event size in bytes.
Definition: et_sysconfig.c:196
int et_open_config_getinterface(et_openconfig sconfig, char *val)
This routine gets the network interface being used to communicate over the network with the ET system...
Definition: et_openconfig.c:1011
int et_station_create(et_sys_id id, et_stat_id *stat_id, const char *stat_name, et_statconfig sconfig)
This routine creates a station provided that it does not already exist and the maximum number of stat...
Definition: et_station.c:707
int et_station_config_setfunction(et_statconfig sconfig, const char *val)
This routine sets a station configuration&#39;s name of the user-defined function which is loaded from a ...
Definition: et_statconfig.c:583
void * et_sysconfig
ET system configuration.
Definition: et.h:352
int et_station_config_getprescale(et_statconfig sconfig, int *val)
This routine gets a station configuration&#39;s prescale value.
Definition: et_statconfig.c:499
int et_station_isattached(et_sys_id id, et_stat_id stat_id, et_att_id att)
Is an attachment attached to a particular station?
Definition: et_station.c:1420
int et_event_setlength(et_event *pe, size_t len)
This routine sets the length of an event&#39;s data in bytes.
Definition: et_event.c:1868
int et_event_put(et_sys_id id, et_att_id att, et_event *pe)
This routine is called when a user wants to return a single, previously read or new event into the ET...
Definition: et_event.c:1357
int et_bridge_config_destroy(et_bridgeconfig sconfig)
This routine frees the memory allocated when a bridge configuration is initialized by et_bridge_confi...
Definition: et_bridge.c:103
int et_system_config_getprocs(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s maximum number of processes that may be created.
Definition: et_sysconfig.c:394
int et_open_config_gettimeout(et_openconfig sconfig, struct timespec *val)
This routine gets the maximum time to wait for a valid ET system to be detected.
Definition: et_openconfig.c:543
int et_station_setselectwords(et_sys_id id, et_stat_id stat_id, int select[])
This routine sets a station&#39;s array of selection integers used to select events.
Definition: et_station.c:2651
int et_system_config_getserverport(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s TCP listening port number used to communicate with remote users...
Definition: et_sysconfig.c:566
int et_event_needtoswap(et_event *pe, int *swap)
This routine indicates whether an event&#39;s data needs to be swapped or not.
Definition: et_event.c:2108
int et_bridge_config_gettimeoutto(et_bridgeconfig config, struct timespec *val)
This routine gets the time to wait for the &quot;to&quot; ET system during all et_events_new calls when the mod...
Definition: et_bridge.c:392
int et_system_getnumevents(et_sys_id id, int *numevents)
This routine gets the number of events in the ET system.
Definition: et_sysconfig.c:1087
int et_events_put(et_sys_id id, et_att_id att, et_event *pe[], int num)
This routine is called when a user wants to return an array of previously read or new events into the...
Definition: et_event.c:1465
This structure defines an Event which exists in shared memory, holds data, and gets passed from stati...
Definition: et.h:305
int et_open_config_getdebugdefault(et_openconfig sconfig, int *val)
This routine gets the default level of debug output.
Definition: et_openconfig.c:389
int et_event_setcontrol(et_event *pe, int con[], int num)
This routine sets the control array of an event.
Definition: et_event.c:1919
int et_station_config_setuser(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s user mode which is the maximum number of users which may ...
Definition: et_statconfig.c:300
int control[ET_STATION_SELECT_INTS]
Array of ints to select on for entry into station.
Definition: et.h:342
int et_open_config_setmode(et_openconfig sconfig, int val)
This routine sets whether the ET system treats the user running this routine as local (if it is local...
Definition: et_openconfig.c:307
int et_open_config_removemulticast(et_openconfig sconfig, const char *val)
This routine removes a multicast address from a list of destinations used in multicast discovery of t...
Definition: et_openconfig.c:791
int et_station_create_at(et_sys_id id, et_stat_id *stat_id, const char *stat_name, et_statconfig sconfig, int position, int parallelposition)
This routine creates a station provided that it does not already exist and the maximum number of stat...
Definition: et_station.c:365
int et_system_getgroup(et_sys_id id, int *group)
This routine gets the default group number of the ET client.
Definition: et_sysconfig.c:975
int et_open_config_setserverport(et_openconfig sconfig, int val)
This routine sets the TCP port number for opening an ET system directly without broadcasting or multi...
Definition: et_openconfig.c:466
int et_event_getcontrol(et_event *pe, int con[])
This routine gets the control array of an event.
Definition: et_event.c:1943
int et_system_gethost(et_sys_id id, char *host)
This routine gets the host of the ET system.
Definition: et_sysconfig.c:1449
int et_station_config_getselectwords(et_statconfig sconfig, int val[])
This routine gets a station configuration&#39;s array of selection integers.
Definition: et_statconfig.c:553
int place
Place number of event&#39;s relative position in shared mem starting with 0 (lowest memory position) and ...
Definition: et.h:340
int et_station_getlib(et_sys_id id, et_stat_id stat_id, char *lib)
This routine gets the name of the shared library containing an event selection function provided by t...
Definition: et_station.c:2812
int et_system_getserverport(et_sys_id id, int *port)
This routine gets the TCP listening port number of the ET system.
Definition: et_sysconfig.c:1426
int et_system_getattachments(et_sys_id id, int *atts)
This routine gets the number of attachments that have been made to the ET system. ...
Definition: et_sysconfig.c:1342
int et_station_attach(et_sys_id id, et_stat_id stat_id, et_att_id *att)
This routine will attach the user to a station.
Definition: et_station.c:872
int et_open_config_removebroadcast(et_openconfig sconfig, const char *val)
This routine removes an IP subnet broadcast address from a list of destinations used in broadcast dis...
Definition: et_openconfig.c:655
int et_station_setblock(et_sys_id id, et_stat_id stat_id, int block)
This routine sets a station&#39;s block mode.
Definition: et_station.c:1899
int et_system_geteventsize(et_sys_id id, size_t *eventsize)
This routine gets the size of an event in bytes in the ET system.
Definition: et_sysconfig.c:1109
int et_attach_geteventsput(et_sys_id id, et_att_id att_id, uint64_t *events)
This routine gets the number of events an attachment put by calling et_event_put or et_events_put...
Definition: et_attachment.c:213
int et_kill(et_sys_id id)
This routine kills an open ET system.
Definition: et_common.c:381
int et_system_getdebug(et_sys_id id, int *debug)
This routine gets the level of debug output for the ET client.
Definition: et_sysconfig.c:1038
int et_system_getlocality(et_sys_id id, int *locality)
This routine gets the locality of the ET client.
Definition: et_sysconfig.c:1065
int et_system_config_getattachments(et_sysconfig sconfig, int *val)
This routine gets the configuration&#39;s maximum number of attachments that may be created.
Definition: et_sysconfig.c:455
int et_station_config_setclass(et_statconfig sconfig, const char *val)
This routine sets a station configuration&#39;s name of the Java class which is used for loading a user&#39;s...
Definition: et_statconfig.c:702
int et_station_name_to_id(et_sys_id id, et_stat_id *stat_id, const char *stat_name)
This routine gives a station id, given the name of a station,.
Definition: et_station.c:1552
int et_wakeup_attachment(et_sys_id id, et_att_id att)
This routine wakes up a specific attachment waiting to read events.
Definition: et_attachment.c:41
int et_station_config_setrestore(et_statconfig sconfig, int val)
This routine sets a station configuration&#39;s restore mode which determines where events go when the at...
Definition: et_statconfig.c:360
void * et_sys_id
ET system id.
Definition: et.h:350