Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38218b883e | ||
|
|
77b5441d23 | ||
|
|
7ee6421657 | ||
|
|
def770e2f8 | ||
|
|
cceb18989b | ||
|
|
e2d6d48cde | ||
|
|
62065f7f44 | ||
|
|
00cb454e8c | ||
|
|
66cbff0ca4 | ||
|
|
934ce7afd0 | ||
|
|
47a2b8435f | ||
|
|
eaebcece9d | ||
|
|
994242e524 | ||
|
|
ca22a8166c | ||
|
|
6f0f6357be | ||
|
|
325821714a | ||
|
|
1abd258517 | ||
|
|
4c0a03fd81 | ||
|
|
4f29439529 | ||
|
|
f7410e5473 | ||
|
|
6384a20af1 | ||
|
|
7e496979ce | ||
|
|
5a14d155e3 | ||
|
|
429c991544 | ||
|
|
2d9bb69fb8 | ||
|
|
2c23087d04 | ||
|
|
7aacd3e881 | ||
|
|
343a17ae9f | ||
|
|
49c9eb4c20 | ||
|
|
a94ca36d90 | ||
|
|
587c23cacc | ||
|
|
7ac340473d | ||
|
|
52c274d5b2 | ||
|
|
6652bc2264 | ||
|
|
9225d07a0d | ||
|
|
481b7722c5 | ||
|
|
1ec9ec9f50 | ||
|
|
aa7a350688 | ||
|
|
3b0e24798f | ||
|
|
c587eabd00 | ||
|
|
15fd21a1e0 | ||
|
|
2c951811fc | ||
|
|
db6ce72e1d | ||
|
|
081d5bfdd5 | ||
|
|
634c3b12ba | ||
|
|
4bc89278fe |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -11,3 +11,9 @@ core.*
|
|||||||
list.txt
|
list.txt
|
||||||
kafka.conf
|
kafka.conf
|
||||||
ecdc-kafka-ca.crt
|
ecdc-kafka-ca.crt
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
.clang-format
|
||||||
|
.iocsh_history
|
||||||
|
build
|
||||||
|
build.sh
|
||||||
|
|
||||||
|
|||||||
122
ADOrca.Makefile
122
ADOrca.Makefile
@@ -22,136 +22,46 @@
|
|||||||
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
include $(E3_REQUIRE_TOOLS)/driver.makefile
|
include $(E3_REQUIRE_TOOLS)/driver.makefile
|
||||||
|
|
||||||
ifneq ($(strip $(ADCORE_DEP_VERSION)),)
|
|
||||||
adcore_VERSION=$(ADCORE_DEP_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(strip $(BUSY_DEP_VERSION)),)
|
|
||||||
busy_VERSION=$(BUSY_DEP_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any required modules here that come from startup scripts, etc.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
REQUIRED += adcore
|
REQUIRED += adcore
|
||||||
REQUIRED += busy
|
REQUIRED += busy
|
||||||
REQUIRED += seq
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# If you want to exclude any architectures:
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
EXCLUDE_ARCHS += linux-ppc64e6500
|
EXCLUDE_ARCHS += linux-ppc64e6500
|
||||||
|
|
||||||
|
APP := ADOrcaApp
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Relevant directories to point to files
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
APP := ADOrcaApp
|
|
||||||
APPDB := $(APP)/Db
|
APPDB := $(APP)/Db
|
||||||
APPSRC := $(APP)/src
|
APPSRC := $(APP)/src
|
||||||
APPCMDS := $(APP)/cmds
|
APPCMDS := $(APP)/cmds
|
||||||
|
|
||||||
############################################################################
|
SUPPORT:= support/dcamsdk4/lib/linux-x86_64
|
||||||
#
|
|
||||||
# Add any files that should be copied to $(module)/Db
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# TEMPLATES += $(wildcard $(APPDB)/*.db)
|
TEMPLATES += $(wildcard $(APPDB)/*.db)
|
||||||
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
|
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
|
||||||
|
TEMPLATES += $(wildcard $(APPDB)/*.template)
|
||||||
|
|
||||||
# USR_INCLUDES += -I$(where_am_I)$(APPSRC)
|
|
||||||
# USR_INCLUDES += -I $(E3_ADCORE_LOCATION)/ADCore/ADApp/ADSrc
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/interfaces
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/asynDriver
|
|
||||||
# USR_INCLUDES += -I $(E3_ASYN_LOCATION)/asyn/asynPortDriver
|
|
||||||
|
|
||||||
# USR_INCLUDES += -DLINUX -I/home/iocuser/dcamsdk4/inc/
|
|
||||||
USR_INCLUDES += -DLINUX -I ../support/dcamsdk4/inc/
|
USR_INCLUDES += -DLINUX -I ../support/dcamsdk4/inc/
|
||||||
# USR_INCLUDES += -I ../support/dcamsdk4/misc/
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any files that need to be compiled (e.g. .c, .cpp, .st, .stt)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# SOURCES += $(APPSRC)/ADOrcaMain.cpp
|
|
||||||
SOURCES += $(APPSRC)/orca.cpp
|
SOURCES += $(APPSRC)/orca.cpp
|
||||||
# SOURCES += support/dcamsdk4/misc/common.cpp
|
DBDS += $(APPSRC)/orca.dbd
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any .dbd files that should be included (e.g. from user-defined functions, etc.)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
DBDS += $(APPSRC)/orca.dbd
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any header files that should be included in the install (e.g.
|
|
||||||
# StreamDevice or asyn header files that are used by other modules)
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# HEADERS += /home/iocuser/dcamsdk4/inc
|
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# Add any startup scripts that should be installed in the base directory
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
SCRIPTS += $(wildcard iocsh/*.iocsh)
|
SCRIPTS += $(wildcard iocsh/*.iocsh)
|
||||||
|
|
||||||
|
|
||||||
############################################################################
|
|
||||||
#
|
|
||||||
# If you have any .substitution files, and template files, add them here.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# SUBS=$(wildcard $(APPDB)/*.substitutions)
|
|
||||||
TMPS=$(wildcard $(APPDB)/*.template)
|
TMPS=$(wildcard $(APPDB)/*.template)
|
||||||
|
|
||||||
|
USR_LDFLAGS += -L$(PREFIX)/lib/ -ldcamapi
|
||||||
|
LIB_SYS_LIBS += dcamapi
|
||||||
|
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so.4
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so.4.0.6269
|
||||||
|
VENDOR_LIBS += $(SUPPORT)/libdcamapi.so
|
||||||
|
|
||||||
USR_DBFLAGS += -I . -I ..
|
USR_DBFLAGS += -I . -I ..
|
||||||
USR_DBFLAGS += -I $(E3_ADCORE_LOCATION)/db
|
USR_DBFLAGS += -I $(E3_ADCORE_LOCATION)/db
|
||||||
USR_DBFLAGS += -I $(EPICS_BASE)/db
|
USR_DBFLAGS += -I $(EPICS_BASE)/db
|
||||||
USR_DBFLAGS += -I $(APPDB)
|
USR_DBFLAGS += -I $(APPDB)
|
||||||
|
|
||||||
USR_LDFLAGS += -L$(PWD)/support/dcamsdk4/lib/linux-x86_64 -ldcamapi
|
vlibs: $(VENDOR_LIBS)
|
||||||
#USR_LDFLAGS += -L/usr/local/lib -ldcamapi
|
|
||||||
|
|
||||||
db: $(SUBS) $(TMPS)
|
$(VENDOR_LIBS):
|
||||||
|
$(QUIET) install -m 755 $@ $(PREFIX)/lib/
|
||||||
|
|
||||||
$(SUBS):
|
.PHONY: $(VENDOR_LIBS) vlibs
|
||||||
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
|
|
||||||
@rm -f $(basename $(@)).db.d $(basename $(@)).db
|
|
||||||
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db -S $@ > $(basename $(@)).db.d
|
|
||||||
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db -S $@
|
|
||||||
|
|
||||||
$(TMPS):
|
|
||||||
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
|
|
||||||
@rm -f $(basename $(@)).db.d $(basename $(@)).db
|
|
||||||
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db $@ > $(basename $(@)).db.d
|
|
||||||
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db $@
|
|
||||||
|
|
||||||
.PHONY: db $(SUBS) $(TMPS)
|
|
||||||
|
|
||||||
|
|
||||||
vlibs:
|
|
||||||
|
|
||||||
.PHONY: vlibs
|
|
||||||
|
|||||||
4
ADOrcaApp/Db/AlarmsOverride.template
Normal file
4
ADOrcaApp/Db/AlarmsOverride.template
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Removing undesired alarms from aborted state
|
||||||
|
record(mbbi, "$(P)$(R)DetectorState_RBV") {
|
||||||
|
field(TESV, "NO_ALARM")
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -3,22 +3,20 @@
|
|||||||
/* Date: 2022-03-16 */
|
/* Date: 2022-03-16 */
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "epicsExit.h"
|
#include "epicsExit.h"
|
||||||
#include "epicsThread.h"
|
#include "epicsThread.h"
|
||||||
#include "iocsh.h"
|
#include "iocsh.h"
|
||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc, char *argv[]) {
|
||||||
{
|
if (argc >= 2) {
|
||||||
if(argc>=2) {
|
iocsh(argv[1]);
|
||||||
iocsh(argv[1]);
|
epicsThreadSleep(.2);
|
||||||
epicsThreadSleep(.2);
|
}
|
||||||
}
|
iocsh(NULL);
|
||||||
iocsh(NULL);
|
epicsExit(0);
|
||||||
epicsExit(0);
|
return (0);
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,9 @@
|
|||||||
#ifndef DRV_HAMA_H
|
#ifndef DRV_HAMA_H
|
||||||
#define DRV_HAMA_H
|
#define DRV_HAMA_H
|
||||||
|
|
||||||
|
// EPICS includes
|
||||||
|
#include <epicsExport.h>
|
||||||
|
#include <iocsh.h>
|
||||||
|
|
||||||
#include "ADDriver.h"
|
#include "ADDriver.h"
|
||||||
#include "dcamapi4.h"
|
#include "dcamapi4.h"
|
||||||
@@ -10,313 +13,339 @@
|
|||||||
#define MAX_H_SENSOR_SIZE 2048
|
#define MAX_H_SENSOR_SIZE 2048
|
||||||
#define MAX_V_SENSOR_SIZE 2048
|
#define MAX_V_SENSOR_SIZE 2048
|
||||||
|
|
||||||
#define hFrameRateString "H_FRAMERATE"
|
#define hFrameRateString "H_FRAMERATE"
|
||||||
#define hOrcaNameString "H_HAMA_NAME" /* asynOctet ro */
|
#define hOrcaNameString "H_HAMA_NAME" /* asynOctet ro */
|
||||||
#define hVendorString "H_VENDOR" /* asynOctet ro */
|
#define hVendorString "H_VENDOR" /* asynOctet ro */
|
||||||
#define hModelString "H_MODEL" /* asynOctet ro */
|
#define hModelString "H_MODEL" /* asynOctet ro */
|
||||||
#define hCameraIDString "H_CAMERAID" /* asynOctet ro */
|
#define hCameraIDString "H_CAMERAID" /* asynOctet ro */
|
||||||
#define hBusString "H_BUS" /* asynOctet ro */
|
#define hBusString "H_BUS" /* asynOctet ro */
|
||||||
#define hCameraVersionString "H_CAMERA_VERSION" /* asynOctet ro */
|
#define hCameraVersionString "H_CAMERA_VERSION" /* asynOctet ro */
|
||||||
#define hDriverVersionString "H_DRIVER_VERSION" /* asynOctet ro */
|
#define hDriverVersionString "H_DRIVER_VERSION" /* asynOctet ro */
|
||||||
#define hModuleVersionString "H_MODULE_VERSION" /* asynOctet ro */
|
#define hModuleVersionString "H_MODULE_VERSION" /* asynOctet ro */
|
||||||
#define hDcamApiVersionString "H_DCAM_API_VERSION" /* asynOctet ro */
|
#define hDcamApiVersionString "H_DCAM_API_VERSION" /* asynOctet ro */
|
||||||
|
|
||||||
// Sensor mode and speed
|
// Sensor mode and speed
|
||||||
#define hSensorModeString "H_SENSOR_MODE" /* asynint32 rw */
|
#define hSensorModeString "H_SENSOR_MODE" /* asynint32 rw */
|
||||||
#define hReadoutSpeedString "H_READOUT_SPEED" /* asynInt32 rw */
|
#define hReadoutSpeedString "H_READOUT_SPEED" /* asynInt32 rw */
|
||||||
#define hReadoutDirectionString "H_READOUT_DIRECTION" /* asynIekt32 rw */
|
#define hReadoutDirectionString "H_READOUT_DIRECTION" /* asynIekt32 rw */
|
||||||
|
|
||||||
// Trigger
|
// Trigger
|
||||||
#define hTriggerSourceString "H_TRIGGER_SOURCE" /* asynInt32 rw */
|
#define hTriggerSourceString "H_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||||
#define hTriggerModeString "H_TRIGGER_MODE" /* asynInt32 rw */
|
#define hTriggerModeString "H_TRIGGER_MODE" /* asynInt32 rw */
|
||||||
#define hTriggerActiveString "H_TRIGGER_ACTIVE" /* asynInt32 rw */
|
#define hTriggerActiveString "H_TRIGGER_ACTIVE" /* asynInt32 rw */
|
||||||
#define hTriggerGlobalExposureString "H_TRIGGER_GLOBAL_EXPOSURE" /* asynInt32 rw */
|
#define hTriggerGlobalExposureString \
|
||||||
#define hTriggerPolarityString "H_TRIGGER_POLARITY" /* asynInt32 rw */
|
"H_TRIGGER_GLOBAL_EXPOSURE" /* asynInt32 rw */
|
||||||
#define hTriggerConnectorString "H_TRIGGER_CONNECTOR" /* asynInt32 rw */
|
#define hTriggerPolarityString "H_TRIGGER_POLARITY" /* asynInt32 rw */
|
||||||
#define hTriggerTimesString "H_TRIGGER_TIMES" /* asynInt32 rw */
|
#define hTriggerConnectorString "H_TRIGGER_CONNECTOR" /* asynInt32 rw */
|
||||||
#define hTriggerDelayString "H_TRIGGER_DELAY" /* asynFloat64 rw */
|
#define hTriggerTimesString "H_TRIGGER_TIMES" /* asynInt32 rw */
|
||||||
#define hInternalTriggerHandlingString "H_INTERNAL_TRIGGER_HANDLING" /* asynInt32 rw */
|
#define hTriggerDelayString "H_TRIGGER_DELAY" /* asynFloat64 rw */
|
||||||
|
#define hInternalTriggerHandlingString \
|
||||||
|
"H_INTERNAL_TRIGGER_HANDLING" /* asynInt32 rw */
|
||||||
|
|
||||||
// Sensor cooler
|
// Sensor cooler
|
||||||
#define hSensorTemperatureString "H_SENSOR_TEMPERATURE" /* asynFloat64 ro */
|
#define hSensorTemperatureString "H_SENSOR_TEMPERATURE" /* asynFloat64 ro */
|
||||||
#define hSensorCoolerString "H_SENSOR_COOLER" /* asynInt32 rw */
|
#define hSensorCoolerString "H_SENSOR_COOLER" /* asynInt32 rw */
|
||||||
#define hSensorCoolerStatusString "H_SENSOR_COOLER_STATUS" /* asynInt32 ro */
|
#define hSensorCoolerStatusString "H_SENSOR_COOLER_STATUS" /* asynInt32 ro */
|
||||||
|
|
||||||
// Binning and ROI
|
// Binning and ROI
|
||||||
#define hBinningString "H_BINNING" /* asynInt32 rw */
|
#define hBinningString "H_BINNING" /* asynInt32 rw */
|
||||||
#define hSubarrayHPosString "H_SUBARRAY_HPOST" /* asynInt32 rw */
|
#define hSubarrayHPosString "H_SUBARRAY_HPOST" /* asynInt32 rw */
|
||||||
#define hSubarrayHSizeString "H_SUBARRAY_HSIZE" /* asynInt32 rw */
|
#define hSubarrayHSizeString "H_SUBARRAY_HSIZE" /* asynInt32 rw */
|
||||||
#define hSubarrayVPosString "H_SUBARRAY_VPOS" /* asynInt32 rw */
|
#define hSubarrayVPosString "H_SUBARRAY_VPOS" /* asynInt32 rw */
|
||||||
#define hSubarrayVSizeString "H_SUBARRAY_VSIZE" /* asynInt32 rw */
|
#define hSubarrayVSizeString "H_SUBARRAY_VSIZE" /* asynInt32 rw */
|
||||||
#define hSubarrayModeString "H_SUBARRAY_MODE" /* asynInt32 rw */
|
#define hSubarrayModeString "H_SUBARRAY_MODE" /* asynInt32 rw */
|
||||||
// #define hFrameBundleMode (usb3 only not implemented)
|
|
||||||
// #define hFrameBundleNumber (usb3 only not implemented)
|
|
||||||
|
|
||||||
// ALU
|
// ALU
|
||||||
#define hDefectCorrectModeString "H_DEFECTCORRECT_MODE" /* asynInt32 rw */
|
#define hDefectCorrectModeString "H_DEFECTCORRECT_MODE" /* asynInt32 rw */
|
||||||
#define hHotPixelCorrectLevelString "H_HOT_PIXEL_CORRECT_LEVEL" /* asynInt32 rw */
|
#define hHotPixelCorrectLevelString \
|
||||||
#define hIntensityLutModeString "H_INTENSITY_LUT_MODE" /* asynInt32 rw */
|
"H_HOT_PIXEL_CORRECT_LEVEL" /* asynInt32 rw */
|
||||||
#define hIntensityLutPageString "H_INTENSITY_LUT_PAGE" /* asynInt32 ro */
|
#define hIntensityLutModeString "H_INTENSITY_LUT_MODE" /* asynInt32 rw */
|
||||||
#define hExtractionModeString "H_EXTRACTION_MODE" /* asynInt32 ro */
|
#define hIntensityLutPageString "H_INTENSITY_LUT_PAGE" /* asynInt32 ro */
|
||||||
|
#define hExtractionModeString "H_EXTRACTION_MODE" /* asynInt32 ro */
|
||||||
|
|
||||||
// output trigger
|
// output trigger
|
||||||
#define hNumberOfOutputTriggerConnectorString "H_NUMBEROF_OUTPUTTRIGGERCONNECTOR" /* asynInt32 ro */
|
#define hNumberOfOutputTriggerConnectorString \
|
||||||
#define hOutputTriggerSource0String "H_OUTPUT_TRIGGER_SOURCE0" /* asynInt32 rw */
|
"H_NUMBEROF_OUTPUTTRIGGERCONNECTOR" /* asynInt32 ro */
|
||||||
#define hOutputTriggerSource1String "H_OUTPUT_TRIGGER_SOURCE1" /* asynInt32 rw */
|
#define hOutputTriggerSource0String \
|
||||||
#define hOutputTriggerSource2String "H_OUTPUT_TRIGGER_SOURCE2" /* asynInt32 rw */
|
"H_OUTPUT_TRIGGER_SOURCE0" /* asynInt32 rw */
|
||||||
#define hOutputTriggerPolarity0String "H_OUTPUT_TRIGGER_POLARITY0" /* asynInt32 rw */
|
#define hOutputTriggerSource1String \
|
||||||
#define hOutputTriggerPolarity1String "H_OUTPUT_TRIGGER_POLARITY1" /* asynInt32 rw */
|
"H_OUTPUT_TRIGGER_SOURCE1" /* asynInt32 rw */
|
||||||
#define hOutputTriggerPolarity2String "H_OUTPUT_TRIGGER_POLARITY2" /* asynInt32 rw */
|
#define hOutputTriggerSource2String \
|
||||||
#define hOutputTriggerActive0String "H_OUTPUT_TRIGGER_ACTIVE0" /* asynInt32 ro */
|
"H_OUTPUT_TRIGGER_SOURCE2" /* asynInt32 rw */
|
||||||
#define hOutputTriggerActive1String "H_OUTPUT_TRIGGER_ACTIVE1" /* asynInt32 ro */
|
#define hOutputTriggerPolarity0String \
|
||||||
#define hOutputTriggerActive2String "H_OUTPUT_TRIGGER_ACTIVE2" /* asynInt32 ro */
|
"H_OUTPUT_TRIGGER_POLARITY0" /* asynInt32 rw */
|
||||||
#define hOutputTriggerDelay0String "H_OUTPUT_TRIGGER_DELAY0" /* asynFloat64 rw */
|
#define hOutputTriggerPolarity1String \
|
||||||
#define hOutputTriggerDelay1String "H_OUTPUT_TRIGGER_DELAY1" /* asynFloat64 rw */
|
"H_OUTPUT_TRIGGER_POLARITY1" /* asynInt32 rw */
|
||||||
#define hOutputTriggerDelay2String "H_OUTPUT_TRIGGER_DELAY2" /* asynFloat64 rw */
|
#define hOutputTriggerPolarity2String \
|
||||||
#define hOutputTriggerPeriod0String "H_OUTPUT_TRIGGER_PERIOD0" /* asynFloat64 rw */
|
"H_OUTPUT_TRIGGER_POLARITY2" /* asynInt32 rw */
|
||||||
#define hOutputTriggerPeriod1String "H_OUTPUT_TRIGGER_PERIOD1" /* asynFloat64 rw */
|
#define hOutputTriggerActive0String \
|
||||||
#define hOutputTriggerPeriod2String "H_OUTPUT_TRIGGER_PERIOD2" /* asynFloat64 rw */
|
"H_OUTPUT_TRIGGER_ACTIVE0" /* asynInt32 ro */
|
||||||
#define hOutputTriggerKind0String "H_OUTPUT_TRIGGER_KIND0" /* asynInt32 rw */
|
#define hOutputTriggerActive1String \
|
||||||
#define hOutputTriggerKind1String "H_OUTPUT_TRIGGER_KIND1" /* asynInt32 rw */
|
"H_OUTPUT_TRIGGER_ACTIVE1" /* asynInt32 ro */
|
||||||
#define hOutputTriggerKind2String "H_OUTPUT_TRIGGER_KIND2" /* asynInt32 rw */
|
#define hOutputTriggerActive2String \
|
||||||
#define hOutputTriggerBaseSensor0String "H_OUTPUT_TRIGGER_BASE_SENSOR0" /* asynInt32 rw */
|
"H_OUTPUT_TRIGGER_ACTIVE2" /* asynInt32 ro */
|
||||||
#define hOutputTriggerBaseSensor1String "H_OUTPUT_TRIGGER_BASE_SENSOR1" /* asynInt32 rw */
|
#define hOutputTriggerDelay0String \
|
||||||
#define hOutputTriggerBaseSensor2String "H_OUTPUT_TRIGGER_BASE_SENSOR2" /* asynInt32 rw */
|
"H_OUTPUT_TRIGGER_DELAY0" /* asynFloat64 rw */
|
||||||
#define hOutputTriggerPreHsyncCountString "H_OUTPUT_TRIGGER_PRE_HSYNC_COUNT" /* asynInt32 rw */
|
#define hOutputTriggerDelay1String \
|
||||||
|
"H_OUTPUT_TRIGGER_DELAY1" /* asynFloat64 rw */
|
||||||
|
#define hOutputTriggerDelay2String \
|
||||||
|
"H_OUTPUT_TRIGGER_DELAY2" /* asynFloat64 rw */
|
||||||
|
#define hOutputTriggerPeriod0String \
|
||||||
|
"H_OUTPUT_TRIGGER_PERIOD0" /* asynFloat64 rw */
|
||||||
|
#define hOutputTriggerPeriod1String \
|
||||||
|
"H_OUTPUT_TRIGGER_PERIOD1" /* asynFloat64 rw */
|
||||||
|
#define hOutputTriggerPeriod2String \
|
||||||
|
"H_OUTPUT_TRIGGER_PERIOD2" /* asynFloat64 rw */
|
||||||
|
#define hOutputTriggerKind0String "H_OUTPUT_TRIGGER_KIND0" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerKind1String "H_OUTPUT_TRIGGER_KIND1" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerKind2String "H_OUTPUT_TRIGGER_KIND2" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerBaseSensor0String \
|
||||||
|
"H_OUTPUT_TRIGGER_BASE_SENSOR0" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerBaseSensor1String \
|
||||||
|
"H_OUTPUT_TRIGGER_BASE_SENSOR1" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerBaseSensor2String \
|
||||||
|
"H_OUTPUT_TRIGGER_BASE_SENSOR2" /* asynInt32 rw */
|
||||||
|
#define hOutputTriggerPreHsyncCountString \
|
||||||
|
"H_OUTPUT_TRIGGER_PRE_HSYNC_COUNT" /* asynInt32 rw */
|
||||||
|
|
||||||
// Master Puls
|
// Master Puls
|
||||||
#define hMasterPulseModeString "H_MASTERPULSE_MODE" /* asynInt32 rw */
|
#define hMasterPulseModeString "H_MASTERPULSE_MODE" /* asynInt32 rw */
|
||||||
#define hMasterPulseTriggerSourceString "H_MASTERPULSE_TRIGGER_SOURCE" /* asynInt32 rw */
|
#define hMasterPulseTriggerSourceString \
|
||||||
#define hMasterPulseIntervalString "H_MASTERPULSE_INTERVAL" /* asynFloat64 rw */
|
"H_MASTERPULSE_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||||
#define hMasterPulseBurstTimesString "H_MASTERPULSE_BURST_TIMES" /* asynInt32 rw */
|
#define hMasterPulseIntervalString \
|
||||||
|
"H_MASTERPULSE_INTERVAL" /* asynFloat64 rw */
|
||||||
|
#define hMasterPulseBurstTimesString \
|
||||||
|
"H_MASTERPULSE_BURST_TIMES" /* asynInt32 rw */
|
||||||
|
|
||||||
// Synchronious Timing
|
// Synchronious Timing
|
||||||
#define hTimingReadoutTimeString "H_TIMING_READOUT_TIME" /* asynFloat64 ro */
|
#define hTimingReadoutTimeString "H_TIMING_READOUT_TIME" /* asynFloat64 ro */
|
||||||
#define hTimingCyclicTriggerPeriodString "H_TIMING_CYCLICTRIGGERPERIOD" /* asynFloat64 ro */
|
#define hTimingCyclicTriggerPeriodString \
|
||||||
#define hTimingMinTriggerBlankingString "H_TIMING_MIN_TRIGGER_BLANKING" /* asynFloat64 ro */
|
"H_TIMING_CYCLICTRIGGERPERIOD" /* asynFloat64 ro */
|
||||||
#define hTimingMinTriggerIntervalString "H_TIMING_MIN_TRIGGER_INTERVAL" /* asynFloat64 ro */
|
#define hTimingMinTriggerBlankingString \
|
||||||
#define hTimingGlobalExposureDelayString "H_TIMING_GLOBAL_EXPOSURE_DELAY" /* asynFloat64 ro */
|
"H_TIMING_MIN_TRIGGER_BLANKING" /* asynFloat64 ro */
|
||||||
#define hTimingExposureString "H_TIMING_EXPOSURE" /* asynInt32 ro */
|
#define hTimingMinTriggerIntervalString \
|
||||||
#define hTimingInvalidExposurePeriodString "H_TIMING_INVALID_EXPOSURE_PERIOD" /* asynFloat64 ro */
|
"H_TIMING_MIN_TRIGGER_INTERVAL" /* asynFloat64 ro */
|
||||||
#define hInternalFrameRateString "H_INTERNAL_FRAME_RATE" /* asynFloat64 rw */
|
#define hTimingGlobalExposureDelayString \
|
||||||
#define hInternalFrameIntervalString "H_INTERNAL_FRAME_INTERVAL" /* asynFloat64 rw */
|
"H_TIMING_GLOBAL_EXPOSURE_DELAY" /* asynFloat64 ro */
|
||||||
#define hInternalLineSpeedString "H_INTERNAL_LINE_SPEED" /* asynFloat64 rw */
|
#define hTimingExposureString "H_TIMING_EXPOSURE" /* asynInt32 ro */
|
||||||
#define hInternalLineIntervalString "H_INTERNAL_LINE_INTERVAL" /* asynFloat64 rw */
|
#define hTimingInvalidExposurePeriodString \
|
||||||
|
"H_TIMING_INVALID_EXPOSURE_PERIOD" /* asynFloat64 ro */
|
||||||
|
#define hInternalFrameRateString "H_INTERNAL_FRAME_RATE" /* asynFloat64 rw */
|
||||||
|
#define hInternalFrameIntervalString \
|
||||||
|
"H_INTERNAL_FRAME_INTERVAL" /* asynFloat64 rw */
|
||||||
|
#define hInternalLineSpeedString "H_INTERNAL_LINE_SPEED" /* asynFloat64 rw */
|
||||||
|
#define hInternalLineIntervalString \
|
||||||
|
"H_INTERNAL_LINE_INTERVAL" /* asynFloat64 rw */
|
||||||
|
|
||||||
// System information
|
// System information
|
||||||
#define hColorTypeString "H_COLOR_TYPE" /* asynInt32 ro */
|
#define hColorTypeString "H_COLOR_TYPE" /* asynInt32 ro */
|
||||||
#define hBitPerChannelString "H_BIT_PER_CHANNEL" /* asynInt32 rw */
|
#define hBitPerChannelString "H_BIT_PER_CHANNEL" /* asynInt32 rw */
|
||||||
//#define hImageWidthString "H_IMAGE_WIDTH" /* asynInt32 ro */
|
#define hImageRowBytesString "H_IMAGE_ROWBYTES" /* asynInt32 ro */
|
||||||
//#define hImageHeightString "H_IMAGE_HEIGHT" /* asynInt32 ro */
|
#define hImageFrameBytesString "H_IMAGE_FRAMEBYTES" /* asynInt32 ro */
|
||||||
#define hImageRowBytesString "H_IMAGE_ROWBYTES" /* asynInt32 ro */
|
#define hImageTopOffsetBytesString \
|
||||||
#define hImageFrameBytesString "H_IMAGE_FRAMEBYTES" /* asynInt32 ro */
|
"H_IMAGE_TOP_OFFSETBYTES" /* asynInt32 ro \
|
||||||
#define hImageTopOffsetBytesString "H_IMAGE_TOP_OFFSETBYTES" /* asynInt32 ro */
|
*/
|
||||||
#define hImagePixelTypeString "H_IMAGE_PIXEL_TYPE" /* asynInt32 rw */
|
#define hImagePixelTypeString "H_IMAGE_PIXEL_TYPE" /* asynInt32 rw */
|
||||||
#define hBufferRowbytesString "H_BUFFER_ROWBYTES" /* asynInt32 ro */
|
#define hBufferRowbytesString "H_BUFFER_ROWBYTES" /* asynInt32 ro */
|
||||||
#define hBufferFramebytesString "H_BUFFER_FRAMEBYTES" /* asynInt32 ro */
|
#define hBufferFramebytesString "H_BUFFER_FRAMEBYTES" /* asynInt32 ro */
|
||||||
#define hBufferTopOffsetBytesString "H_BUFFER_TOP_OFFSETBYTES" /* asynInt32 ro */
|
#define hBufferTopOffsetBytesString \
|
||||||
#define hBufferPixelTypeString "H_BUFFER_PIXEL_TYPE" /* asynInt32 ro */
|
"H_BUFFER_TOP_OFFSETBYTES" /* asynInt32 ro */
|
||||||
#define hRecordFixedBytesPerFileString "H_RECORD_FIXED_BYTES_PER_FILE" /* asynInt32 ro */
|
#define hBufferPixelTypeString "H_BUFFER_PIXEL_TYPE" /* asynInt32 ro */
|
||||||
#define hRecordFixedBytesPerSessionString "H_RECORD_FIXED_BYTES_PER_SESION" /* asynInt32 ro */
|
#define hRecordFixedBytesPerFileString \
|
||||||
#define hRecordFixedBytesPerFrameString "H_RECORD_FIXED_BYTES_PER_FRAME" /* asynInt32 ro */
|
"H_RECORD_FIXED_BYTES_PER_FILE" /* asynInt32 ro */
|
||||||
#define hSystemAliveString "H_SYSTEM_ALIVE" /* asynInt32 ro */
|
#define hRecordFixedBytesPerSessionString \
|
||||||
#define hConversionFactorCoeffString "H_CONVERSIONFACTOR_COEFF" /* asynFloat64 ro */
|
"H_RECORD_FIXED_BYTES_PER_SESION" /* asynInt32 ro */
|
||||||
#define hConversionFactorOffsetString "H_CONVERSIONFACTOR_OFFSET" /* asynFloat64 ro */
|
#define hRecordFixedBytesPerFrameString \
|
||||||
#define hNumberOfViewString "H_NUMBER_OF_VIEW" /* asynInt32 ro */
|
"H_RECORD_FIXED_BYTES_PER_FRAME" /* asynInt32 ro */
|
||||||
#define hImageDetectorPixelWidthString "H_IMAGE_DETECTOR_PIXEL_WIDTH" /* asynFloat64 ro */
|
#define hSystemAliveString "H_SYSTEM_ALIVE" /* asynInt32 ro */
|
||||||
#define hImageDetectorPixelHeightString "H_IMAGE_DETECTOR_PIXEL_HEIGHT" /* asynFloat64 ro */
|
#define hConversionFactorCoeffString \
|
||||||
#define hImageDetectorPixelNumHorzString "H_IMAGE_DETECTOR_PIXEL_NUM_HORZ" /* asynInt32 ro */
|
"H_CONVERSIONFACTOR_COEFF" /* asynFloat64 ro */
|
||||||
#define hImageDetectorPixelNumVertString "H_IMAGE_DETECTOR_PIXEL_NUM_VERT" /* asynInt32 ro */
|
#define hConversionFactorOffsetString \
|
||||||
#define hTimeStampProducerString "H_TIMESTAMP_PRODUCER" /* asynInt32 ro */
|
"H_CONVERSIONFACTOR_OFFSET" /* asynFloat64 ro */
|
||||||
#define hFrameStampProducerString "H_FRAMESTAMP_PRODUCER" /* asynInt32 ro */
|
#define hNumberOfViewString "H_NUMBER_OF_VIEW" /* asynInt32 ro */
|
||||||
#define evrTimeStampString "EVR_TIMESTAMP"
|
#define hTimeStampProducerString "H_TIMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||||
#define evrCountString "EVR_COUNTS"
|
#define hFrameStampProducerString "H_FRAMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||||
#define evrCountSinceAcqStartString "EVR_TRIGGERS_SINCE_ACQ_START"
|
#define evrTimeStampString "EVR_TIMESTAMP"
|
||||||
#define evrTriggerDroppedString "EVR_TRIGGER_DROPPED"
|
#define evrCountString "EVR_COUNTS"
|
||||||
#define hAcqControlString "H_ACQ_CONTROL"
|
#define evrCountSinceAcqStartString "EVR_TRIGGERS_SINCE_ACQ_START"
|
||||||
|
#define evrTriggerDroppedString "EVR_TRIGGER_DROPPED"
|
||||||
|
#define hAcqControlString "H_ACQ_CONTROL"
|
||||||
|
|
||||||
// For some reason these two addresses are not defined in the dcamapi4 neither in dcamprop.h
|
// For some reason these two addresses are not defined in the dcamapi4 neither
|
||||||
|
// in dcamprop.h
|
||||||
#define DETECTOR_PIXEL_NUM_HORZ 0x00420830
|
#define DETECTOR_PIXEL_NUM_HORZ 0x00420830
|
||||||
#define DETECTOR_PIXEL_NUM_VERT 0x00420840
|
#define DETECTOR_PIXEL_NUM_VERT 0x00420840
|
||||||
|
|
||||||
class epicsShareClass Orca : public ADDriver {
|
class epicsShareClass Orca : public ADDriver {
|
||||||
|
public:
|
||||||
|
Orca(const char*, int, size_t, int, int, int);
|
||||||
|
// ~Orca();
|
||||||
|
/* override ADDriver methods */
|
||||||
|
virtual asynStatus writeInt32(asynUser* pasynUser, epicsInt32 value);
|
||||||
|
virtual asynStatus writeFloat64(asynUser* pasynUser, epicsFloat64 value);
|
||||||
|
virtual void report(FILE* fp, int details);
|
||||||
|
|
||||||
public:
|
void createAsynParams();
|
||||||
Orca(const char*, int, int, size_t, int, int, int);
|
int readParameter(int propertyID, bool processPV = true);
|
||||||
// ~Orca();
|
int readParameterStr(int paramIndex);
|
||||||
/* override ADDriver methods */
|
|
||||||
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
|
|
||||||
virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
|
|
||||||
virtual void report(FILE *fp, int details);
|
|
||||||
|
|
||||||
int readParameter(int propertyID, bool processPV = true);
|
void imageTask();
|
||||||
int readParameterStr(int paramIndex);
|
void temperatureTask();
|
||||||
|
|
||||||
epicsUInt32 mTimeStampSec;
|
protected:
|
||||||
epicsUInt32 mTimeStampNsec;
|
int hFrameRate;
|
||||||
|
#define FIRST_HAMA_PARAM hFrameRate
|
||||||
void imageTask();
|
int hOrcaName;
|
||||||
void temperatureTask();
|
int hVendor;
|
||||||
|
int hModel;
|
||||||
|
int hCameraID;
|
||||||
|
int hBus;
|
||||||
|
int hCameraVersion;
|
||||||
|
int hDriverVersion;
|
||||||
|
int hModuleVersion;
|
||||||
|
int hDcamApiVersion;
|
||||||
|
// - sensor mode and speed
|
||||||
|
int hSensorMode;
|
||||||
|
int hReadoutSpeed;
|
||||||
|
int hReadoutDirection;
|
||||||
|
// - trigger
|
||||||
|
int hTriggerSource;
|
||||||
|
int hTriggerMode;
|
||||||
|
int hTriggerActive;
|
||||||
|
int hTriggerGlobalExposure;
|
||||||
|
int hTriggerPolarity;
|
||||||
|
int hTriggerConnector;
|
||||||
|
int hTriggerTimes;
|
||||||
|
int hTriggerDelay;
|
||||||
|
int hInternalTriggerHandling;
|
||||||
|
// - sensor cooler
|
||||||
|
int hSensorTemperature;
|
||||||
|
int hSensorCooler;
|
||||||
|
int hSensorCoolerStatus;
|
||||||
|
// - binning and roi
|
||||||
|
int hBinning;
|
||||||
|
int hSubarrayHPos;
|
||||||
|
int hSubarrayHSize;
|
||||||
|
int hSubarrayVPos;
|
||||||
|
int hSubarrayVSize;
|
||||||
|
int hSubarrayMode;
|
||||||
|
// - feature
|
||||||
|
int hExposureTime;
|
||||||
|
// - alu
|
||||||
|
int hDefectCorrectMode;
|
||||||
|
int hHotPixelCorrectLevel;
|
||||||
|
int hIntensityLutMode;
|
||||||
|
int hIntensityLutPage;
|
||||||
|
int hExtractionMode;
|
||||||
|
// - output trigger
|
||||||
|
int hNumberOfOutputTriggerConnector;
|
||||||
|
int hOutputTriggerSource0;
|
||||||
|
int hOutputTriggerSource1;
|
||||||
|
int hOutputTriggerSource2;
|
||||||
|
int hOutputTriggerPolarity0;
|
||||||
|
int hOutputTriggerPolarity1;
|
||||||
|
int hOutputTriggerPolarity2;
|
||||||
|
int hOutputTriggerActive0;
|
||||||
|
int hOutputTriggerActive1;
|
||||||
|
int hOutputTriggerActive2;
|
||||||
|
int hOutputTriggerDelay0;
|
||||||
|
int hOutputTriggerDelay1;
|
||||||
|
int hOutputTriggerDelay2;
|
||||||
|
int hOutputTriggerPeriod0;
|
||||||
|
int hOutputTriggerPeriod1;
|
||||||
|
int hOutputTriggerPeriod2;
|
||||||
|
int hOutputTriggerKind0;
|
||||||
|
int hOutputTriggerKind1;
|
||||||
|
int hOutputTriggerKind2;
|
||||||
|
int hOutputTriggerBaseSensor0;
|
||||||
|
int hOutputTriggerBaseSensor1;
|
||||||
|
int hOutputTriggerBaseSensor2;
|
||||||
|
int hOutputTriggerPreHsyncCount;
|
||||||
|
// - master pulse
|
||||||
|
int hMasterPulseMode;
|
||||||
|
int hMasterPulseTriggerSource;
|
||||||
|
int hMasterPulseInterval;
|
||||||
|
int hMasterPulseBurstTimes;
|
||||||
|
// - symchronous timing
|
||||||
|
int hTimingReadoutTime;
|
||||||
|
int hTimingCyclicTriggerPeriod;
|
||||||
|
int hTimingMinTriggerBlanking;
|
||||||
|
int hTimingMinTriggerInterval;
|
||||||
|
int hTimingGlobalExposureDelay;
|
||||||
|
int hTimingExposure;
|
||||||
|
int hTimingInvalidExposurePeriod;
|
||||||
|
int hInternalFrameRate;
|
||||||
|
int hInternalFrameInterval;
|
||||||
|
int hInternalLineSpeed;
|
||||||
|
int hInternalLineInterval;
|
||||||
|
// - system information
|
||||||
|
int hColorType;
|
||||||
|
int hBitPerChannel;
|
||||||
|
int hImageRowbytes;
|
||||||
|
int hImageFramebytes;
|
||||||
|
int hImageTopOffsetBytes;
|
||||||
|
int hImagePixelType;
|
||||||
|
int hBufferRowbytes;
|
||||||
|
int hBufferFramebytes;
|
||||||
|
int hBufferTopOffsetBytes;
|
||||||
|
int hBufferPixelType;
|
||||||
|
int hRecordFixedBytesPerFile;
|
||||||
|
int hRecordFixedBytesPerSession;
|
||||||
|
int hRecordFixedBytesPerFrame;
|
||||||
|
int hSystemAlive;
|
||||||
|
int hConversionFactorCoeff;
|
||||||
|
int hConversionFactorOffset;
|
||||||
|
int hNumberOfView;
|
||||||
|
int hImageDetectorPixelWidth;
|
||||||
|
int hImageDetectorPixelHeight;
|
||||||
|
int hImageDetectorPixelNumHorz;
|
||||||
|
int hImageDetectorPixelNumVert;
|
||||||
|
int hTimeStampProducer;
|
||||||
|
int hFrameStampProducer;
|
||||||
|
int evrCounts;
|
||||||
|
int evrCountsSinceAcqStart;
|
||||||
|
int evrTriggerDropped;
|
||||||
|
int hAcqControl;
|
||||||
|
int evrTimeStamp;
|
||||||
|
//----
|
||||||
|
//#define LAST_HAMA_PARAM evrTimeStamp
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
int hFrameRate;
|
HDCAM m_hdcam;
|
||||||
#define FIRST_HAMA_PARAM hFrameRate
|
DCAMAPI_INIT m_apiInit;
|
||||||
int hOrcaName;
|
DCAMDEV_OPEN m_devOpen;
|
||||||
int hVendor;
|
DCAMERR m_err;
|
||||||
int hModel;
|
HDCAMWAIT hwait;
|
||||||
int hCameraID;
|
|
||||||
int hBus;
|
|
||||||
int hCameraVersion;
|
|
||||||
int hDriverVersion;
|
|
||||||
int hModuleVersion;
|
|
||||||
int hDcamApiVersion;
|
|
||||||
// - sensor mode and speed
|
|
||||||
int hSensorMode;
|
|
||||||
int hReadoutSpeed;
|
|
||||||
int hReadoutDirection;
|
|
||||||
// - trigger
|
|
||||||
int hTriggerSource;
|
|
||||||
int hTriggerMode;
|
|
||||||
int hTriggerActive;
|
|
||||||
int hTriggerGlobalExposure;
|
|
||||||
int hTriggerPolarity;
|
|
||||||
int hTriggerConnector;
|
|
||||||
int hTriggerTimes;
|
|
||||||
int hTriggerDelay;
|
|
||||||
int hInternalTriggerHandling;
|
|
||||||
// - sensor cooler
|
|
||||||
int hSensorTemperature;
|
|
||||||
int hSensorCooler;
|
|
||||||
int hSensorCoolerStatus;
|
|
||||||
// - binning and roi
|
|
||||||
int hBinning;
|
|
||||||
int hSubarrayHPos;
|
|
||||||
int hSubarrayHSize;
|
|
||||||
int hSubarrayVPos;
|
|
||||||
int hSubarrayVSize;
|
|
||||||
int hSubarrayMode;
|
|
||||||
// - feature
|
|
||||||
int hExposureTime;
|
|
||||||
// - alu
|
|
||||||
int hDefectCorrectMode;
|
|
||||||
int hHotPixelCorrectLevel;
|
|
||||||
int hIntensityLutMode;
|
|
||||||
int hIntensityLutPage;
|
|
||||||
int hExtractionMode;
|
|
||||||
// - output trigger
|
|
||||||
int hNumberOfOutputTriggerConnector;
|
|
||||||
int hOutputTriggerSource0;
|
|
||||||
int hOutputTriggerSource1;
|
|
||||||
int hOutputTriggerSource2;
|
|
||||||
int hOutputTriggerPolarity0;
|
|
||||||
int hOutputTriggerPolarity1;
|
|
||||||
int hOutputTriggerPolarity2;
|
|
||||||
int hOutputTriggerActive0;
|
|
||||||
int hOutputTriggerActive1;
|
|
||||||
int hOutputTriggerActive2;
|
|
||||||
int hOutputTriggerDelay0;
|
|
||||||
int hOutputTriggerDelay1;
|
|
||||||
int hOutputTriggerDelay2;
|
|
||||||
int hOutputTriggerPeriod0;
|
|
||||||
int hOutputTriggerPeriod1;
|
|
||||||
int hOutputTriggerPeriod2;
|
|
||||||
int hOutputTriggerKind0;
|
|
||||||
int hOutputTriggerKind1;
|
|
||||||
int hOutputTriggerKind2;
|
|
||||||
int hOutputTriggerBaseSensor0;
|
|
||||||
int hOutputTriggerBaseSensor1;
|
|
||||||
int hOutputTriggerBaseSensor2;
|
|
||||||
int hOutputTriggerPreHsyncCount;
|
|
||||||
// - master pulse
|
|
||||||
int hMasterPulseMode;
|
|
||||||
int hMasterPulseTriggerSource;
|
|
||||||
int hMasterPulseInterval;
|
|
||||||
int hMasterPulseBurstTimes;
|
|
||||||
// - symchronous timing
|
|
||||||
int hTimingReadoutTime;
|
|
||||||
int hTimingCyclicTriggerPeriod;
|
|
||||||
int hTimingMinTriggerBlanking;
|
|
||||||
int hTimingMinTriggerInterval;
|
|
||||||
int hTimingGlobalExposureDelay;
|
|
||||||
int hTimingExposure;
|
|
||||||
int hTimingInvalidExposurePeriod;
|
|
||||||
int hInternalFrameRate;
|
|
||||||
int hInternalFrameInterval;
|
|
||||||
int hInternalLineSpeed;
|
|
||||||
int hInternalLineInterval;
|
|
||||||
// - system information
|
|
||||||
int hColorType;
|
|
||||||
int hBitPerChannel;
|
|
||||||
int hImageRowbytes;
|
|
||||||
int hImageFramebytes;
|
|
||||||
int hImageTopOffsetBytes;
|
|
||||||
int hImagePixelType;
|
|
||||||
int hBufferRowbytes;
|
|
||||||
int hBufferFramebytes;
|
|
||||||
int hBufferTopOffsetBytes;
|
|
||||||
int hBufferPixelType;
|
|
||||||
int hRecordFixedBytesPerFile;
|
|
||||||
int hRecordFixedBytesPerSession;
|
|
||||||
int hRecordFixedBytesPerFrame;
|
|
||||||
int hSystemAlive;
|
|
||||||
int hConversionFactorCoeff;
|
|
||||||
int hConversionFactorOffset;
|
|
||||||
int hNumberOfView;
|
|
||||||
int hImageDetectorPixelWidth;
|
|
||||||
int hImageDetectorPixelHeight;
|
|
||||||
int hImageDetectorPixelNumHorz;
|
|
||||||
int hImageDetectorPixelNumVert;
|
|
||||||
int hTimeStampProducer;
|
|
||||||
int hFrameStampProducer;
|
|
||||||
int evrCounts;
|
|
||||||
int evrCountsSinceAcqStart;
|
|
||||||
int evrTriggerDropped;
|
|
||||||
int hAcqControl;
|
|
||||||
int evrTimeStamp;
|
|
||||||
//----
|
|
||||||
//#define LAST_HAMA_PARAM evrTimeStamp
|
|
||||||
|
|
||||||
|
int stopThread;
|
||||||
|
|
||||||
private:
|
epicsEventId startEvent_;
|
||||||
|
|
||||||
HDCAM m_hdcam;
|
|
||||||
DCAMAPI_INIT m_apiInit;
|
|
||||||
DCAMDEV_OPEN m_devOpen;
|
|
||||||
DCAMERR m_err;
|
|
||||||
// handle used to wait for events sent from the device
|
|
||||||
HDCAMWAIT hwait;
|
|
||||||
|
|
||||||
int m_id;
|
// Helper functions
|
||||||
int stopThread;
|
asynStatus startAcquire(void);
|
||||||
|
asynStatus stopAcquire(void);
|
||||||
|
void getImageInformation(HDCAM hdcam, int32& pixeltype, int32& width,
|
||||||
|
int32& rowbytes, int32& height, int32& framebytes);
|
||||||
|
asynStatus accessCapturedImage(HDCAM hdcam, int32 iFrame, void* buf,
|
||||||
|
int32 rowbytes, int32 cx, int32 cy,
|
||||||
|
epicsUInt32& ts_sec, epicsUInt32& ts_microsec);
|
||||||
|
asynStatus imageTransferStatus(HDCAM hdcam,
|
||||||
|
DCAMCAP_TRANSFERINFO& captransferinfo, char *buf);
|
||||||
|
|
||||||
epicsEventId startEvent_;
|
// wrapper functions for dcamapi
|
||||||
|
int allocateBuffers(unsigned int);
|
||||||
|
int freeBuffers();
|
||||||
|
|
||||||
// Helper functions
|
// These function will be read only once
|
||||||
asynStatus startAcquire(void);
|
int connectCamera();
|
||||||
asynStatus stopAcquire(void);
|
int initCamera();
|
||||||
void getImageInformation(HDCAM hdcam, int32& pixeltype, int32& width, int32& rowbytes, int32& height, int32& framebytes);
|
|
||||||
asynStatus accessCapturedImage(HDCAM hdcam, int32 iFrame, void* buf, int32 rowbytes, int32 cx, int32 cy, epicsUInt32& ts_sec, epicsUInt32& ts_microsec);
|
|
||||||
asynStatus imageTransferStatus(HDCAM hdcam, DCAMCAP_TRANSFERINFO &captransferinfo);
|
|
||||||
|
|
||||||
// wrapper functions for dcamapi
|
bool checkAndLogError(DCAMERR err, const char* msg, int idx, double val,
|
||||||
int allocateBuffers(unsigned int);
|
const char* functionName);
|
||||||
int freeBuffers();
|
|
||||||
|
|
||||||
// These function will be read only once
|
int roundToNearestMultipleOfFour(int value);
|
||||||
int connectCamera();
|
|
||||||
int disconnectCamera();
|
asynStatus setFeature(int featureIndex, double value);
|
||||||
int initCamera();
|
|
||||||
|
|
||||||
// helper functions for dcamapi
|
|
||||||
void printError(HDCAM hdcam, DCAMERR errid, const char* apiname, const char* fmt=NULL, ...);
|
|
||||||
void printInfo(HDCAM hdcam);
|
|
||||||
int dcamdev_string( DCAMERR& err, HDCAM hdcam, int32 idStr, char* text, int32 textbytes );
|
|
||||||
|
|
||||||
|
|
||||||
int getProperties();
|
|
||||||
int roundToNearestMultipleOfFour(int value);
|
|
||||||
|
|
||||||
asynStatus setFeature(int featureIndex, double value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
45
cmds/st.cmd
45
cmds/st.cmd
@@ -1,10 +1,9 @@
|
|||||||
# This should be a test startup script
|
|
||||||
require adorca
|
require adorca
|
||||||
|
require ndpluginschemas
|
||||||
require adpluginkafka
|
require adpluginkafka
|
||||||
|
|
||||||
epicsEnvSet("PREFIX", "Orca:")
|
epicsEnvSet("PREFIX", "YMIR-Det1:")
|
||||||
epicsEnvSet("PORT", "ORCA")
|
epicsEnvSet("PORT", "ORCA")
|
||||||
epicsEnvSet("CAMERA", "0")
|
|
||||||
epicsEnvSet("QSIZE", "21")
|
epicsEnvSet("QSIZE", "21")
|
||||||
epicsEnvSet("XSIZE", "2048")
|
epicsEnvSet("XSIZE", "2048")
|
||||||
epicsEnvSet("YSIZE", "2048")
|
epicsEnvSet("YSIZE", "2048")
|
||||||
@@ -14,17 +13,16 @@ epicsEnvSet("NELEMENTS", "4194304")
|
|||||||
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "64000000")
|
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "64000000")
|
||||||
|
|
||||||
#EVR settings
|
#EVR settings
|
||||||
#epicsEnvSet("EVR", "LabS-NIDO:Ctrl-EVR-01")
|
epicsEnvSet("EVR", "YMIR-TS:Ctrl-EVR-03")
|
||||||
epicsEnvSet("EVR", "Labs-ECDC:TS-EVR-11")
|
|
||||||
epicsEnvSet("EVR_EVENT", "B")
|
epicsEnvSet("EVR_EVENT", "B")
|
||||||
|
|
||||||
# iocshLoad("$(adorca_DIR)ADOrca.iocsh")
|
# iocshLoad("$(adorca_DIR)ADOrca.iocsh")
|
||||||
|
|
||||||
devOrcamatsuConfig("$(PORT)", $(CAMERA), 0, 0, 0, 0, 10)
|
devOrcaConfig("$(PORT)", 0, 0, 0, 0, 10)
|
||||||
|
|
||||||
dbLoadRecords("$(adorca_DIR)db/orca.db","P=$(PREFIX),R=cam1:,EVR=$(EVR),E=$(EVR_EVENT),PORT=$(PORT),ADDR=0,TIMEOUT=1")
|
dbLoadRecords("$(adorca_DIR)db/orca.db","P=$(PREFIX),R=cam1:,EVR=$(EVR),E=$(EVR_EVENT),PORT=$(PORT),ADDR=0,TIMEOUT=1")
|
||||||
|
|
||||||
#asynSetTraceMask("$(PORT)",-1,0x9)
|
#asynSetTraceMask("$(PORT)",-1,0x10)
|
||||||
#asynSetTraceIOMask("$(PORT)",-1,0x2)
|
#asynSetTraceIOMask("$(PORT)",-1,0x2)
|
||||||
|
|
||||||
|
|
||||||
@@ -37,35 +35,38 @@ NDPvaConfigure("PVA1", $(QSIZE), 0, "$(PORT)", 0, "$(PREFIX)Pva1:Image", 0, 0, 0
|
|||||||
dbLoadRecords("$(adcore_DIR)/db/NDPva.template", "P=$(PREFIX),R=Pva1:, PORT=PVA1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
|
dbLoadRecords("$(adcore_DIR)/db/NDPva.template", "P=$(PREFIX),R=Pva1:, PORT=PVA1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT)")
|
||||||
#
|
#
|
||||||
|
|
||||||
|
NDSchemasConfigure("Schemas1", "$(QSIZE)", 0, "$(PORT)", 0, 0, 0, "test-orca-lab", 0)
|
||||||
|
dbLoadRecords("$(ndpluginschemas_DB)/NDPluginSchemas.template", "P=$(PREFIX), R=schemas:, PORT=Schemas1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=$(PORT)")
|
||||||
|
|
||||||
# Create a standard arrays plugin, set it to get data from orca driver.
|
# Create a standard arrays plugin, set it to get data from orca driver.
|
||||||
NDStdArraysConfigure("Image1", "$(QSIZE)", 0, "$(PORT)", 0, 0)
|
NDStdArraysConfigure("Image1", "$(QSIZE)", 0, "$(PORT)", 0, 0)
|
||||||
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int32,FTVL=LONG,NELEMENTS=$(NELEMENTS)")
|
dbLoadRecords("NDStdArrays.template", "P=$(PREFIX),R=image1:,PORT=Image1,ADDR=0,TIMEOUT=1,NDARRAY_PORT=$(PORT),TYPE=Int32,FTVL=LONG,NELEMENTS=$(NELEMENTS)")
|
||||||
|
|
||||||
# Create a kafka plugin, set it to get data from orca driver.
|
# Create a kafka plugin, set it to get data from orca driver.
|
||||||
#epicsEnvSet("KFK_TOPIC", "ymir_camera")
|
epicsEnvSet("KFK_TOPIC", "ymir_camera")
|
||||||
epicsEnvSet("KFK_TOPIC", "nido_camera")
|
|
||||||
|
|
||||||
# Kafka plugin
|
# Kafka plugin
|
||||||
epicsEnvSet("KFK_CONFIG_FILE_PATH", "/home/iocuser/git/adhama/cmds/kafka.conf")
|
#epicsEnvSet("KFK_CONFIG_FILE_PATH", "/etc/kafka/kafka.conf")
|
||||||
|
|
||||||
KafkaPluginConfigure("KFK1", 3, 1, "$(PORT)", 0, -1, "$(KFK_TOPIC)", "hama_kfk1","$(KFK_CONFIG_FILE_PATH)")
|
KafkaPluginConfigure("Kafka1", 3, 1, "Schemas1", 0, -1, "$(KFK_TOPIC)","$(KFK_CONFIG_FILE_PATH)")
|
||||||
dbLoadRecords("$(adpluginkafka_DIR)db/adpluginkafka.db", "P=$(PREFIX), R=Kfk1:, PORT=KFK1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=$(PORT)")
|
dbLoadRecords("$(adpluginkafka_DB)/adpluginkafka.db", "P=$(PREFIX), R=Kfk1:, PORT=Kafka1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=Schemas1")
|
||||||
|
|
||||||
startPVAServer
|
# startPVAServer
|
||||||
iocInit()
|
iocInit()
|
||||||
|
|
||||||
dbpf Orca:cam1:PoolUsedMem.SCAN 0
|
dbpf $(PREFIX)cam1:PoolUsedMem.SCAN 0
|
||||||
dbpf Orca:image1:EnableCallbacks 1
|
dbpf $(PREFIX)image1:EnableCallbacks 1
|
||||||
dbpf Orca:Kfk1:EnableCallbacks 1
|
|
||||||
|
|
||||||
dbpf Orca:cam1:AcquireTime .001
|
dbpf $(PREFIX)cam1:AcquireTime .05
|
||||||
dbpf Orca:cam1:AcquirePeriod .02
|
dbpf $(PREFIX)cam1:AcquirePeriod .1
|
||||||
dbpf Orca:cam1:TriggerSource-S 1 # external
|
dbpf $(PREFIX)cam1:NumImages 10
|
||||||
dbpf Orca:cam1:NumImages 10
|
dbpf $(PREFIX)cam1:ImageMode 1
|
||||||
dbpf Orca:cam1:ImageMode 1
|
|
||||||
|
|
||||||
#dbpf Orca:cam1:TriggerPolarity-S # 2-positive, 1-negative
|
#dbpf Orca:cam1:TriggerPolarity-S # 2-positive, 1-negative
|
||||||
|
|
||||||
epicsThreadSleep(1.0)
|
epicsThreadSleep(1.0)
|
||||||
|
|
||||||
dbl > pv.list
|
dbpf $(PREFIX)cam1:PoolUsedMem.SCAN 0
|
||||||
|
dbpf $(PREFIX)image1:EnableCallbacks 1
|
||||||
|
|
||||||
|
epicsThreadSleep(1.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user