EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbScan.h
1 /*************************************************************************\
2 * Copyright (c) 2008 UChicago Argonne LLC, 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 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /*
11  * Author: Marty Kraimer
12  * Date: 07-17-91
13  */
14 
15 #ifndef INCdbScanH
16 #define INCdbScanH
17 
18 #include <limits.h>
19 
20 #include "menuScan.h"
21 #include "dbCoreAPI.h"
22 #include "compilerDependencies.h"
23 #include "devSup.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #define SCAN_PASSIVE menuScanPassive
30 #define SCAN_EVENT menuScanEvent
31 #define SCAN_IO_EVENT menuScanI_O_Intr
32 #define SCAN_1ST_PERIODIC (menuScanI_O_Intr + 1)
33 
34 #define MAX_PHASE SHRT_MAX
35 #define MIN_PHASE SHRT_MIN
36 
37 /*definitions for I/O Interrupt Scanning */
38 /* IOSCANPVT now defined in devSup.h */
39 typedef struct event_list *EVENTPVT;
40 
41 struct dbCommon;
42 
43 typedef void (*io_scan_complete)(void *usr, IOSCANPVT, int prio);
44 typedef void (*once_complete)(void *usr, struct dbCommon*);
45 
46 typedef struct scanOnceQueueStats {
47  int size;
48  int numUsed;
49  int maxUsed;
50  int numOverflow;
52 
53 DBCORE_API long scanInit(void);
54 DBCORE_API void scanRun(void);
55 DBCORE_API void scanPause(void);
56 DBCORE_API void scanStop(void);
57 DBCORE_API void scanCleanup(void);
58 
59 DBCORE_API EVENTPVT eventNameToHandle(const char* event);
60 DBCORE_API void postEvent(EVENTPVT epvt);
61 DBCORE_API void post_event(int event);
62 DBCORE_API void scanAdd(struct dbCommon *);
63 DBCORE_API void scanDelete(struct dbCommon *);
64 DBCORE_API double scanPeriod(int scan);
65 DBCORE_API int scanOnce(struct dbCommon *);
66 DBCORE_API int scanOnceCallback(struct dbCommon *, once_complete cb, void *usr);
67 DBCORE_API int scanOnceSetQueueSize(int size);
68 DBCORE_API int scanOnceQueueStatus(const int reset, scanOnceQueueStats *result);
69 DBCORE_API void scanOnceQueueShow(const int reset);
70 
71 /*print periodic lists*/
72 DBCORE_API int scanppl(double rate);
73 
74 /*print event lists*/
75 DBCORE_API int scanpel(const char *event_name);
76 
77 /*print io_event list*/
78 DBCORE_API int scanpiol(void);
79 
80 DBCORE_API void scanIoInit(IOSCANPVT *ppios);
81 DBCORE_API unsigned int scanIoRequest(IOSCANPVT pios);
82 DBCORE_API unsigned int scanIoImmediate(IOSCANPVT pios, int prio);
83 DBCORE_API void scanIoSetComplete(IOSCANPVT, io_scan_complete, void *usr);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif
epicsEnum16 prio
Scheduling Priority.
Definition: dbCommon.h:59
Declaration of dbCommon.
Definition: dbCommon.h:18
Compiler specific declarations.
Device support routines.