EPICS Base  7.0.5.1
dbEvent.h
1 /*************************************************************************\
2 * Copyright (c) 2010 Brookhaven National Laboratory.
3 * Copyright (c) 2010 Helmholtz-Zentrum Berlin
4 * fuer Materialien und Energie GmbH.
5 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
6 * National Laboratory.
7 * Copyright (c) 2002 The Regents of the University of California, as
8 * Operator of Los Alamos National Laboratory.
9 * SPDX-License-Identifier: EPICS
10 * EPICS BASE is distributed subject to a Software License Agreement found
11 * in file LICENSE that is included with this distribution.
12 \*************************************************************************/
13 
14 /*
15  * Author: Jeffrey O. Hill <johill@lanl.gov>
16  *
17  * Ralph Lange <Ralph.Lange@bessy.de>
18  */
19 
20 #ifndef INCLdbEventh
21 #define INCLdbEventh
22 
23 #ifdef epicsExportSharedSymbols
24 # undef epicsExportSharedSymbols
25 # define INCLdbEventhExporting
26 #endif
27 
28 #include "epicsThread.h"
29 
30 #ifdef INCLdbEventhExporting
31 # define epicsExportSharedSymbols
32 #endif
33 
34 #include "shareLib.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 struct dbChannel;
41 struct db_field_log;
42 struct evSubscrip;
43 
44 epicsShareFunc int db_event_list (
45  const char *name, unsigned level);
46 epicsShareFunc int dbel (
47  const char *name, unsigned level);
48 epicsShareFunc int db_post_events (
49  void *pRecord, void *pField, unsigned caEventMask );
50 
51 typedef void * dbEventCtx;
52 
53 typedef void EXTRALABORFUNC (void *extralabor_arg);
54 epicsShareFunc dbEventCtx db_init_events (void);
55 epicsShareFunc int db_start_events (
56  dbEventCtx ctx, const char *taskname, void (*init_func)(void *),
57  void *init_func_arg, unsigned osiPriority );
58 epicsShareFunc void db_close_events (dbEventCtx ctx);
59 epicsShareFunc void db_event_flow_ctrl_mode_on (dbEventCtx ctx);
60 epicsShareFunc void db_event_flow_ctrl_mode_off (dbEventCtx ctx);
61 epicsShareFunc int db_add_extra_labor_event (
62  dbEventCtx ctx, EXTRALABORFUNC *func, void *arg);
63 epicsShareFunc void db_flush_extra_labor_event (dbEventCtx);
64 epicsShareFunc int db_post_extra_labor (dbEventCtx ctx);
65 epicsShareFunc void db_event_change_priority ( dbEventCtx ctx, unsigned epicsPriority );
66 
67 #ifdef EPICS_PRIVATE_API
68 epicsShareFunc void db_cleanup_events(void);
69 epicsShareFunc void db_init_event_freelists (void);
70 #endif
71 
72 typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
73  int eventsRemaining, struct db_field_log *pfl);
74 
75 typedef void * dbEventSubscription;
76 epicsShareFunc dbEventSubscription db_add_event (
77  dbEventCtx ctx, struct dbChannel *chan,
78  EVENTFUNC *user_sub, void *user_arg, unsigned select);
79 epicsShareFunc void db_cancel_event (dbEventSubscription es);
80 epicsShareFunc void db_post_single_event (dbEventSubscription es);
81 epicsShareFunc void db_event_enable (dbEventSubscription es);
82 epicsShareFunc void db_event_disable (dbEventSubscription es);
83 
84 epicsShareFunc struct db_field_log* db_create_event_log (struct evSubscrip *pevent);
85 epicsShareFunc struct db_field_log* db_create_read_log (struct dbChannel *chan);
86 epicsShareFunc void db_delete_field_log (struct db_field_log *pfl);
87 epicsShareFunc int db_available_logs(void);
88 
89 #define DB_EVENT_OK 0
90 #define DB_EVENT_ERROR (-1)
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif /*INCLdbEventh*/
C++ and C descriptions for a thread.
Mark external symbols and entry points for shared libraries.