-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from epics-containers/dev
add ioc instance test
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
############################################################################# | ||
# DB substitution file generated by http://github.com/epics-containers/ibek # | ||
############################################################################# | ||
|
||
file "$(ADARAVIS)/db/aravisCamera.template" { | ||
pattern | ||
{ "P", "R", "PORT", "TIMEOUT", "ADDR" } | ||
{ "BL45P-EA-MAP-01", ":DET:", "DET.DET", "1", "0" } | ||
} | ||
|
||
file "$(ADGENICAM)/db/AVT_Mako_G234B.template" { | ||
pattern | ||
{ "P", "R", "PORT", "TIMEOUT", "ADDR" } | ||
{ "BL45P-EA-MAP-01", ":DET:", "DET.DET", "1", "0" } | ||
} | ||
|
||
file "$(ADCORE)/db/NDPva.template" { | ||
pattern | ||
{ "NDARRAY_PORT", "ADDR", "SCANRATE", "NDARRAY_ADDR", "ENABLED", "P", "R", "TIMEOUT", "PORT" } | ||
{ "DET.DET", "0", "I/O Intr", "0", "0", "BL45P-EA-MAP-01", ":PVA:", "1", "DET.PVA" } | ||
} | ||
|
||
file "$(ADCORE)/db/NDFileHDF5.template" { | ||
pattern | ||
{ "NDARRAY_PORT", "ADDR", "SCANRATE", "NDARRAY_ADDR", "ENABLED", "XMLSIZE", "P", "R", "TIMEOUT", "PORT" } | ||
{ "DET.DET", "0", "I/O Intr", "0", "0", "2048", "BL45P-EA-MAP-01", ":HDF5:", "1", "DET.HDF5" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adaravis/releases/download/23.9.4/ibek.ioc.schema.json | ||
|
||
ioc_name: bl45p-ea-ioc-01 | ||
description: Sample camera IOC for BL45P | ||
|
||
entities: | ||
- type: epics.EpicsCaMaxArrayBytes | ||
max_bytes: 6000000 | ||
|
||
- type: ADAravis.aravisCamera | ||
CLASS: AVT_Mako_G234B | ||
PORT: DET.DET | ||
P: BL45P-EA-MAP-01 | ||
R: ":DET:" | ||
ID: 172.23.59.11 | ||
PV_ALIAS: "0" # TODO this ARG should have default | ||
|
||
- type: ADCore.NDPvaPlugin | ||
PORT: DET.PVA | ||
PVNAME: BL45P-EA-MAP-01:PVA:OUTPUT | ||
P: BL45P-EA-MAP-01 | ||
R: ":PVA:" | ||
NDARRAY_PORT: DET.DET | ||
BLOCK: 1 # TODO remaining ARGS should have defaults | ||
PRIORITY: 0 | ||
STACKSIZE: 0 | ||
NDARRAY_ADDR: 0 | ||
|
||
- type: ADCore.NDFileHDF5 | ||
PORT: DET.HDF5 | ||
P: BL45P-EA-MAP-01 | ||
R: ":HDF5:" | ||
NDARRAY_PORT: DET.DET | ||
BLOCK: 1 | ||
NDARRAY_ADDR: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EPICS IOC Startup Script generated by https://github.com/epics-containers/ibek | ||
|
||
cd "/epics/ioc" | ||
|
||
epicsEnvSet EPICS_CA_MAX_ARRAY_BYTES 6000000 | ||
|
||
dbLoadDatabase dbd/ioc.dbd | ||
ioc_registerRecordDeviceDriver pdbbase | ||
|
||
aravisConfig(const char *portName, const char *cameraName, size_t maxMemory, int priority, int stackSize) | ||
aravisConfig("DET.DET", "172.23.59.11", -1, 0, 1) | ||
# NDPvaConfigure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, pvName, maxBuffers, maxMemory, priority, stackSize) | ||
NDPvaConfigure("DET.PVA", 2, 1, "DET.DET", 0, BL45P-EA-MAP-01:PVA:OUTPUT, 0, 0, 0, 0) | ||
startPVAServer | ||
# NDFileHDF5Configure(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr) | ||
NDFileHDF5Configure("DET.HDF5", 2, 1, "DET.DET", 0) | ||
|
||
dbLoadRecords /tmp/ioc.db | ||
iocInit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
THIS_DIR=$(dirname ${0}) | ||
cd ${THIS_DIR}/ioc_instance | ||
|
||
if ! ibek --version; then | ||
pip install ibek | ||
fi | ||
|
||
tmpdir=$(mktemp -d) | ||
|
||
ibek startup generate ioc.yaml ../../*/*.support.yaml --out ${tmpdir}/st.cmd \ | ||
--db-out ${tmpdir}/ioc.db | ||
|
||
if not diff ${tmpdir}/st.cmd ./st.cmd || not diff ${tmpdir}/ioc.db ./ioc.db; then | ||
echo "ERROR: Generated files st.cmd / db.subst differ from expected" | ||
exit 1 | ||
fi | ||
|
||
rm -r ${tmpdir} | ||
|