The tprPattern is an epics module which provides a standard PV interface to set up a soft event and to monitor the timing pattern status for Normal Conducting (NC), aka LCLS1/LCLS-I, type of timing. This module works with the TimingCore firmware, and it also provides a compatible API and function calls for the TimingApi.
As for all modules, there are a few external dependencies for tprPattern to take into account when setting up an IOC using this module. The dependencies include both EPICS modules and non-EPICS packages.
EPICS MODULE | MODULE VERSION |
---|---|
asyn | R4.39-1.0.1 |
timingApi | R0.6 |
yamlLoader | R2.3.2 |
PACKAGE | PACKAGE VERSION |
---|---|
cpsw/framework | R4.4.1 |
yaml-cpp | yaml-cpp-0.5.3_boost-1.64.0 |
boost | 1.64.0 |
timing/hpsTpr | R2.0.1 |
Module tprPattern operates under the assumption that the LCLS-I timing pattern is received via UDP on port 8197. Note that the UDP port should be described in the yaml file. The firmware anticipates to receive a beacon packet periodically from software in approximately under 3 seconds. If the firmware doesn't receive the packet, then it will cease sending the timing stream, it will clean up the destination information and will wait for a request from another destination. Hence, we need to place "pollSec: 1" to the stream definition in the yaml file.
To perform the checkout and build, please note that:
Use the eco tools to check out the preferred tprPattern tag or otherwise leave the tag name blank to get the current master branch.
$ eco -m tprPattern <tag name>
To get the eco tools added to your path, source the following environment file:
|
To build the tprPattern library, simply do a make from the top level directory.
$ make
If you want to build for the host architecture only (i.e. not cross-compile for linuxRT), then run make with the target architecture environment variable set to empty:
$ make CROSS_COMPILER_TARGET_ARCHS=
Compiling the source code results into producing library libtprPattern.a. The latter is then ready to be used in the linking phase when producing an IOC binary. For this reason, it is important to store the derived tprPattern library on an AFS path to ensure accessibility.
To build an IOC with tprPattern, follow the next guidelines.
The tprPattern requires the hpsTpr API layer.
File configure/CONFIG_SITE should have the following content to add the hpsTpr API:
HPSTPR_PACKAGE_NAME=timing/hpsTpr HPSTPR_VERSION=R1.0.2 HPSTPR_ARCH=$(LINUXRT_BUILDROOT_VERSION)-x86_64 HPSTPR=$(PACKAGE_AREA)/$(HPSTPR_PACKAGE_NAME)/$(HPSTPR_VERSION)/$(HPSTPR_ARCH) HPSTPR_LIB = $(HPSTPR)/lib HPSTPR_INCLUDE = $(HPSTPR)/include
To add the tprPattern module functionality to the IOC, file configure/RELEASE should have the following content:
TPRPATTERN_MODULE_VERSION=R1.0.0 TPRPATTERN=$(EPICS_MODULES)/tprPattern/$(TPRPATTERN_MODULE_VERSION)
In <your_application>App/src/Makefile, include the following:
# DBD file for tprPattern <your_application>_DBD += tprPatternAsynDriver.dbd # Library for tprPattern <your_application>_LIBS += tprPattern # API for tprPattern hpsTpr_DIR = $(HPSTPR_LIB) <your_application>_LIBS += hpsTpr
In <your_application>App/Db/Makefile, include the following to install the database template for tprPattern:
# Install Database for tprPattern module DB_INSTALLS += $(TPRPATTERN)/db/tprPattern.db
To run an IOC with tprPattern, one needs to pay attention to several things.
The macros for tprPattern.db are the following:
PORT - port name for asyn port driver, tprPattern moudle has port name "pattern". LOCA - location (ex, LI24, IN20) IOC_UNIT - IOC name (ex, RF01, RF02) INST - instance number for mutiple TPR in an ioc
Assign the corresponding values for the macros when calling dbLoadRecords as shown below:
dbLoadRecords("db/tprPattern.db", "LOCA=LI24,IOC_UNIT=RF02,INST=0,PORT=pattern")
The tprPattern module assumes that the yamlLoader driver already has loaded up the register hierarchy as shown below:
cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.105")
Obviously, the yaml file path, register path and IP address will be different depending on the application. After loading the hierarchy, we can configure the tprPattern driver with the following command:
tprPatternAsynDriverConfigure(<asyn port name>, <path for AmcCarrierCore>, <path for timing stream>)
Hers is a typical example.
tprPatternAsynDriverConfigure("pattern", "mmio/AmcCarrierEmpty/AmcCarrierCore", "tstream")
The tprPattern assumes that it receives an LCLS-I timing pattern from the firmware via UDP port 8197. As usual, the UDP port should be defined in the yaml files. On the other end, the firmware assumes that it receives a beacon packet periodically from the software (less than a 3 second interval). If the firmware doesn't receive the packet, then it will stop sending the timing stream, followed by cleaning up the destination information and waiting for a new request request. Therefore, it is recommended to place the following for the stream definition in the yaml files.
pollSec: 1
Multiple Blades configuration and named_root
A multiple blade system will have multiple roots. The yamlLoader driver configuration command allows for defining the root of interest via its named_root argument. The tprPattern driver then can choose a particular root path with describing the named_root (this is the very last argument in the driver configuration command). For instance:
$ cd ${YAML_DIR0} $ cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.102", "root_slot2") $ cd ${YAML_DIR1} $ cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.103", "root_slot3") $ cd ${YAML_DIR2} $ cpswLoadYamlFile("000TopLevel.yaml", "NetIODev", "", "10.0.3.104", "root_slot4")
tprPatternAsynDriverConfigure("pattern", "mmio/AmcCarrierEmpty/AmcCarrierCore", "tstream", "root_slot2")
TBD
See the full list of PVs below.
Record Type | PV Name | EPICS Type | Description |
---|---|---|---|
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL0_RATE | asynFloat64 | Soft Event Select 0 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL0_EVRATE | asynFloat64 | Soft Event Select 0 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL1_RATE | asynFloat64 | Soft Event Select 1 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL1_EVRATE | asynFloat64 | Soft Event Select 1 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL2_RATE | asynFloat64 | Soft Event Select 2 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL2_EVRATE | asynFloat64 | Soft Event Select 2 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL3_RATE | asynFloat64 | Soft Event Select 3 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL3_EVRATE | asynFloat64 | Soft Event Select 3 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL4_RATE | asynFloat64 | Soft Event Select 4 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL4_EVRATE | asynFloat64 | Soft Event Select 4 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL5_RATE | asynFloat64 | Soft Event Select 5 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL5_EVRATE | asynFloat64 | Soft Event Select 5 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL6_RATE | asynFloat64 | Soft Event Select 6 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL6_EVRATE | asynFloat64 | Soft Event Select 6 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL7_RATE | asynFloat64 | Soft Event Select 7 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL7_EVRATE | asynFloat64 | Soft Event Select 7 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL8_RATE | asynFloat64 | Soft Event Select 8 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL8_EVRATE | asynFloat64 | Soft Event Select 8 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL9_RATE | asynFloat64 | Soft Event Select 9 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL9_EVRATE | asynFloat64 | Soft Event Select 9 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL10_RATE | asynFloat64 | Soft Event Select 10 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL10_EVRATE | asynFloat64 | Soft Event Select 10 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_RATE | asynFloat64 | Soft Event Select 11 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_EVRATE | asynFloat64 | Soft Event Select 11 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_RATE | asynFloat64 | Soft Event Select 11 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_EVRATE | asynFloat64 | Soft Event Select 11 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL12_RATE | asynFloat64 | Soft Event Select 12 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL12_EVRATE | asynFloat64 | Soft Event Select 12 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL13_RATE | asynFloat64 | Soft Event Select 13 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL13_EVRATE | asynFloat64 | Soft Event Select 13 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL14_RATE | asynFloat64 | Soft Event Select 14 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL14_EVRATE | asynFloat64 | Soft Event Select 14 Event Rate |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL15_RATE | asynFloat64 | Soft Event Select 15 Rate in Pattern |
ai | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL15_EVRATE | asynFloat64 | Soft Event Select 15 Event Rate |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL0_ENABLE | asynInt32 | Soft Event Select 0 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL1_ENABLE | asynInt32 | Soft Event Select 1 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL2_ENABLE | asynInt32 | Soft Event Select 2 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL3_ENABLE | asynInt32 | Soft Event Select 3 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL4_ENABLE | asynInt32 | Soft Event Select 4 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL5_ENABLE | asynInt32 | Soft Event Select 5 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL6_ENABLE | asynInt32 | Soft Event Select 6 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL7_ENABLE | asynInt32 | Soft Event Select 7 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL8_ENABLE | asynInt32 | Soft Event Select 8 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL9_ENABLE | asynInt32 | Soft Event Select 9 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL10_ENABLE | asynInt32 | Soft Event Select 10 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_ENABLE | asynInt32 | Soft Event Select 11 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL12_ENABLE | asynInt32 | Soft Event Select 12 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL13_ENABLE | asynInt32 | Soft Event Select 13 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL14_ENABLE | asynInt32 | Soft Event Select 14 Enable |
bo | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL15_ENABLE | asynInt32 | Soft Event Select 15 Enable |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_PULSEID | asynInt32 | PatternDiag D3 Pulse ID |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_BEAMCODE | asynInt32 | PatternDiag D3 Beam Code |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_TIMESLOT | asynInt32 | PatternDiag D3 Timeslot |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_SECOND | asynInt32 | PatternDiag D3 Second |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_NANOSECOND | asynInt32 | PatternDiag D3 nanoSecond |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER1 | asynInt32 | PatternDiag D3 modifier1 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER2 | asynInt32 | PatternDiag D3 modifier2 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER3 | asynInt32 | PatternDiag D3 modifier3 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER4 | asynInt32 | PatternDiag D3 modifier4 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER5 | asynInt32 | PatternDiag D3 modifier5 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_MODIFIER6 | asynInt32 | PatternDiag D3 modifier6 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFAVGDONE | asynInt32 | PatternDiag D3 EDEF AVG Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFMINOR | asynInt32 | PatternDiag D3 EDEF Minor |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFMAJOR | asynInt32 | PatternDiag D3 EDEF Major |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFINIT | asynInt32 | PatternDiag D3 EDEF Init |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFACTIVE | asynInt32 | PatternDiag D3 EDEF Active |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_EDEFALLDONE | asynInt32 | PatternDiag D3 EDEF All Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD3_STATUS | asynInt32 | PatternDiag D3 Status |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_PULSEID | asynInt32 | PatternDiag D2 Pulse ID |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_BEAMCODE | asynInt32 | PatternDiag D2 Beam Code |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_TIMESLOT | asynInt32 | PatternDiag D2 Timeslot |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_SECOND | asynInt32 | PatternDiag D2 Second |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_NANOSECOND | asynInt32 | PatternDiag D2 nanoSecond |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER1 | asynInt32 | PatternDiag D2 modifier1 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER2 | asynInt32 | PatternDiag D2 modifier2 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER3 | asynInt32 | PatternDiag D2 modifier3 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER4 | asynInt32 | PatternDiag D2 modifier4 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER5 | asynInt32 | PatternDiag D2 modifier5 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_MODIFIER6 | asynInt32 | PatternDiag D2 modifier6 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFAVGDONE | asynInt32 | PatternDiag D2 EDEF AVG Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFMINOR | asynInt32 | PatternDiag D2 EDEF Minor |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFMAJOR | asynInt32 | PatternDiag D2 EDEF Major |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFINIT | asynInt32 | PatternDiag D2 EDEF Init |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFACTIVE | asynInt32 | PatternDiag D2 EDEF Active |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_EDEFALLDONE | asynInt32 | PatternDiag D2 EDEF All Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD2_STATUS | asynInt32 | PatternDiag D2 Status |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_PULSEID | asynInt32 | PatternDiag D1 Pulse ID |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_BEAMCODE | asynInt32 | PatternDiag D1 Beam Code |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_TIMESLOT | asynInt32 | PatternDiag D1 Timeslot |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_SECOND | asynInt32 | PatternDiag D1 Second |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_NANOSECOND | asynInt32 | PatternDiag D1 nanoSecond |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER1 | asynInt32 | PatternDiag D1 modifier1 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER2 | asynInt32 | PatternDiag D1 modifier2 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER3 | asynInt32 | PatternDiag D1 modifier3 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER4 | asynInt32 | PatternDiag D1 modifier4 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER5 | asynInt32 | PatternDiag D1 modifier5 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_MODIFIER6 | asynInt32 | PatternDiag D1 modifier6 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFAVGDONE | asynInt32 | PatternDiag D1 EDEF AVG Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFMINOR | asynInt32 | PatternDiag D1 EDEF Minor |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFMAJOR | asynInt32 | PatternDiag D1 EDEF Major |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFINIT | asynInt32 | PatternDiag D1 EDEF Init |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFACTIVE | asynInt32 | PatternDiag D1 EDEF Active |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_EDEFALLDONE | asynInt32 | PatternDiag D1 EDEF All Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD1_STATUS | asynInt32 | PatternDiag D1 Status |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_PULSEID | asynInt32 | PatternDiag D Pulse ID |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_BEAMCODE | asynInt32 | PatternDiag D Beam Code |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_TIMESLOT | asynInt32 | PatternDiag D Timeslot |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_SECOND | asynInt32 | PatternDiag D Second |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_NANOSECOND | asynInt32 | PatternDiag D nanoSecond |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER1 | asynInt32 | PatternDiag D modifier1 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER2 | asynInt32 | PatternDiag D modifier2 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER3 | asynInt32 | PatternDiag D modifier3 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER4 | asynInt32 | PatternDiag D modifier4 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER5 | asynInt32 | PatternDiag D modifier5 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_MODIFIER6 | asynInt32 | PatternDiag D modifier6 |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFAVGDONE | asynInt32 | PatternDiag D EDEF AVG Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFMINOR | asynInt32 | PatternDiag D EDEF Minor |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFMAJOR | asynInt32 | PatternDiag D EDEF Major |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFINIT | asynInt32 | PatternDiag D EDEF Init |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFACTIVE | asynInt32 | PatternDiag D EDEF Active |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_EDEFALLDONE | asynInt32 | PatternDiag D EDEF All Done |
longin | TPR:$(LOCA):$(IOC_UNIT):$(INST):PATTD_STATUS | asynInt32 | PatternDiag D Status |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL0_EVCODE | asynInt32 | Soft Event Select 0 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL1_EVCODE | asynInt32 | Soft Event Select 1 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL2_EVCODE | asynInt32 | Soft Event Select 2 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL3_EVCODE | asynInt32 | Soft Event Select 3 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL4_EVCODE | asynInt32 | Soft Event Select 4 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL5_EVCODE | asynInt32 | Soft Event Select 5 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL6_EVCODE | asynInt32 | Soft Event Select 6 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL7_EVCODE | asynInt32 | Soft Event Select 7 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL8_EVCODE | asynInt32 | Soft Event Select 8 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL9_EVCODE | asynInt32 | Soft Event Select 9 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL10_EVCODE | asynInt32 | Soft Event Select 10 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL11_EVCODE | asynInt32 | Soft Event Select 11 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL12_EVCODE | asynInt32 | Soft Event Select 12 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL13_EVCODE | asynInt32 | Soft Event Select 13 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL14_EVCODE | asynInt32 | Soft Event Select 14 Event Code |
longout | TPR:$(LOCA):$(IOC_UNIT):$(INST):SOFTEVSEL15_EVCODE | asynInt32 | Soft Event Select 15 Event Code |
TBD
TBD
N/A (This codebase compiles into a library not an IOC)
TBD
The only namespace defined in the tprPattern application is TprEvent.
C++ Namespaces | Description |
---|---|
TprEvent |
The enums used in the tprPattern module are in the table below.
Enum Name | Values | Description |
---|---|---|
evrTimeId_te | evrTimeCurrent=0, evrTimeNext1=1, evrTimeNext2=2, evrTimeNext3=3, evrTimeActive=4 |
See below for the table of macros.
Macro Name | Default Value |
---|---|
MAX_EVR_TIME | 4 |
MAX_EVR_MODIFIER | 6 |
EVENT_FIDUCIAL | 1 |
EVENT_EXTERNAL_TRIG | 100 |
EVENT_MODULO720 | 121 |
EVENT_MPG | 122 |
EVENT_MODULO36_MIN | 201 |
EVENT_MODULO36_MAX | 236 |
MODULO36_MAX | 36 |
MAX_NUM_TRIGGER | 16 |
LAST_TPR_PTRN_PARAM | |
FIRST_TPR_PTRN_PARAM | |
NUM_TPR_PTRN_DET_PARAMS | (int)(&LAST_TPR_PTRN_PARAM-&FIRST_TPR_PTRN_PARAM -1) |
activeTS1String | "activeTS1" |
activeTS2String | "activeTS2" |
softEventSelect_eventCodeString | "softEventSelect%d_eventCode" |
softEventSelect_enableString | "softEventSelect%d_enable" |
softEventSelect_rateString | "softEventSelect%d_rate" |
softEventSelect_evRateString | "softEventSelect%d_evRate" |
patternDiag_pulseIdString | "patternDiag%d_pulseId" |
patternDiag_beamCodeString | "patternDiag%d_beamCode" |
patternDiag_timeslotString | "patternDiag%d_timeslot" |
patternDiag_timestampString | "patternDiag%d_timestamp" |
patternDiag_secondString | "patternDiag%d_second" |
patternDiag_nanoSecondString | "patternDiag%d_nanoSecond" |
patternDiag_modifier1String | "patternDiag%d_modifier1" |
patternDiag_modifier2String | "patternDiag%d_modifier2" |
patternDiag_modifier3String | "patternDiag%d_modifier3" |
patternDiag_modifier4String | "patternDiag%d_modifier4" |
patternDiag_modifier5String | "patternDiag%d_modifier5" |
patternDiag_modifier6String | "patternDiag%d_modifier6" |
patternDiag_edefAvgDoneString | "patternDiag%d_edefAvgDone" |
patternDiag_edefMinorString | "patternDiag%d_edefMinor" |
patternDiag_edefMajorString | "patternDiag%d_edefMajor" |
patternDiag_edefInitString | "patternDiag%d_edefInit" |
patternDiag_edefActiveString | "patternDiag%d_edefActive" |
patternDiag_edefAllDoneString | "patternDiag%d_edefAllDone" |
patternDiag_statusString | "patternDiag%d_status" |
UPPER_15_BIT_MASK | 0xFFFE0000 |
LOWER_17_BIT_MASK | 0x0001FFFF |
PULSEID(time) | (time).nsec & LOWER_17_BIT_MASK |
PULSEID_BIT17 | 0x00020000 |
PULSEID_INVALID | 0x0001FFFF |
PULSEID_MAX | 0x0001FFDF |
PULSEID_RESYNC | 0x0001E000 |
NSEC_PER_SEC | 1E9 |
MODULO720_SECS | 2 |
TIMESLOT_MIN | 1 |
TIMESLOT_MAX | 6 |
TIMESLOT_DIFF | 3 |
MAX_MODIFIER | 6 |
EVENT_FIDUCIAL | 1 |
EVENT_EXTERNAL_TRIG | 100 |
MOD1_IDX | 0 |
BEAMCODE_BIT_MASK | 0x0000001F |
BEAMCODE(mod_a) | (((mod_a)[0]) >> 8) & BEAMCODE_BIT_MASK |
YY_BIT_MASK | 0x000000FF |
MODULO720_MASK | 0x00008000 |
MPG_IPLING | 0x00004000 |
MOD2_IDX | 1 |
EVG_BURST | 0x00000040 |
EVG_HXR_BURST | 0x00000100 |
EVG_SXR_BURST | 0x00000200 |
BYKIKS | 0x10000000 |
BYKIK | 0x20000000 |
TCAV3_PERM | 0x40000000 |
TIMESLOT_MASK | 0x0000003F |
TIMESLOT1_MASK | 0x00000001 |
TIMESLOT2_MASK | 0x00000002 |
TIMESLOT3_MASK | 0x00000004 |
TIMESLOT4_MASK | 0x00000008 |
TIMESLOT5_MASK | 0x00000010 |
TIMESLOT6_MASK | 0x00000020 |
MOD3_IDX | 2 |
POCKCEL_PERM | 0x00080000 |
TCAV0_PERM | 0x80000000 |
RATE_MPS_HXR_119HZ | 0x00000001 |
RATE_MPS_HXR_110HZ | 0x00000002 |
RATE_MPS_HXR_90HZ | 0x00000004 |
RATE_MPS_HXR_60HZ | 0x00000008 |
RATE_MPS_HXR_30HZ | 0x00000010 |
RATE_MPS_HXR_10HZ | 0x00000020 |
RATE_MPS_HXR_05HZ | 0x00000800 |
RATE_MPS_HXR_01HZ | 0x00001000 |
RATE_MPS_SXR_119HZ | 0x00002000 |
RATE_MPS_SXR_110HZ | 0x00004000 |
RATE_MPS_SXR_90HZ | 0x00008000 |
RATE_MPS_SXR_60HZ | 0x00020000 |
RATE_MPS_SXR_30HZ | 0x00040000 |
RATE_MPS_SXR_10HZ | 0x00100000 |
RATE_MPS_SXR_05HZ | 0x00200000 |
RATE_MPS_SXR_01HZ | 0x00400000 |
BKRCUS | 0x00800000 |
MOD4_IDX | 3 |
TIMESLOT_VAL_MASK | 0x00000007 |
TIMESLOT(mod_a) | (((mod_a)[3]) >> 29) & TIMESLOT_VAL_MASK |
TIMESLOT_RATE_MAX | 5 |
MOD5_IDX | 4 |
EDEF_MAX | 20 |
MOD5_EDEF_MASK | 0x000FFFFF |
MOD5_NOEDEF_MASK | 0xFFF00000 |
MOD5_RATE_MASK | 0x01F00000 |
MOD5_USER_MASK | 0x0E000000 |
MOD5_ACQ_MASK | 0xF0000000 |
MOD5_EDEF1HZ_MASK | 0x00008000 |
MOD5_EDEF10HZ_MASK | 0x00010000 |
MOD5_EDEFFULL_MASK | 0x00020000 |
MOD5_30HZ_MASK | 0x00100000 |
MOD5_10HZ_MASK | 0x00200000 |
MOD5_5HZ_MASK | 0x00400000 |
MOD5_1HZ_MASK | 0x00800000 |
MOD5_HALFHZ_MASK | 0x01000000 |
MOD5_BEAMFULL_MASK | 0x10000000 |
MOD6_IDX | 5 |
MPS_DEST_MASK | 0x000FFFFE |
MPS_PERM_MASK | 0xFFF00000 |
MPS_VALID | 0x00000001 |
MPS_DEST_HXR_MASK | 0x00040000 |
MPS_DEST_SXR_MASK | 0x00080000 |
MPS_PERM_POCKCELL_MASK | 0x00100000 |
MPS_PERM_MECHSHUT_MASK | 0x00200000 |
MPS_PERM_BYKIK_MASK | 0x00400000 |
MPS_PERM_BYKIKS_MASK | 0x00000002 |
MPS_PERM_LHTRSHUT_MASK | 0x00800000 |
PATTERN_OK | 0 |
PATTERN_INVALID_WF | 1 |
PATTERN_NO_DATA | 2 |
PATTERN_INVALID_TIMESTAMP | 3 |
PATTERN_MPG_IPLING | 4 |
PATTERN_SEQ_CHECK1_ERR | 5 |
PATTERN_SEQ_CHECK2_ERR | 6 |
PATTERN_SEQ_CHECK3_ERR | 7 |
PATTERN_PULSEID_NO_SYNC | 8 |
PATTERN_MODULO720_NO_SYNC | 9 |
PATTERN_TIMEOUT | 10 |
PATTERN_ERROR | 11 |
BUF_INDEX_MASK | 0x0000FFF |
MAX_BUF_SIZE | BUF_INDEX_MASK + 1 |
MAX_NUM_EVENT | 256 |
ACTIVE_TS | 0 |
The global variables used in this module can. be found in the table below.
Variable Name | Variable Type | Description |
---|---|---|
driverName | static const char * | driver name |
p_asynDrv | static tprPatternAsynDriver * | driver pointer |
initArg0 | static const iocshArg | port name |
initArg1 | static const iocshArg | core path |
initArg2 | static const iocshArg | sstream path |
initArg3 | static const iocshArg | root name |
initArgs | static const iocshArg * | args array |
initFuncDef | static const iocshFuncDef | init function |
See the functions in the C API in the table below.
C Function Name | Description |
---|---|
int RegisterBsaTimingCallback (BsaTimingCallback callback, void *pUserPvt) | bsa callback in timing API |
int evrInitialize (void) | evr initialization |
int evrTimeRegister (FIDUCIALFUNCTION fiducialFunc, void * fiducialArg) | evrTime API for backward compatibility |
int evrTimeGetFromPipeline (epicsTimeStamp *epicsTime_ps, evrTimeId_te id, evrModifier_ta modifier_a, epicsUInt32 *patternStatus_p, epicsUInt32 *edefAvgDoneMask_p, epicsUInt32 *edefMinorMask_p, epicsUInt32 *edefMajorMask_p) | evrTime API for backward compatibility |
int evrTimeGetFromEdef (unsigned int edefIdx, epicsTimeStamp *edefTime_ps, epicsTimeStamp *edefTimeInit_ps, int *edefAvgDone_p, epicsEnum16 *edefSevr_p) | evrTime API for backward compatibility |
int evrTimeGet (epicsTimeStamp *epicsTime_ps, unsigned int eventCode) | evrTime API for backward compatibility |
int evrTimePutPulseID (epicsTimeStamp *epicsTime_ps, unsigned int pulseID) | evrTime API for backward compatibility |
tprPatternAsynDriver * Get_tprPatternAsynDriver(void) | |
static int tprPatternTask (void) | |
static int tprPatternTaskStop (void) | |
static int tprPatternEventTimeGet_gtWrapper (epicsTimeStamp *time, int eventCode) | |
static int tprPatternEventTimeGetSystem_gtWrapper (epicsTimeStamp *time, int eventCode) | |
static void tprPatternAsynDriverConfigure (const char *port_name, const char *core_path, const char *stream_path, const char *named_root) | |
static int tprPatternAsynDriverReport (int interest); | |
static int tprPatternAsynDriverInitialize (void); | |
static int tprPatternAsynDriverReport (int interest) | |
static int tprPatternAsynDriverInitialize (void) | |
static void initCallFunc (const iocshArgBuf *args) | |
void tprPatternAsynDriverRegister (void) |
See UML description of the tprPattern module C++ classes below.
EventTimeRate Class.
EdefTimeTbl Class.
FiducialCallback Class.
BsaCallback Class.
PatternBuffer Class.
tprPatternAsynDriver Class.