Merge dev into master
According to this MR: https://gitlab.esss.lu.se/epics-modules/adorca/-/merge_requests/18 it seems dev branch has been extensively used in the last few months. The recipe is using the dev branch: https://gitlab.esss.lu.se/e3/recipes/adorca-recipe/-/blob/master/recipe/meta.yaml?ref_type=heads so merging it into master shouldn't break anything. It's just a sync after some development time. I initially thought about merging master into dev first to solve the small conflict in .gitignore but then this would be acessible to the recipe. After this maybe we should update the recipe?
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -5,5 +5,9 @@ O.*
|
||||
.cvsignore
|
||||
*.db
|
||||
*.db.*
|
||||
*.Makefile
|
||||
Makefile.E3
|
||||
pv.list
|
||||
core.*
|
||||
.vscode
|
||||
list.txt
|
||||
kafka.conf
|
||||
ecdc-kafka-ca.crt
|
||||
|
||||
BIN
ADHamaApp/Db/.DS_Store
vendored
BIN
ADHamaApp/Db/.DS_Store
vendored
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
registrar("hamaRegister")
|
||||
@@ -1,295 +0,0 @@
|
||||
#ifndef DRV_HAMA_H
|
||||
#define DRV_HAMA_H
|
||||
|
||||
#include "ADDriver.h"
|
||||
#include "dcamapi4.h"
|
||||
|
||||
#define MAX_FEATURE_NAME_LEN 64
|
||||
|
||||
#define hFrameRateString "H_FRAME_RATE" /* asynOctet ro */
|
||||
#define HamaName "Name" /* asynOctet ro */
|
||||
#define hVendorString "H_VENDOR" /* asynOctet ro */
|
||||
#define hModelString "H_MODEL" /* asynOctet ro */
|
||||
#define hCameraIDString "H_CAMERAID" /* asynOctet ro */
|
||||
#define hBusString "H_BUS" /* asynOctet ro */
|
||||
#define hCameraVersionString "H_CAMERA_VERSION" /* asynOctet ro */
|
||||
#define hDriverVersionString "H_DRIVER_VERSION" /* asynOctet ro */
|
||||
#define hModuleVersionString "H_MODULE_VERSION" /* asynOctet ro */
|
||||
#define hDcamApiVersionString "H_DCAM_API_VERSION" /* asynOctet ro */
|
||||
|
||||
// Sensor mode and speed
|
||||
#define hSensorModeString "H_SENSOR_MODE" /* asynint32 rw */
|
||||
#define hReadoutSpeedString "H_READOUT_SPEED" /* asynInt32 rw */
|
||||
#define hReadoutDirectionString "H_READOUT_DIRECTION" /* asynIekt32 rw */
|
||||
|
||||
// Trigger
|
||||
#define hTriggerSourceString "H_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||
#define hTriggerModeString "H_TRIGGER_MODE" /* asynInt32 rw */
|
||||
#define hTriggerActiveString "H_TRIGGER_ACTIVE" /* asynInt32 rw */
|
||||
#define hTriggerGlobalExposureString "H_TRIGGER_GLOBAL_EXPOSURE" /* asynInt32 rw */
|
||||
#define hTriggerPolarityString "H_TRIGGER_POLARITY" /* asynInt32 rw */
|
||||
#define hTriggerConnectorString "H_TRIGGER_CONNECTOR" /* asynInt32 rw */
|
||||
#define hTriggerTimesString "H_TRIGGER_TIMES" /* asynInt32 rw */
|
||||
#define hTriggerDelayString "H_TRIGGER_DELAY" /* asynFloat64 rw */
|
||||
#define hInternalTriggerHandlingString "H_INTERNAL_TRIGGER_HANDLING" /* asynInt32 rw */
|
||||
|
||||
// Sensor cooler
|
||||
#define hSensorTemperatureString "H_SENSOR_TEMPERATURE" /* asynFloat64 ro */
|
||||
#define hSensorCoolerString "H_SENSOR_COOLER" /* asynInt32 rw */
|
||||
#define hSensorCoolerStatusString "H_SENSOR_COOLER_STATUS" /* asynInt32 ro */
|
||||
|
||||
// Binning and ROI
|
||||
#define hBinningString "H_BINNING" /* asynInt32 rw */
|
||||
#define hSubarrayHPosString "H_SUBARRAY_HPOST" /* asynInt32 rw */
|
||||
#define hSubarrayHSizeString "H_SUBARRAY_HSIZE" /* asynInt32 rw */
|
||||
#define hSubarrayVPosString "H_SUBARRAY_VPOS" /* asynInt32 rw */
|
||||
#define hSubarrayVSizeString "H_SUBARRAY_VSIZE" /* asynInt32 rw */
|
||||
#define hSubarrayModeString "H_SUBARRAY_MODE" /* asynInt32 rw */
|
||||
// #define hFrameBundleMode (usb3 only not implemented)
|
||||
// #define hFrameBundleNumber (usb3 only not implemented)
|
||||
|
||||
// Feature
|
||||
#define hExposureTimeString "H_EXPOSURE_TIME" /* asynFloat64 rw */
|
||||
|
||||
// ALU
|
||||
#define hDefectCorrectModeString "H_DEFECTCORRECT_MODE" /* asynInt32 rw */
|
||||
#define hHotPixelCorrectLevelString "H_HOT_PIXEL_CORRECT_LEVEL" /* asynInt32 rw */
|
||||
#define hIntensityLutModeString "H_INTENSITY_LUT_MODE" /* asynInt32 rw */
|
||||
#define hIntensityLutPageString "H_INTENSITY_LUT_PAGE" /* asynInt32 ro */
|
||||
#define hExtractionModeString "H_EXTRACTION_MODE" /* asynInt32 ro */
|
||||
|
||||
// output trigger
|
||||
#define hNrOutputTriggerConnectorsString "H_NR_OUTPUT_TRIGGER_CONNECTORS" /* asynInt32 ro */
|
||||
#define hOutputTriggerSource0String "H_OUTPUT_TRIGGER_SOURCE0" /* asynInt32 rw */
|
||||
#define hOutputTriggerSource1String "H_OUTPUT_TRIGGER_SOURCE1" /* asynInt32 rw */
|
||||
#define hOutputTriggerSource2String "H_OUTPUT_TRIGGER_SOURCE2" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity0String "H_OUTPUT_TRIGGER_POLARITY0" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity1String "H_OUTPUT_TRIGGER_POLARITY1" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity2String "H_OUTPUT_TRIGGER_POLARITY2" /* asynInt32 rw */
|
||||
#define hOutputTriggerActive0String "H_OUTPUT_TRIGGER_ACTIVE0" /* asynInt32 ro */
|
||||
#define hOutputTriggerActive1String "H_OUTPUT_TRIGGER_ACTIVE1" /* asynInt32 ro */
|
||||
#define hOutputTriggerActive2String "H_OUTPUT_TRIGGER_ACTIVE2" /* asynInt32 ro */
|
||||
#define hOutputTriggerDelay0String "H_OUTPUT_TRIGGER_DELAY0" /* asynFloat64 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 hOutTriggerPreHsyncCountString "H_OUTPUT_TRIGGER_PRE_HSYNC_COUNT" /* asynInt32 rw */
|
||||
|
||||
// Master Puls
|
||||
#define hMasterPulseModeString "H_MASTERPULSE_MODE" /* asynInt32 rw */
|
||||
#define hMasterPulseTriggerSourceString "H_MASTERPULSE_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||
#define hMasterPulseIntervalString "H_MASTERPULSE_INTERVAL" /* asynFloat64 rw */
|
||||
#define hMasterPulseBurstTimesString "H_MASTERPULSE_BURST_TIMES" /* asynInt32 rw */
|
||||
|
||||
// Synchronious Timing
|
||||
#define hTimingReadoutTimeString "H_TIMING_READOUT_TIME" /* asynFloat64 ro */
|
||||
#define hTimingCyclicTriggerPeriodString "H_TIMING_CYCLICTRIGGERPERIOD" /* asynFloat64 ro */
|
||||
#define hTimingMinTriggerBlankingString "H_TIMING_MIN_TRIGGER_BLANKING" /* asynFloat64 ro */
|
||||
#define hTimingMinTriggerIntervalString "H_TIMING_MIN_TRIGGER_INTERVAL" /* asynFloat64 ro */
|
||||
#define hTimingGlobalExposureDelayString "H_TIMING_GLOBAL_EXPOSURE_DELAY" /* asynFloat64 ro */
|
||||
#define hTimingExposureString "H_TIMING_EXPOSURE" /* asynInt32 ro */
|
||||
#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
|
||||
#define hColorTypeString "H_COLOR_TYPE" /* asynInt32 ro */
|
||||
#define hBitPerChannelString "H_BIT_PER_CHANNEL" /* asynInt32 rw */
|
||||
#define hImageWidthString "H_IMAGE_WIDTH" /* asynInt32 ro */
|
||||
#define hImageHeightString "H_IMAGE_HEIGHT" /* asynInt32 ro */
|
||||
#define hImageRowBytesString "H_IMAGE_ROWBYTES" /* asynInt32 ro */
|
||||
#define hImageFrameBytesString "H_IMAGE_FRAMEBYTES" /* asynInt32 ro */
|
||||
#define hImageTopOffsetBytesString "H_IMAGE_TOP_OFFSETBYTES" /* asynInt32 ro */
|
||||
#define hImagePixelTypeString "H_IMAGE_PIXEL_TYPE" /* asynInt32 rw */
|
||||
#define hBufferRowbytesString "H_BUFFER_ROWBYTES" /* asynInt32 ro */
|
||||
#define hBufferFramebytesString "H_BUFFER_FRAMEBYTES" /* asynInt32 ro */
|
||||
#define hBufferTopOffsetBytesString "H_BUFFER_TOP_OFFSETBYTES" /* asynInt32 ro */
|
||||
#define hBufferPixelTypeString "H_BUFFER_PIXEL_TYPE" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerFileString "H_RECORD_FIXED_BYTES_PER_FILE" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerSessionString "H_RECORD_FIXED_BYTES_PER_SESION" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerFrameString "H_RECORD_FIXED_BYTES_PER_FRAME" /* asynInt32 ro */
|
||||
#define hSystemAliveString "H_SYSTEM_ALIVE" /* asynInt32 ro */
|
||||
#define hConversionFactorCoeffString "H_CONVERSION_FACTOR_COEF" /* asynFloat64 ro */
|
||||
#define hConversionFactorOffsetString "H_CONVERSION_FACTOR_OFFSET"/* asynFloat64 ro */
|
||||
#define hNumberOfViewString "H_NUMBER_OF_VIEW" /* asynInt32 ro */
|
||||
#define hImageDetectorPixelWidthString "H_IMAGE_DETECTOR_PIXEL_WIDTH" /* asynFloat64 ro */
|
||||
#define hImageDetectorPixelHeightString "H_IMAGE_DETECTOR_PIXEL_HEIGHT" /* asynFloat64 ro */
|
||||
#define hImageDetectorPixelNumHorzString "H_IMAGE_DETECTOR_PIXEL_NUM_HORZ" /* asynInt32 ro */
|
||||
#define hImageDetectorPixelNumVertString "H_IMAGE_DETECTOR_PIXEL_NUM_VERT" /* asynInt32 ro */
|
||||
#define hTimeStampProducerString "H_TIMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||
#define hFrameStampProducerString "H_FRAMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||
|
||||
|
||||
|
||||
|
||||
class Hama : public ADDriver {
|
||||
|
||||
public:
|
||||
Hama(const char*, int, int, size_t, int, int, int);
|
||||
// ~Hama();
|
||||
/* override ADDriver methods */
|
||||
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
|
||||
virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
|
||||
//virtual asynStatus readEnum(asynUser *pasynUser, char *strings[], int values[],
|
||||
// int severities[], size_t nElements, size_t *nIn);
|
||||
virtual void report(FILE *fp, int details);
|
||||
void imageTask();
|
||||
void temperatureTask();
|
||||
|
||||
protected:
|
||||
int hFrameRate;
|
||||
#define FIRST_HAMA_PARAM hFrameRate
|
||||
int hHamaName;
|
||||
int hVendor;
|
||||
int hModel;
|
||||
int hCameraID;
|
||||
int hBus;
|
||||
int hCameraVersion;
|
||||
int hDriverVersion;
|
||||
int hModuleVersion;
|
||||
int hDcamApiVersion;
|
||||
int hSensorMode;
|
||||
int hReadoutSpeed;
|
||||
int hReadoutDirection;
|
||||
int hColorType;
|
||||
int hBitPerChannel;
|
||||
int hTriggerSource;
|
||||
int hTriggerMode;
|
||||
int hTriggerActive;
|
||||
int hTriggerGlobalExposure;
|
||||
int hTriggerPolarity;
|
||||
int hTriggerConnector;
|
||||
int hTriggerTimes;
|
||||
int hTriggerDelay;
|
||||
int hInternalTriggerHandling;
|
||||
int hSensorTemperature;
|
||||
int hSensorCooler;
|
||||
int hSensorCoolerStatus;
|
||||
int hExposureTime;
|
||||
int hDefectCorrectMode;
|
||||
int hHotPixelCorrectLevel;
|
||||
int hBinning;
|
||||
int hSubarrayHPos;
|
||||
int hSubarrayHSize;
|
||||
int hSubarrayVPos;
|
||||
int hSubarrayVSize;
|
||||
int hSubarrayMode;
|
||||
int hIntensityLutMode;
|
||||
int hIntensityLutPage;
|
||||
int hExtractionMode;
|
||||
int hTimingReadoutTime;
|
||||
int hTimingCyclicTriggerPeriod;
|
||||
int hTimingMinTriggerBlanking;
|
||||
int hTimingMinTriggerInterval;
|
||||
int hTimingGlobalExposureDelay;
|
||||
int hTimingExposure;
|
||||
int hTimingInvalidExposurePeriod;
|
||||
int hInternalFrameRate;
|
||||
int hInternalFrameInterval;
|
||||
int hInternalLineSpeed;
|
||||
int hInternalLineInterval;
|
||||
int hImageWidth;
|
||||
int hImageHeight;
|
||||
int hImageRowbytes;
|
||||
int hImageFramebytes;
|
||||
int hImageTopOffsetBytes;
|
||||
int hImagePixelType;
|
||||
int hBufferRowbytes;
|
||||
int hBufferFramebytes;
|
||||
int hBufferTopOffsetBytes;
|
||||
int hBufferPixelType;
|
||||
int hRecordFixedBytesPerFile;
|
||||
int hRecordFixedBytesPerSession;
|
||||
int hRecordFixedBytesPerFrame;
|
||||
int hNrOutputTriggerConnectors;
|
||||
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 hOutTriggerPreHsyncCount;
|
||||
int hMasterPulseMode;
|
||||
int hMasterPulseTriggerSource;
|
||||
int hMasterPulseInterval;
|
||||
int hMasterPulseBurstTimes;
|
||||
int hSystemAlive;
|
||||
int hConversionFactorCoeff;
|
||||
int hConversionFactorOffset;
|
||||
int hNumberOfView;
|
||||
int hImageDetectorPixelWidth;
|
||||
int hImageDetectorPixelHeight;
|
||||
int hImageDetectorPixelNumHorz;
|
||||
int hImageDetectorPixelNumVert;
|
||||
int hTimeStampProducer;
|
||||
int hFrameStampProducer;
|
||||
#define LAST_HAMA_PARAM hFrameStampProducer
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
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;
|
||||
int stopThread;
|
||||
|
||||
epicsEventId startAcquireEventId_;
|
||||
epicsEventId stopAcquireEventId_;
|
||||
|
||||
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);
|
||||
asynStatus imageTransferStatus(HDCAM hdcam, DCAMCAP_TRANSFERINFO &captransferinfo);
|
||||
|
||||
|
||||
// wrapper functions for dcamapi
|
||||
int allocateBuffers(unsigned int);
|
||||
int freeBuffers();
|
||||
|
||||
int connectCamera();
|
||||
int disconnectCamera();
|
||||
|
||||
// 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 setParameter(int paramIndex);
|
||||
int getParameter(int paramIndex);
|
||||
int getParameterStr(int paramIndex);
|
||||
int getProperties();
|
||||
int setFeature(int featureIndex, double value);
|
||||
};
|
||||
|
||||
#endif
|
||||
157
ADOrca.Makefile
Normal file
157
ADOrca.Makefile
Normal file
@@ -0,0 +1,157 @@
|
||||
#
|
||||
# Copyright (c) 2019 - 2022, European Spallation Source ERIC
|
||||
#
|
||||
# The program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the BSD 3-Clause license.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# Author : Tomasz Brys
|
||||
# email : tomasz.brys@ess.eu
|
||||
# Date : 2022-03-16
|
||||
# version : 0.0.0
|
||||
#
|
||||
# This template file is based on one generated by e3TemplateGenerator.bash.
|
||||
# Please look at many other module_name.Makefile in the https://gitlab.esss.lu.se/epics-modules/
|
||||
# repositories.
|
||||
#
|
||||
|
||||
## The following lines are mandatory, please don't change them.
|
||||
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
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 += busy
|
||||
REQUIRED += seq
|
||||
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# If you want to exclude any architectures:
|
||||
#
|
||||
############################################################################
|
||||
|
||||
EXCLUDE_ARCHS += linux-ppc64e6500
|
||||
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Relevant directories to point to files
|
||||
#
|
||||
############################################################################
|
||||
|
||||
APP := ADOrcaApp
|
||||
APPDB := $(APP)/Db
|
||||
APPSRC := $(APP)/src
|
||||
APPCMDS := $(APP)/cmds
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# Add any files that should be copied to $(module)/Db
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# TEMPLATES += $(wildcard $(APPDB)/*.db)
|
||||
TEMPLATES += $(wildcard $(ADCORE_DIR)/*.db)
|
||||
|
||||
# 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 += -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 += support/dcamsdk4/misc/common.cpp
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# 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)
|
||||
|
||||
|
||||
############################################################################
|
||||
#
|
||||
# If you have any .substitution files, and template files, add them here.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# SUBS=$(wildcard $(APPDB)/*.substitutions)
|
||||
TMPS=$(wildcard $(APPDB)/*.template)
|
||||
|
||||
USR_DBFLAGS += -I . -I ..
|
||||
USR_DBFLAGS += -I $(E3_ADCORE_LOCATION)/db
|
||||
USR_DBFLAGS += -I $(EPICS_BASE)/db
|
||||
USR_DBFLAGS += -I $(APPDB)
|
||||
|
||||
USR_LDFLAGS += -L$(PWD)/support/dcamsdk4/lib/linux-x86_64 -ldcamapi
|
||||
#USR_LDFLAGS += -L/usr/local/lib -ldcamapi
|
||||
|
||||
db: $(SUBS) $(TMPS)
|
||||
|
||||
$(SUBS):
|
||||
@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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/* ADHamaMain.cpp */
|
||||
/* ADOrcaMain.cpp */
|
||||
/* Author: Tomasz Brys */
|
||||
/* Date: 2022-03-16 */
|
||||
|
||||
2293
ADOrcaApp/src/orca.cpp
Normal file
2293
ADOrcaApp/src/orca.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1
ADOrcaApp/src/orca.dbd
Normal file
1
ADOrcaApp/src/orca.dbd
Normal file
@@ -0,0 +1 @@
|
||||
registrar("orcaRegister")
|
||||
322
ADOrcaApp/src/orca.h
Normal file
322
ADOrcaApp/src/orca.h
Normal file
@@ -0,0 +1,322 @@
|
||||
#ifndef DRV_HAMA_H
|
||||
#define DRV_HAMA_H
|
||||
|
||||
|
||||
#include "ADDriver.h"
|
||||
#include "dcamapi4.h"
|
||||
|
||||
#define MAX_FEATURE_NAME_LEN 64
|
||||
|
||||
#define MAX_H_SENSOR_SIZE 2048
|
||||
#define MAX_V_SENSOR_SIZE 2048
|
||||
|
||||
#define hFrameRateString "H_FRAMERATE"
|
||||
#define hOrcaNameString "H_HAMA_NAME" /* asynOctet ro */
|
||||
#define hVendorString "H_VENDOR" /* asynOctet ro */
|
||||
#define hModelString "H_MODEL" /* asynOctet ro */
|
||||
#define hCameraIDString "H_CAMERAID" /* asynOctet ro */
|
||||
#define hBusString "H_BUS" /* asynOctet ro */
|
||||
#define hCameraVersionString "H_CAMERA_VERSION" /* asynOctet ro */
|
||||
#define hDriverVersionString "H_DRIVER_VERSION" /* asynOctet ro */
|
||||
#define hModuleVersionString "H_MODULE_VERSION" /* asynOctet ro */
|
||||
#define hDcamApiVersionString "H_DCAM_API_VERSION" /* asynOctet ro */
|
||||
|
||||
// Sensor mode and speed
|
||||
#define hSensorModeString "H_SENSOR_MODE" /* asynint32 rw */
|
||||
#define hReadoutSpeedString "H_READOUT_SPEED" /* asynInt32 rw */
|
||||
#define hReadoutDirectionString "H_READOUT_DIRECTION" /* asynIekt32 rw */
|
||||
|
||||
// Trigger
|
||||
#define hTriggerSourceString "H_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||
#define hTriggerModeString "H_TRIGGER_MODE" /* asynInt32 rw */
|
||||
#define hTriggerActiveString "H_TRIGGER_ACTIVE" /* asynInt32 rw */
|
||||
#define hTriggerGlobalExposureString "H_TRIGGER_GLOBAL_EXPOSURE" /* asynInt32 rw */
|
||||
#define hTriggerPolarityString "H_TRIGGER_POLARITY" /* asynInt32 rw */
|
||||
#define hTriggerConnectorString "H_TRIGGER_CONNECTOR" /* asynInt32 rw */
|
||||
#define hTriggerTimesString "H_TRIGGER_TIMES" /* asynInt32 rw */
|
||||
#define hTriggerDelayString "H_TRIGGER_DELAY" /* asynFloat64 rw */
|
||||
#define hInternalTriggerHandlingString "H_INTERNAL_TRIGGER_HANDLING" /* asynInt32 rw */
|
||||
|
||||
// Sensor cooler
|
||||
#define hSensorTemperatureString "H_SENSOR_TEMPERATURE" /* asynFloat64 ro */
|
||||
#define hSensorCoolerString "H_SENSOR_COOLER" /* asynInt32 rw */
|
||||
#define hSensorCoolerStatusString "H_SENSOR_COOLER_STATUS" /* asynInt32 ro */
|
||||
|
||||
// Binning and ROI
|
||||
#define hBinningString "H_BINNING" /* asynInt32 rw */
|
||||
#define hSubarrayHPosString "H_SUBARRAY_HPOST" /* asynInt32 rw */
|
||||
#define hSubarrayHSizeString "H_SUBARRAY_HSIZE" /* asynInt32 rw */
|
||||
#define hSubarrayVPosString "H_SUBARRAY_VPOS" /* asynInt32 rw */
|
||||
#define hSubarrayVSizeString "H_SUBARRAY_VSIZE" /* asynInt32 rw */
|
||||
#define hSubarrayModeString "H_SUBARRAY_MODE" /* asynInt32 rw */
|
||||
// #define hFrameBundleMode (usb3 only not implemented)
|
||||
// #define hFrameBundleNumber (usb3 only not implemented)
|
||||
|
||||
// ALU
|
||||
#define hDefectCorrectModeString "H_DEFECTCORRECT_MODE" /* asynInt32 rw */
|
||||
#define hHotPixelCorrectLevelString "H_HOT_PIXEL_CORRECT_LEVEL" /* asynInt32 rw */
|
||||
#define hIntensityLutModeString "H_INTENSITY_LUT_MODE" /* asynInt32 rw */
|
||||
#define hIntensityLutPageString "H_INTENSITY_LUT_PAGE" /* asynInt32 ro */
|
||||
#define hExtractionModeString "H_EXTRACTION_MODE" /* asynInt32 ro */
|
||||
|
||||
// output trigger
|
||||
#define hNumberOfOutputTriggerConnectorString "H_NUMBEROF_OUTPUTTRIGGERCONNECTOR" /* asynInt32 ro */
|
||||
#define hOutputTriggerSource0String "H_OUTPUT_TRIGGER_SOURCE0" /* asynInt32 rw */
|
||||
#define hOutputTriggerSource1String "H_OUTPUT_TRIGGER_SOURCE1" /* asynInt32 rw */
|
||||
#define hOutputTriggerSource2String "H_OUTPUT_TRIGGER_SOURCE2" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity0String "H_OUTPUT_TRIGGER_POLARITY0" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity1String "H_OUTPUT_TRIGGER_POLARITY1" /* asynInt32 rw */
|
||||
#define hOutputTriggerPolarity2String "H_OUTPUT_TRIGGER_POLARITY2" /* asynInt32 rw */
|
||||
#define hOutputTriggerActive0String "H_OUTPUT_TRIGGER_ACTIVE0" /* asynInt32 ro */
|
||||
#define hOutputTriggerActive1String "H_OUTPUT_TRIGGER_ACTIVE1" /* asynInt32 ro */
|
||||
#define hOutputTriggerActive2String "H_OUTPUT_TRIGGER_ACTIVE2" /* asynInt32 ro */
|
||||
#define hOutputTriggerDelay0String "H_OUTPUT_TRIGGER_DELAY0" /* asynFloat64 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
|
||||
#define hMasterPulseModeString "H_MASTERPULSE_MODE" /* asynInt32 rw */
|
||||
#define hMasterPulseTriggerSourceString "H_MASTERPULSE_TRIGGER_SOURCE" /* asynInt32 rw */
|
||||
#define hMasterPulseIntervalString "H_MASTERPULSE_INTERVAL" /* asynFloat64 rw */
|
||||
#define hMasterPulseBurstTimesString "H_MASTERPULSE_BURST_TIMES" /* asynInt32 rw */
|
||||
|
||||
// Synchronious Timing
|
||||
#define hTimingReadoutTimeString "H_TIMING_READOUT_TIME" /* asynFloat64 ro */
|
||||
#define hTimingCyclicTriggerPeriodString "H_TIMING_CYCLICTRIGGERPERIOD" /* asynFloat64 ro */
|
||||
#define hTimingMinTriggerBlankingString "H_TIMING_MIN_TRIGGER_BLANKING" /* asynFloat64 ro */
|
||||
#define hTimingMinTriggerIntervalString "H_TIMING_MIN_TRIGGER_INTERVAL" /* asynFloat64 ro */
|
||||
#define hTimingGlobalExposureDelayString "H_TIMING_GLOBAL_EXPOSURE_DELAY" /* asynFloat64 ro */
|
||||
#define hTimingExposureString "H_TIMING_EXPOSURE" /* asynInt32 ro */
|
||||
#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
|
||||
#define hColorTypeString "H_COLOR_TYPE" /* asynInt32 ro */
|
||||
#define hBitPerChannelString "H_BIT_PER_CHANNEL" /* asynInt32 rw */
|
||||
//#define hImageWidthString "H_IMAGE_WIDTH" /* asynInt32 ro */
|
||||
//#define hImageHeightString "H_IMAGE_HEIGHT" /* asynInt32 ro */
|
||||
#define hImageRowBytesString "H_IMAGE_ROWBYTES" /* asynInt32 ro */
|
||||
#define hImageFrameBytesString "H_IMAGE_FRAMEBYTES" /* asynInt32 ro */
|
||||
#define hImageTopOffsetBytesString "H_IMAGE_TOP_OFFSETBYTES" /* asynInt32 ro */
|
||||
#define hImagePixelTypeString "H_IMAGE_PIXEL_TYPE" /* asynInt32 rw */
|
||||
#define hBufferRowbytesString "H_BUFFER_ROWBYTES" /* asynInt32 ro */
|
||||
#define hBufferFramebytesString "H_BUFFER_FRAMEBYTES" /* asynInt32 ro */
|
||||
#define hBufferTopOffsetBytesString "H_BUFFER_TOP_OFFSETBYTES" /* asynInt32 ro */
|
||||
#define hBufferPixelTypeString "H_BUFFER_PIXEL_TYPE" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerFileString "H_RECORD_FIXED_BYTES_PER_FILE" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerSessionString "H_RECORD_FIXED_BYTES_PER_SESION" /* asynInt32 ro */
|
||||
#define hRecordFixedBytesPerFrameString "H_RECORD_FIXED_BYTES_PER_FRAME" /* asynInt32 ro */
|
||||
#define hSystemAliveString "H_SYSTEM_ALIVE" /* asynInt32 ro */
|
||||
#define hConversionFactorCoeffString "H_CONVERSIONFACTOR_COEFF" /* asynFloat64 ro */
|
||||
#define hConversionFactorOffsetString "H_CONVERSIONFACTOR_OFFSET" /* asynFloat64 ro */
|
||||
#define hNumberOfViewString "H_NUMBER_OF_VIEW" /* asynInt32 ro */
|
||||
#define hImageDetectorPixelWidthString "H_IMAGE_DETECTOR_PIXEL_WIDTH" /* asynFloat64 ro */
|
||||
#define hImageDetectorPixelHeightString "H_IMAGE_DETECTOR_PIXEL_HEIGHT" /* asynFloat64 ro */
|
||||
#define hImageDetectorPixelNumHorzString "H_IMAGE_DETECTOR_PIXEL_NUM_HORZ" /* asynInt32 ro */
|
||||
#define hImageDetectorPixelNumVertString "H_IMAGE_DETECTOR_PIXEL_NUM_VERT" /* asynInt32 ro */
|
||||
#define hTimeStampProducerString "H_TIMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||
#define hFrameStampProducerString "H_FRAMESTAMP_PRODUCER" /* asynInt32 ro */
|
||||
#define evrTimeStampString "EVR_TIMESTAMP"
|
||||
#define evrCountString "EVR_COUNTS"
|
||||
#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
|
||||
#define DETECTOR_PIXEL_NUM_HORZ 0x00420830
|
||||
#define DETECTOR_PIXEL_NUM_VERT 0x00420840
|
||||
|
||||
class epicsShareClass Orca : public ADDriver {
|
||||
|
||||
public:
|
||||
Orca(const char*, int, 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);
|
||||
|
||||
int readParameter(int propertyID, bool processPV = true);
|
||||
int readParameterStr(int paramIndex);
|
||||
|
||||
epicsUInt32 mTimeStampSec;
|
||||
epicsUInt32 mTimeStampNsec;
|
||||
|
||||
void imageTask();
|
||||
void temperatureTask();
|
||||
|
||||
protected:
|
||||
int hFrameRate;
|
||||
#define FIRST_HAMA_PARAM hFrameRate
|
||||
int hOrcaName;
|
||||
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
|
||||
|
||||
|
||||
private:
|
||||
|
||||
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;
|
||||
int stopThread;
|
||||
|
||||
epicsEventId startEvent_;
|
||||
|
||||
// Helper functions
|
||||
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);
|
||||
|
||||
// wrapper functions for dcamapi
|
||||
int allocateBuffers(unsigned int);
|
||||
int freeBuffers();
|
||||
|
||||
// These function will be read only once
|
||||
int connectCamera();
|
||||
int disconnectCamera();
|
||||
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
|
||||
@@ -15,15 +15,15 @@ conda create -n hama epics-base require tclx make compilers adcore busy
|
||||
|
||||
To activate env:
|
||||
|
||||
conda activate hama
|
||||
conda activate orca
|
||||
|
||||
git clone ...
|
||||
|
||||
cd git/ADHama
|
||||
cd git/ADOrca
|
||||
|
||||
compilation:
|
||||
|
||||
make -f ADHama.Makefile LIBVERSION=0.1 clean uninstall build db install
|
||||
make -f ADOrca.Makefile LIBVERSION=0.1 clean uninstall build db install
|
||||
|
||||
execution:
|
||||
|
||||
|
||||
55
cmds/st.cmd
55
cmds/st.cmd
@@ -1,26 +1,31 @@
|
||||
# This should be a test startup script
|
||||
require adhama
|
||||
require adorca
|
||||
require adpluginkafka
|
||||
|
||||
|
||||
epicsEnvSet("PREFIX", "Hama:")
|
||||
epicsEnvSet("PORT", "HAMA")
|
||||
epicsEnvSet("PREFIX", "Orca:")
|
||||
epicsEnvSet("PORT", "ORCA")
|
||||
epicsEnvSet("CAMERA", "0")
|
||||
epicsEnvSet("QSIZE", "21")
|
||||
epicsEnvSet("XSIZE", "10")
|
||||
epicsEnvSet("YSIZE", "10")
|
||||
epicsEnvSet("XSIZE", "2048")
|
||||
epicsEnvSet("YSIZE", "2048")
|
||||
epicsEnvSet("NCHANS", "2048")
|
||||
# Number of Elements
|
||||
epicsEnvSet("NELEMENTS", "4194304")
|
||||
epicsEnvSet("EPICS_CA_MAX_ARRAY_BYTES", "64000000")
|
||||
|
||||
# iocshLoad("$(adhama_DIR)ADHama.iocsh")
|
||||
#EVR settings
|
||||
#epicsEnvSet("EVR", "LabS-NIDO:Ctrl-EVR-01")
|
||||
epicsEnvSet("EVR", "Labs-ECDC:TS-EVR-11")
|
||||
epicsEnvSet("EVR_EVENT", "B")
|
||||
|
||||
devHamamatsuConfig("$(PORT)", $(CAMERA), 0, 0, 0, 0, 10)
|
||||
# iocshLoad("$(adorca_DIR)ADOrca.iocsh")
|
||||
|
||||
dbLoadRecords("$(adhama_DIR)db/hama.db","P=$(PREFIX),R=cam1:,PORT=$(PORT),ADDR=0,TIMEOUT=1")
|
||||
devOrcamatsuConfig("$(PORT)", $(CAMERA), 0, 0, 0, 0, 10)
|
||||
|
||||
asynSetTraceMask("$(PORT)",-1,0x9)
|
||||
asynSetTraceIOMask("$(PORT)",-1,0x2)
|
||||
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)
|
||||
#asynSetTraceIOMask("$(PORT)",-1,0x2)
|
||||
|
||||
|
||||
# =========================================================================================================
|
||||
@@ -32,15 +37,35 @@ 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)")
|
||||
#
|
||||
|
||||
# Create a standard arrays plugin, set it to get data from hama driver.
|
||||
# Create a standard arrays plugin, set it to get data from orca driver.
|
||||
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)")
|
||||
|
||||
startPVAServer
|
||||
# Create a kafka plugin, set it to get data from orca driver.
|
||||
#epicsEnvSet("KFK_TOPIC", "ymir_camera")
|
||||
epicsEnvSet("KFK_TOPIC", "nido_camera")
|
||||
|
||||
# Kafka plugin
|
||||
epicsEnvSet("KFK_CONFIG_FILE_PATH", "/home/iocuser/git/adhama/cmds/kafka.conf")
|
||||
|
||||
KafkaPluginConfigure("KFK1", 3, 1, "$(PORT)", 0, -1, "$(KFK_TOPIC)", "hama_kfk1","$(KFK_CONFIG_FILE_PATH)")
|
||||
dbLoadRecords("$(adpluginkafka_DIR)db/adpluginkafka.db", "P=$(PREFIX), R=Kfk1:, PORT=KFK1, ADDR=0, TIMEOUT=1, NDARRAY_PORT=$(PORT)")
|
||||
|
||||
startPVAServer
|
||||
iocInit()
|
||||
|
||||
dbpf Hama:cam1:PoolUsedMem.SCAN 0
|
||||
dbpf Hama:image1:EnableCallbacks 1
|
||||
dbpf Orca:cam1:PoolUsedMem.SCAN 0
|
||||
dbpf Orca:image1:EnableCallbacks 1
|
||||
dbpf Orca:Kfk1:EnableCallbacks 1
|
||||
|
||||
dbpf Orca:cam1:AcquireTime .001
|
||||
dbpf Orca:cam1:AcquirePeriod .02
|
||||
dbpf Orca:cam1:TriggerSource-S 1 # external
|
||||
dbpf Orca:cam1:NumImages 10
|
||||
dbpf Orca:cam1:ImageMode 1
|
||||
|
||||
#dbpf Orca:cam1:TriggerPolarity-S # 2-positive, 1-negative
|
||||
|
||||
epicsThreadSleep(1.0)
|
||||
|
||||
dbl > pv.list
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# This should be the included snippet to configure and run the deployed IOC. It should be loaded with
|
||||
#
|
||||
# iocshLoad("$(ADHama_DIR)/ADHama.iocsh")
|
||||
# iocshLoad("$(ADOrca_DIR)/ADOrca.iocsh")
|
||||
1
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so
Symbolic link
1
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so
Symbolic link
@@ -0,0 +1 @@
|
||||
libdcamapi.so.4.0.6269
|
||||
1
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so.4
Symbolic link
1
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so.4
Symbolic link
@@ -0,0 +1 @@
|
||||
libdcamapi.so.4.0.6269
|
||||
BIN
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so.4.0.6269
Executable file
BIN
support/dcamsdk4/lib/linux-x86_64/libdcamapi.so.4.0.6269
Executable file
Binary file not shown.
Reference in New Issue
Block a user