From 16e8bdd1957a68f5604a6c9069ce299370926cdb Mon Sep 17 00:00:00 2001 From: keenanlang Date: Thu, 14 Sep 2023 16:29:36 -0500 Subject: [PATCH] Proper type/ftvl/size calculation --- .../iocxxx/examples/detectors/ADAdsc.iocsh | 15 +++++++++++--- .../iocxxx/examples/detectors/ADAndor.iocsh | 15 +++++++++++--- .../iocxxx/examples/detectors/ADAndor3.iocsh | 15 +++++++++++--- .../iocxxx/examples/detectors/ADAravis.iocsh | 18 +++++++++++++---- .../iocxxx/examples/detectors/ADDexela.iocsh | 16 ++++++++++----- .../iocxxx/examples/detectors/ADEiger1X.iocsh | 20 +++++++++++++------ .../iocxxx/examples/detectors/ADEiger2X.iocsh | 20 +++++++++++++------ .../iocxxx/examples/detectors/ADFastCCD.iocsh | 19 ++++++++++++++---- .../examples/detectors/ADLightField.iocsh | 19 ++++++++++++++---- .../iocxxx/examples/detectors/ADMar345.iocsh | 16 ++++++++++++--- .../iocxxx/examples/detectors/ADMarCCD.iocsh | 16 ++++++++++++--- .../examples/detectors/ADPointGrey.iocsh | 18 +++++++++++++---- .../examples/detectors/ADProsilica.iocsh | 15 +++++++++++--- .../iocxxx/examples/detectors/ADRoper.iocsh | 17 ++++++++++++---- .../examples/detectors/ADSpinnaker.iocsh | 18 +++++++++++++---- iocBoot/iocxxx/examples/detectors/ADURL.iocsh | 15 +++++++++++--- 16 files changed, 210 insertions(+), 62 deletions(-) diff --git a/iocBoot/iocxxx/examples/detectors/ADAdsc.iocsh b/iocBoot/iocxxx/examples/detectors/ADAdsc.iocsh index 7163a2e..929e720 100644 --- a/iocBoot/iocxxx/examples/detectors/ADAdsc.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADAdsc.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR #- The search path for database files epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADADSC)/db") @@ -14,11 +13,21 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD #- "Q210r", "Q270", "Q315", or "Q315r" #- adscConfig("$(INSTANCE)","$(MODEL)") -dbLoadRecords("$(ADADSC)/db/adsc.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADADSC)/db/adsc.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADAndor.iocsh b/iocBoot/iocxxx/examples/detectors/ADAndor.iocsh index 274d4b1..0b7f737 100644 --- a/iocBoot/iocxxx/examples/detectors/ADAndor.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADAndor.iocsh @@ -4,18 +4,27 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADANDOR)/db") #- andorCCDConfig(const char *portName, const char *installPath, int cameraSerial, int shamrockID, #- int maxBuffers, size_t maxMemory, int priority, int stackSize) andorCCDConfig("$(INSTANCE)", "$(INSTALL_PATH='')", $(SERIAL), 0, 0, 0, 0, 0) -dbLoadRecords("$(ADANDOR)/db/andorCCD.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADANDOR)/db/andorCCD.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADAndor3.iocsh b/iocBoot/iocxxx/examples/detectors/ADAndor3.iocsh index b8e947b..219ae9a 100644 --- a/iocBoot/iocxxx/examples/detectors/ADAndor3.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADAndor3.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADANDOR3)/db") @@ -11,11 +10,21 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD #- size_t maxMemory, int priority, int stackSize, #- int maxFrames) andor3Config("$(INSTANCE)", $(ID), 0, 0, 0, 0, 100) -dbLoadRecords("$(ADANDOR3)/db/andor3.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADANDOR3)/db/andor3.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADAravis.iocsh b/iocBoot/iocxxx/examples/detectors/ADAravis.iocsh index ad2d263..746ab88 100644 --- a/iocBoot/iocxxx/examples/detectors/ADAravis.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADAravis.iocsh @@ -5,7 +5,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR #- COLORS - Number of colors, default: 1 epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADARAVIS)/db") @@ -14,14 +13,25 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD aravisConfig("$(INSTANCE)", "$(ID)", $(CACHING=1), 0, 0, 0) #- Main database -dbLoadRecords("$(ADARAVIS)/db/aravisCamera.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE)") +dbLoadRecords("$(ADARAVIS)/db/aravisCamera.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") #- Load the autogenerated file of GenICam features -dbLoadRecords("$(DB_FILE)", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE)") +dbLoadRecords("$(DB_FILE)", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((COLORS*XSIZE*YSIZE)|0))", "COLORS=$(COLORS=1), XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADDexela.iocsh b/iocBoot/iocxxx/examples/detectors/ADDexela.iocsh index aa90eda..6286f00 100644 --- a/iocBoot/iocxxx/examples/detectors/ADDexela.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADDexela.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADDEXELA)/db") @@ -13,14 +12,21 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD #- This is for the first detector in the system DexelaConfig("$(INSTANCE)", $(ID), 0, 0, 0, 0) -dbLoadRecords("$(ADDEXELA)/db/Dexela.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADDEXELA)/db/Dexela.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") # Create a standard arrays plugin, set it to get data from Driver. NDStdArraysConfigure("Image1", 3, 0, "$(PORT)", 0) -#Create a standard arrays plugin, set it to get data from first simDetector driver. -NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADEiger1X.iocsh b/iocBoot/iocxxx/examples/detectors/ADEiger1X.iocsh index 62f7175..a64b729 100644 --- a/iocBoot/iocxxx/examples/detectors/ADEiger1X.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADEiger1X.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int32 -#- FTVL - Waveform type, default: LONG epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADEIGER)/db") @@ -11,13 +10,22 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD eigerDetectorConfig("$(INSTANCE)", "$(ID)", 0, 0) dbLoadRecords("$(ADEIGER)/db/eiger1.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") -#Create a standard arrays plugin, set it to get data from first simDetector driver. +#Create tandard arrays plugins. NDStdArraysConfigure("$(INSTANCE)Image1", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/db/NDStdArrays.template', 'P=$(PREFIX)$(INSTANCE):,R=image1:,PORT=$(INSTANCE)Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int32),FTVL=$(FTVL=LONG),NELEMENTS=' .. NELM)", "NELM=$(XSIZE)*$(YSIZE)") - -#Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image2", 3, 0, "$(INSTANCE)", 1, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((COLORS*XSIZE*YSIZE)|0))", "COLORS=$(COLORS=1), XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image2:,PORT=$(INSTANCE)Image2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADEiger2X.iocsh b/iocBoot/iocxxx/examples/detectors/ADEiger2X.iocsh index bc030c1..441b6b1 100644 --- a/iocBoot/iocxxx/examples/detectors/ADEiger2X.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADEiger2X.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int32 -#- FTVL - Waveform type, default: LONG epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADEIGER)/db") @@ -11,13 +10,22 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD eigerDetectorConfig("$(INSTANCE)", "$(ID)", 0, 0) dbLoadRecords("$(ADEIGER)/db/eiger2.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") -#Create a standard arrays plugin, set it to get data from first simDetector driver. +#Create tandard arrays plugins. NDStdArraysConfigure("$(INSTANCE)Image1", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/db/NDStdArrays.template', 'P=$(PREFIX)$(INSTANCE):,R=image1:,PORT=$(INSTANCE)Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int32),FTVL=$(FTVL=LONG),NELEMENTS=' .. NELM)", "NELM=$(XSIZE)*$(YSIZE)") - -#Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image2", 3, 0, "$(INSTANCE)", 1, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((COLORS*XSIZE*YSIZE)|0))", "COLORS=$(COLORS=1), XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image2:,PORT=$(INSTANCE)Image2,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADFastCCD.iocsh b/iocBoot/iocxxx/examples/detectors/ADFastCCD.iocsh index aa45ceb..5f01c51 100644 --- a/iocBoot/iocxxx/examples/detectors/ADFastCCD.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADFastCCD.iocsh @@ -3,7 +3,7 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR + epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADFASTCCD)/db") @@ -13,16 +13,27 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD FastCCDConfig("$(INSTANCE)", 0, 0, 0, 100000, 2000, 200, "", "$(ID)", "") -dbLoadRecords("$(ADFASTCCD)/db/FastCCD.template","P=$(PREFIX)$(INSTANCE):,R=:cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADFASTCCD)/db/FastCCD.template","P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") # Load the FastCCD Plugin NDFastCCDConfigure("FastCCD1", 20, 0, "PROC1", 0, 0, 0, 0, 0, 5) -dbLoadRecords("$(ADFASTCCD)/db/NDFastCCD.template", "P=$(PREFIX)$(INSTANCE):,R=FastCCD1:, PORT=FastCCD1, NDARRAY_PORT=FASTCCD, ADDR=0, TIMEOUT=1") +dbLoadRecords("$(ADFASTCCD)/db/NDFastCCD.template", "P=$(PREFIX),R=FastCCD1:, PORT=FastCCD1, NDARRAY_PORT=FASTCCD, ADDR=0, TIMEOUT=1") set_requestfile_path("$(ADFASTCCD)/db") diff --git a/iocBoot/iocxxx/examples/detectors/ADLightField.iocsh b/iocBoot/iocxxx/examples/detectors/ADLightField.iocsh index d98f8f9..3e34247 100644 --- a/iocBoot/iocxxx/examples/detectors/ADLightField.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADLightField.iocsh @@ -2,16 +2,27 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT + epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADLIGHTFIELD)/db") -LightFieldConfig("$(PORT)", "", 0, 0) -dbLoadRecords("$(ADLIGHTFIELD)/db/LightField.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +LightFieldConfig("$(INSTANCE)", "", 0, 0) +dbLoadRecords("$(ADLIGHTFIELD)/db/LightField.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADMar345.iocsh b/iocBoot/iocxxx/examples/detectors/ADMar345.iocsh index 52831dd..249054e 100755 --- a/iocBoot/iocxxx/examples/detectors/ADMar345.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADMar345.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADMAR345)/db") @@ -15,11 +14,22 @@ asynOctetSetInputEos("$(INSTANCE)Server", 0, "\n") asynOctetSetOutputEos("$(INSTANCE)Server", 0, "\n") mar345Config("$(INSTANCE)", "$(INSTANCE)Server", 0, 0) -dbLoadRecords("$(ADMAR345)/db/mar345.template","P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1,MARSERVER_PORT=$(INSTANCE)Server") +dbLoadRecords("$(ADMAR345)/db/mar345.template","P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1,MARSERVER_PORT=$(INSTANCE)Server") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADMarCCD.iocsh b/iocBoot/iocxxx/examples/detectors/ADMarCCD.iocsh index f280682..515789b 100755 --- a/iocBoot/iocxxx/examples/detectors/ADMarCCD.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADMarCCD.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADMARCCD)/db") @@ -15,11 +14,22 @@ asynOctetSetInputEos("$(INSTANCE)Server", 0, "\n") asynOctetSetOutputEos("$(INSTANCE)Server", 0, "\n") mar345Config("$(INSTANCE)", "$(INSTANCE)Server", 0, 0) -dbLoadRecords("$(ADMARCCD)/db/marCCD.template","P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1,MARSERVER_PORT=$(INSTANCE)Server") +dbLoadRecords("$(ADMARCCD)/db/marCCD.template","P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1,MARSERVER_PORT=$(INSTANCE)Server") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADPointGrey.iocsh b/iocBoot/iocxxx/examples/detectors/ADPointGrey.iocsh index 1ce769a..eee1777 100755 --- a/iocBoot/iocxxx/examples/detectors/ADPointGrey.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADPointGrey.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR #- COLORS - Number of colors, default: 1 #- SUB - Pointgrey substitutions file, default: examples/detectors/pointGrey.substitutions @@ -14,12 +13,23 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD # int maxBuffers, size_t maxMemory, int priority, int stackSize) pointGreyConfig("$(INSTANCE)", $(ID), 0x1, 0) -dbLoadRecords("$(ADPOINTGREY)/db/pointGrey.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") -dbLoadTemplate("$(SUB=examples/detectors/pointGrey.substitutions)", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE)") +dbLoadRecords("$(ADPOINTGREY)/db/pointGrey.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadTemplate("$(SUB=examples/detectors/pointGrey.substitutions)", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((COLORS*XSIZE*YSIZE)|0))", "COLORS=$(COLORS=1), XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADProsilica.iocsh b/iocBoot/iocxxx/examples/detectors/ADProsilica.iocsh index 9700e65..d527fd7 100644 --- a/iocBoot/iocxxx/examples/detectors/ADProsilica.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADProsilica.iocsh @@ -3,7 +3,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADPROSILICA)/db") @@ -20,14 +19,24 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD #- The Unique ID will be displayed on the first line in the information window. prosilicaConfig("$(INSTANCE)", "$(ID)", 50, 0) -dbLoadRecords("$(ADPROSILICA)/db/prosilica.template","P=$(PREFIX),R=$(INSTANCE):cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADPROSILICA)/db/prosilica.template","P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") # Create a standard arrays plugin, set it to get data from first Prosilica driver. NDStdArraysConfigure("Image1", 5, 0, "$(PORT)", 0, 0) #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADRoper.iocsh b/iocBoot/iocxxx/examples/detectors/ADRoper.iocsh index d082f75..97f1995 100755 --- a/iocBoot/iocxxx/examples/detectors/ADRoper.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADRoper.iocsh @@ -2,18 +2,27 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADROPER)/db") - roperConfig("$(INSTANCE)", 0, 0) -dbLoadRecords("$(ADROPER)/db/roper.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADROPER)/db/roper.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADSpinnaker.iocsh b/iocBoot/iocxxx/examples/detectors/ADSpinnaker.iocsh index 869fd6a..135afe2 100755 --- a/iocBoot/iocxxx/examples/detectors/ADSpinnaker.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADSpinnaker.iocsh @@ -4,7 +4,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int16 -#- FTVL - Waveform type, default: SHORT #- COLORS - Number of colors, default: 1 epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADSPINNAKER)/db") @@ -15,14 +14,25 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD ADSpinnakerConfig("$(INSTANCE)", $(ID)) # Main database. This just loads and modifies ADBase.template -dbLoadRecords("$(ADSPINNAKER)/db/spinnaker.template", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE)") +dbLoadRecords("$(ADSPINNAKER)/db/spinnaker.template", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") # Load the autogenerated file of GenICam features -dbLoadRecords("$(DB_FILE)", "P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE)") +dbLoadRecords("$(DB_FILE)", "P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE)") #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int16)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((XSIZE*YSIZE)|0))", "XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") + iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5") diff --git a/iocBoot/iocxxx/examples/detectors/ADURL.iocsh b/iocBoot/iocxxx/examples/detectors/ADURL.iocsh index 26a66cc..b6e15cb 100755 --- a/iocBoot/iocxxx/examples/detectors/ADURL.iocsh +++ b/iocBoot/iocxxx/examples/detectors/ADURL.iocsh @@ -2,7 +2,6 @@ #- XSIZE - Image Width #- YSIZE - Image Height #- TYPE - Image Datatype, default: Int8 -#- FTVL - Waveform type, default: UCHAR #- COLORS - Number of colors, default: 1 epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(ADURL)/db") @@ -11,14 +10,24 @@ epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(EPICS_DB_INCLUDE_PATH):$(ADCORE)/db:$(AD # URLDriverConfig(const char *portName, int maxBuffers, size_t maxMemory, # int priority, int stackSize) URLDriverConfig("$(INSTANCE)", 0, 0) -dbLoadRecords("$(ADURL)/db/URLDriver.template","P=$(PREFIX)$(INSTANCE):,R=cam1:,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") +dbLoadRecords("$(ADURL)/db/URLDriver.template","P=$(PREFIX),R=$(INSTANCE):,PORT=$(INSTANCE),ADDR=0,TIMEOUT=1") # Create a standard arrays plugin. NDStdArraysConfigure("Image1", 3, 0, "$(PORT)", 0) #Create a standard arrays plugin, set it to get data from first simDetector driver. NDStdArraysConfigure("$(INSTANCE)Image", 3, 0, "$(INSTANCE)", 0, 2000000) -luaCmd("dbLoadRecords('$(ADCORE)/ADApp/Db/NDStdArrays.template', 'P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(TYPE=Int8),FTVL=$(FTVL=UCHAR),NELEMENTS=' .. tostring((XSIZE*YSIZE)|0) )", "XSIZE=$(XSIZE),YSIZE=$(YSIZE)") + +# Need to determine certain values from input parameters +iocshCmd("epicsEnvSet('__FTVL', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=UCHAR, UInt8_VAL=UCHAR, Int16_VAL=SHORT, UInt16_VAL=SHORT, Int32_VAL=LONG, UInt32_VAL=LONG, Float32_VAL=DOUBLE, Float64_VAL=DOUBLE") +iocshCmd("epicsEnvSet('__TYPE', '$($(TYPE=Int8)_VAL)')", "Int8_VAL=Int8, UInt8_VAL=Int8, Int16_VAL=Int16, UInt16_VAL=Int16, Int32_VAL=Int32, UInt32_VAL=Int32, Float32_VAL=Float32, Float64_VAL=Float64") +luaCmd("epicsEnvSet('__SIZE', tostring((COLORS*XSIZE*YSIZE)|0))", "COLORS=$(COLORS=1), XSIZE=$(XSIZE), YSIZE=$(YSIZE)") + +dbLoadRecords("$(ADCORE)/ADApp/Db/NDStdArrays.template", "P=$(PREFIX):,R=image1:,PORT=$(INSTANCE)Image,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(INSTANCE),TYPE=$(__TYPE),FTVL=$(__FTVL),NELEMENTS=$(__SIZE)") + +epicsEnvUnset("__FTVL") +epicsEnvUnset("__TYPE") +epicsEnvUnset("__SIZE") iocshLoad("$(ADCORE)/iocBoot/commonPlugins.cmd", "PREFIX=$(PREFIX), PORT=$(INSTANCE), QSIZE=20, XSIZE=$(XSIZE), YSIZE=$(YSIZE), NCHANS=1024, CBUFFS=20, MAX_THREADS=5")