-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBsaCoreIntegration.README
108 lines (72 loc) · 3.35 KB
/
BsaCoreIntegration.README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Integration with BsaCore
------------------------
To implement BSA functions in ioc,
we need to integrate BsaCore and DataSink into the ioc.
1. Integration BsaCore into the ioc
The configure/RELEASE file should have setting for BSACORE.
BSACORE_MODULE_VERSION=BsaCore-git
BSACORE=/afs/slac/g/lcls/epics/iocTop/users/khkim/LCLS2Timing/t/temp/BsaCore/$(BSACORE_MODULE_VERSION)
Note, currently I tested BsaCore in my sandbox. There are some build issue in Makefile.
Till is goingto release new an official version. In the meanwhile, we can use my sandbox version BsaCore
The <application>App/src/Makefile shoud have setting for BsaCore DBD and library.
<application>_DBD += bsaCore.dbd
<application>_LIBS += BsaCore
2. Integration BsaSinker (PV interface)
Till implemented the Bsa Sinker (PV interface) in event module.
We need to include the event module as the followings:
In configure/RELEASE file, we need to set EVENT module as the followings:
EVENT_MODULE_VERSION=new_bsa_core
EVENT=/afs/slac/g/lcls/epics/iocTop/users/khkim/LCLS2Timing/t/temp/event/$(EVENT_MODULE_VERSION)
Note, Till is not release his bsa_core branch evnet module yet. Until, Till release an official version
we can use my sancbox version.
In <application>App/src/Makefile, we need to include bsa.dbd and eventBsaSupport library as the followings:
<application>_DBD += bsa.dbd
<application>_LIBS += eventBsaSupport
Note, if you have a linker error which is related with undefined symbol, you can switch the order of library names.
Please, switch the order of <>_LIBS definition and try again.
3. Integration with BSA PV
The event module provide bsa PV interface.
We need to install the database template in the ioc.
DB_INSTALLS += $(EVENT)/db/bsaATTREdef.db
The hpsTprLab application has an example for bsa database substitution file.
Please, check up the following file:
$TOP/tprApp/Db/bsaTest.substitutions
4. Misc.
Afterh the integration, there is few ways to test it.
You can see all of the BSA Channel (BSA PV) with dbior command
as the followings:
example 1)
epics> dbior
Driver: drvBsaCore
BSA Core:
BSA Channel[0] (TPR:SYS2:0:EV40PID) Dump
EDEF in use mask 0xfffff
Counters:
# items dropped because of 'pattern too new': 0
# items dropped because of 'pattern too old': 0
# items dropped because of 'pattern not fnd': 0
# timeout ticks : 11
# results flushed by timeouts : 43
# timeouts with no progress : 0
BSA Channel[1] (TPR:SYS2:0:EV41PID) Dump
EDEF in use mask 0xfffff
Counters:
# items dropped because of 'pattern too new': 0
# items dropped because of 'pattern too old': 0
# items dropped because of 'pattern not fnd': 0
# timeout ticks : 11
# results flushed by timeouts : 43
# timeouts with no progress : 0
Device Support: devAoBsa
Device support for BSA Core legacy (record-based) data source
example 2)
epics> dbior tprPatternAsynDriver 10
Driver: tprPatternAsynDriver
port name: pattern
core path: mmio/AmcCarrierEmpty/AmcCarrierCore
stream path: tstream
driver location: 0x1ce0be0
api location: 0x1460a90
Total 1 bsa callback functions(s) are registered
Registered bsa function 0x4a2b10, argument 0x143dc10
Total 0 fiducial function(s) are registered