Commit 71b5c38b authored by ics's avatar ics

generic driver

parent a396116c
......@@ -7,7 +7,7 @@
#include <list>
#define _GNULINUX
#include <bgapi2_genicam/bgapi2_genicam.hpp>
#include </opt/baumer-gapi-sdk/include/bgapi2_genicam/bgapi2_genicam.hpp>
// structure which holds additional information
// transferred together with the camera buffer
......
#include "drivers/gigecam/genericam/CameraHandler.h"
#include "CameraHandler.h"
#include <iostream>
#include <sstream>
#include <limits>
//#include "pylon/Platform.h"
//#include "pylon/api_autoconf.h"
#include "drivers/gigecam/genericam/BufferInformation.h"
#include "drivers/gigecam/genericam/DoubleBufferHandler.h"
#include "BufferInformation.h"
#include "DoubleBufferHandler.h"
// this function initializes the Baumer GAPI SDK and
// searches for connected cameras
......
......@@ -6,8 +6,8 @@
#include <list>
#define _GNULINUX
#include </usr/local/src/baumer/inc/bgapi2_genicam/bgapi2_genicam.hpp>
#include "drivers/gigecam/photonics/DoubleBufferHandler.h"
#include </opt/baumer-gapi-sdk/include/bgapi2_genicam/bgapi2_genicam.hpp>
#include "DoubleBufferHandler.h"
// the class represents a BGAPI camera object and additional camera specific information
class CCameraControl {
......
#include "drivers/gigecam/genericam/DoubleBufferHandler.h"
#include "DoubleBufferHandler.h"
#include <iostream>
#include <sstream>
#include "drivers/gigecam/genericam/BufferInformation.h"
#include "BufferInformation.h"
CDoubleBufferHandler::CDoubleBufferHandler()
: buffer_read_(nullptr)
......
......@@ -6,7 +6,7 @@
#include <list>
#define _GNULINUX
#include </usr/local/src/baumer/inc/bgapi2_genicam/bgapi2_genicam.hpp>
#include </opt/baumer-gapi-sdk/include/bgapi2_genicam/bgapi2_genicam.hpp>
class CDoubleBufferHandler{
public:
......
......@@ -22,7 +22,7 @@
#include <common/base/PropertyType.h>
namespace genericam {
namespace genericcam {
static const std::string MILLISEC = "Millisec";
......
......@@ -16,21 +16,21 @@
* limitations under the Licence.
*/
#include "drivers/gigecam/genericam/GenericCamDriver.h"
#include "GenericCamDriver.h"
#include <math.h>
#include "drivers/gigecam/genericam/PerfectGenericCamDriver.h"
#include "drivers/gigecam/genericam/GenericCamDef.h"
#include "drivers/gigecam/genericam/GenericCamState.h"
#include "drivers/gigecam/genericam/RealGenericCamDriver.h"
#include "drivers/gigecam/genericam/SimulatedGenericCamDriver.h"
#include "PerfectGenericCamDriver.h"
#include "GenericCamDef.h"
#include "GenericCamState.h"
#include "RealGenericCamDriver.h"
#include "SimulatedGenericCamDriver.h"
using namespace std;
namespace genericam {
namespace genericcam {
const std::string GenericCamDriver::TYPE = "genericam";
const std::string GenericCamDriver::TYPE = "genericcam";
const std::string GenericCamDriver:: MODE[4] = {"Standard", "Average","Summation","Accumulation"};
/*
......
......@@ -31,7 +31,7 @@
#include "drivers/legacy/def/DriverErrorDef.h"
//#include "/usr/local/src/baumer/inc/"
namespace genericam {
namespace genericcam {
/**
* Global Implementation of the vme card called Psl made in Ill. It needs a board called Men A201.
......
......@@ -20,11 +20,11 @@
#define GENERICCAMSTATE_H
#include <Driver.h>
#include "drivers/gigecam/genericam/GenericCamDriver.h"
#include "GenericCamDriver.h"
namespace genericam {
namespace genericcam {
/*!
* \class GenericCamState
......
<module name="genericam">
<driver class="genericam::GenericCamDriver"/>
<link path="/usr/local/lib/baumer" lib="bgapi2_genicam"/>
<module name="genericcam">
<driver class="genericcam::GenericCamDriver"/>
<link path="/opt/baumer-gapi-sdk/lib" lib="bgapi2_genicam"/>
<link lib="opencv_core"/>
<link lib="opencv_calib3d"/>
<link lib="opencv_highgui"/>
<include path="/usr/local/src/baumer/inc"/>
<include path="/opt/baumer-gapi-sdk/include/bgapi2_genicam"/>
<include path="$(NOMAD_HOME)/../NomadModules/src"/>
</module>
......@@ -16,14 +16,14 @@
* limitations under the Licence.
*/
#include "drivers/gigecam/genericam/PerfectGenericCamDriver.h"
#include "PerfectGenericCamDriver.h"
#include <stdlib.h>
#include "drivers/gigecam/genericam/GenericCamDef.h"
#include "drivers/gigecam/genericam/GenericCamDriver.h"
#include "GenericCamDef.h"
#include "GenericCamDriver.h"
namespace genericam {
namespace genericcam {
/*
* Constructor
......@@ -137,7 +137,7 @@ void PerfectGenericCamDriver::stop() {
void PerfectGenericCamDriver::readStatus() {
owner()->startActivated = false;
// Status command
owner()->computeGateStatus(genericam::READOUT_COMPLETE);
owner()->computeGateStatus(genericcam::READOUT_COMPLETE);
owner()->computeAcquisitionStatus(0);
owner()->computeDetectorStatus(0);
if (owner()->m_SynchroniseReadActivated == true) {
......
......@@ -19,9 +19,9 @@
#ifndef PERFECTGENERICCAMDRIVER_H
#define PERFECTGENERICCAMDRIVER_H
#include "drivers/gigecam/genericam/GenericCamState.h"
#include "GenericCamState.h"
namespace genericam {
namespace genericcam {
/*!
* \class PerfectGenericCamDriver
......
......@@ -16,7 +16,7 @@
* limitations under the Licence.
*/
#include "drivers/gigecam/genericam/RealGenericCamDriver.h"
#include "RealGenericCamDriver.h"
// Namespace for using pylon objects.
......@@ -24,8 +24,8 @@
#include "CImg.h"
#include "drivers/gigecam/genericam/GenericCamDef.h"
#include "drivers/gigecam/genericam/GenericCamDriver.h"
#include "GenericCamDef.h"
#include "GenericCamDriver.h"
using namespace cimg_library;
// Setting for using Basler GigE cameras.
......@@ -35,7 +35,7 @@ using namespace std;
/// \namespace genericam
/// \brief camera namespace
///
namespace genericam {
namespace genericcam {
/*
* Constructor
......@@ -363,6 +363,12 @@ void RealGenericCamDriver::synchroniseRead() {
data[j] = buf[j];
sum += (float64) data[j];
}
cout <<" owner()->data.sendEvent()"<< endl;
cout <<" +"<< endl;
cout <<" +"<< endl;
cout <<"+"<< endl;
cout <<" +"<< endl;
cout <<" +"<< endl;
owner()->data.sendEvent();
owner()->m_SynchroniseReadTerminated = true;
......@@ -382,7 +388,7 @@ void RealGenericCamDriver::start() {
// Set exposure time
float64 exposure_time = owner()->time.setpoint() * 1000.;
uint32 exposure_gain = owner()->gain();
// owner()->startActivated=true;
StartFeatureCommandExposure(&m_camera_handler, exposure_time,exposure_gain);
std::cout << "Exposure time successfully written to cameras" << std::endl;
// owner()->nbFrame();
......
......@@ -24,14 +24,14 @@
#include "Utilities/Counter.h"
#include </usr/local/src/baumer/inc/bgapi2_genicam/bgapi2_genicam.hpp>
#include "drivers/gigecam/genericam/BufferInformation.h"
#include "drivers/gigecam/genericam/CameraHandler.h"
#include "drivers/gigecam/genericam/DoubleBufferHandler.h"
#include "drivers/gigecam/genericam/GenericCamDef.h"
#include "drivers/gigecam/genericam/GenericCamState.h"
namespace genericam {
#include </opt/baumer-gapi-sdk/include/bgapi2_genicam/bgapi2_genicam.hpp>
#include "BufferInformation.h"
#include "CameraHandler.h"
#include "DoubleBufferHandler.h"
#include "GenericCamDef.h"
#include "GenericCamState.h"
namespace genericcam {
/*!
* \class RealGenericCamDriver
......
......@@ -16,14 +16,14 @@
* limitations under the Licence.
*/
#include "drivers/gigecam/genericam/SimulatedGenericCamDriver.h"
#include "SimulatedGenericCamDriver.h"
#include <stdlib.h>
#include "tiffio.h"
#include "drivers/gigecam/genericam/GenericCamDef.h"
#include "drivers/gigecam/genericam/GenericCamDriver.h"
#include "GenericCamDef.h"
#include "GenericCamDriver.h"
namespace genericam {
namespace genericcam {
/*
* Constructor
......@@ -155,7 +155,7 @@ void SimulatedGenericCamDriver::stop() {
void SimulatedGenericCamDriver::readStatus() {
owner()->startActivated = false;
// Status command
owner()->computeGateStatus(genericam::READOUT_COMPLETE);
owner()->computeGateStatus(genericcam::READOUT_COMPLETE);
owner()->computeAcquisitionStatus(0);
owner()->computeDetectorStatus(0);
if (owner()->m_SynchroniseReadActivated == true) {
......
......@@ -19,9 +19,9 @@
#ifndef SIMULATEDGENERICCAMDRIVER_H
#define SIMULATEDGENERICCAMDRIVER_H
#include "drivers/gigecam/genericam/GenericCamState.h"
#include "GenericCamState.h"
namespace genericam {
namespace genericcam {
/*!
* \class SimulatedGenericCamDriver
......
photonics.setup=Setup
photonics.actual=Actual
photonics.divisors=Divisors
photonics.wanted_time=Time
photonics.actual_time=Time
photonics.mode=Master
photonics.modeTimeCheckedValue=1
photonics.modeTimeUncheckedValue=0
photonics.bindPrefix=Binning
photonics.nbFramePrefix=NB Frame
photonics.timeoutPrefix=Time Out
photonics.bPixelPrefix=BitPixel
# Mode combo
photonics.2048Label=2048*2048
photonics.2048Value=1
photonics.1024Label=1024*1024
photonics.1024Value=2
photonics.512Label=512*512
photonics.512Value=4
photonics.hsspeedPrefix=HSSpeed
# Mode combo
photonics.5mLabel=5MHz
photonics.5mValue=0
photonics.3mLabel=3MHz
photonics.3mValue=1
photonics.1mLabel=1MHz
photonics.1mValue=2
photonics.005mLabel=0.05MHz
photonics.005mValue=3
photonics.gainPrefix=Pre-Amp Gain
# Mode combo
photonics.x1Label=X1
photonics.x1Value=0
photonics.x2Label=X2
photonics.x2Value=1
photonics.x4Label=X4
photonics.x4Value=2
#Labels Commands
photonics.on=ON
photonics.off=OFF
photonics.cooler=Cooler
photonics.readoutPrefix=Read Out
# Mode combo
photonics.fvbLabel=FVB
photonics.fvbValue=0
photonics.mtrackLabel=MTrack
photonics.mtrackValue=1
photonics.rtrackLabel=RTrack
photonics.rtrackValue=2
photonics.strackLabel=STrack
photonics.strackValue=3
photonics.imageLabel=Image
photonics.imageValue=4
photonics.shutter=Shutter
photonics.shutmode=Mode
photonics.shutopentime=Open Time
photonics.shutclosetime=Close Time
# Mode combo
photonics.FALabel=Auto
photonics.FAValue=0
photonics.POLabel=Open
photonics.POValue=1
photonics.PCLabel=Close
photonics.PCValue=2
photonics.bclamp=Baseline Clamp
# Mode combo
photonics.enableLabel=Enable
photonics.enableValue=1
photonics.disableLabel=Disable
photonics.disableValue=0
photonics.wanted_temperature=Wanted Temp
photonics.actual_temperature=Actual Temp
photonics.modeMonitor1CheckedValue=2
photonics.modeMonitor1UncheckedValue=0
photonics.writeParamButton=Write Param.
photonics.initButton=Init Camera.
photonics.wanted_monitor2=Monitor2
photonics.actual_monitor2=Monitor2
photonics.modeMonitor2CheckedValue=4
photonics.modeMonitor2UncheckedValue=0
photonics.wanted_detector=Detector
photonics.actual_detector=Detector
photonics.modeDetectorCheckedValue=8
photonics.modeDetectorUncheckedValue=0
photonics.inhibit_time=Inhibit
#status
photonics.status=Status
startstop.extinhibitValue=4
startstop.nomasterValue=8
startstop.waitforstartValue=16
startstop.runningValue=32
startstop.endValue=64
startstop.pauseValue=128
startstop.extinhibitLabel=External Inhibit
startstop.nomasterLabel=No Master Counter
startstop.waitforstartLabel=Wait for start
startstop.runningLabel=Count running
startstop.endLabel=End count
startstop.pauseLabel=Pause
startstop.extinhibitImage=WARNING_STATUS
startstop.nomasterImage=ALARM_STATUS
startstop.waitforstartImage=WARNING_STATUS
startstop.runningImage=RUNNING_STATUS
startstop.endImage=FINISHED_STATUS
startstop.pauseImage=WARNING_STATUS
photonics.version=Version
photonics.precision=Frequency
photonics.filenamePrefix=Tif File
photonics.index_simuPrefix=Image index
\ No newline at end of file
<plugin>
<controller type="photonics" role="photonics1" />
<property_switcher role="photonics1" property="state" switcher_key="photonics.stateSwitchKey" />
<label role="photonics1" property="version" prefix="photonics.version" />
<newLine />
<group title="photonics.setup">
<text role="photonics1" property="gate_wanted_time" prefix="photonics.wanted_time" hAlignment="right" />
<text role="photonics1" property="camtimeout" prefix="photonics.timeoutPrefix" hAlignment="right" />
<newLine />
<table_composite nbColumns="3">
<text role="photonics1" property="bpixel" prefix="photonics.bPixelPrefix" hAlignment="right" />
<text role="photonics1" property="gain" prefix="photonics.gainPrefix" hAlignment="right" />
<text role="photonics1" property="nbFrame" prefix="photonics.nbFramePrefix" hAlignment="right" />
</table_composite>
<newLine />
<button role="photonics1" command="writeParam" prefix="photonics.writeParamButton" />
<button role="photonics1" command="init" prefix="photonics.initButton" />
</group>
<newLine />
<switchable_composite switch_values="simulated" switcher_key="photonics.stateSwitchKey">
<file_text role="photonics1" property="file_simu" prefix="photonics.filenamePrefix" extensions="tif"/>
<text role="photonics1" property="index_simu" prefix="photonics.index_simuPrefix" />
</switchable_composite>
</plugin>
genericcam.setup=Setup
genericcam.actual=Actual
genericcam.divisors=Divisors
genericcam.wanted_time=Time
genericcam.actual_time=Time
genericcam.mode=Master
genericcam.modeTimeCheckedValue=1
genericcam.modeTimeUncheckedValue=0
genericcam.bindPrefix=Binning
genericcam.nbFramePrefix=NB Frame
genericcam.timeoutPrefix=Time Out
genericcam.bPixelPrefix=BitPixel
# Mode combo
genericcam.2048Label=2048*2048
genericcam.2048Value=1
genericcam.1024Label=1024*1024
genericcam.1024Value=2
genericcam.512Label=512*512
genericcam.512Value=4
genericcam.hsspeedPrefix=HSSpeed
# Mode combo
genericcam.5mLabel=5MHz
genericcam.5mValue=0
genericcam.3mLabel=3MHz
genericcam.3mValue=1
genericcam.1mLabel=1MHz
genericcam.1mValue=2
genericcam.005mLabel=0.05MHz
genericcam.005mValue=3
genericcam.gainPrefix=Pre-Amp Gain
# Mode combo
genericcam.x1Label=X1
genericcam.x1Value=0
genericcam.x2Label=X2
genericcam.x2Value=1
genericcam.x4Label=X4
genericcam.x4Value=2
#Labels Commands
genericcam.on=ON
genericcam.off=OFF
genericcam.cooler=Cooler
genericcam.readoutPrefix=Read Out
# Mode combo
genericcam.fvbLabel=FVB
genericcam.fvbValue=0
genericcam.mtrackLabel=MTrack
genericcam.mtrackValue=1
genericcam.rtrackLabel=RTrack
genericcam.rtrackValue=2
genericcam.strackLabel=STrack
genericcam.strackValue=3
genericcam.imageLabel=Image
genericcam.imageValue=4
genericcam.shutter=Shutter
genericcam.shutmode=Mode
genericcam.shutopentime=Open Time
genericcam.shutclosetime=Close Time
# Mode combo
genericcam.FALabel=Auto
genericcam.FAValue=0
genericcam.POLabel=Open
genericcam.POValue=1
genericcam.PCLabel=Close
genericcam.PCValue=2
genericcam.bclamp=Baseline Clamp
# Mode combo
genericcam.enableLabel=Enable
genericcam.enableValue=1
genericcam.disableLabel=Disable
genericcam.disableValue=0
genericcam.wanted_temperature=Wanted Temp
genericcam.actual_temperature=Actual Temp
genericcam.modeMonitor1CheckedValue=2
genericcam.modeMonitor1UncheckedValue=0
genericcam.writeParamButton=Write Param.
genericcam.initButton=Init Camera.
genericcam.wanted_monitor2=Monitor2
genericcam.actual_monitor2=Monitor2
genericcam.modeMonitor2CheckedValue=4
genericcam.modeMonitor2UncheckedValue=0
genericcam.wanted_detector=Detector
genericcam.actual_detector=Detector
genericcam.modeDetectorCheckedValue=8
genericcam.modeDetectorUncheckedValue=0
genericcam.inhibit_time=Inhibit
#status
genericcam.status=Status
startstop.extinhibitValue=4
startstop.nomasterValue=8
startstop.waitforstartValue=16
startstop.runningValue=32
startstop.endValue=64
startstop.pauseValue=128
startstop.extinhibitLabel=External Inhibit
startstop.nomasterLabel=No Master Counter
startstop.waitforstartLabel=Wait for start
startstop.runningLabel=Count running
startstop.endLabel=End count
startstop.pauseLabel=Pause
startstop.extinhibitImage=WARNING_STATUS
startstop.nomasterImage=ALARM_STATUS
startstop.waitforstartImage=WARNING_STATUS
startstop.runningImage=RUNNING_STATUS
startstop.endImage=FINISHED_STATUS
startstop.pauseImage=WARNING_STATUS
genericcam.version=Version
genericcam.precision=Frequency
genericcam.filenamePrefix=Tif File
genericcam.index_simuPrefix=Image index
\ No newline at end of file
<controller_plugin_config type="photonics">
<controller_plugin_config type="genericcam">
<image key="HARDWARE_MMODULE"/>
<settings view="photonicsView.xml"/>
<settings view="genericcamView.xml"/>
</controller_plugin_config>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="photonics">
<controller type="genericcam">
<property name="gate_wanted_time" type="float64" max_length="8">
</property>
......
<plugin>
<controller type="genericcam" role="genericcam1" />
<property_switcher role="genericcam1" property="state" switcher_key="genericcam.stateSwitchKey" />
<label role="genericcam1" property="version" prefix="genericcam.version" />
<newLine />
<group title="genericcam.setup">
<text role="genericcam1" property="gate_wanted_time" prefix="genericcam.wanted_time" hAlignment="right" />
<text role="genericcam1" property="camtimeout" prefix="genericcam.timeoutPrefix" hAlignment="right" />
<newLine />
<table_composite nbColumns="3">
<text role="genericcam1" property="bpixel" prefix="genericcam.bPixelPrefix" hAlignment="right" />
<text role="genericcam1" property="gain" prefix="genericcam.gainPrefix" hAlignment="right" />
<text role="genericcam1" property="nbFrame" prefix="genericcam.nbFramePrefix" hAlignment="right" />
</table_composite>
<newLine />
<button role="genericcam1" command="writeParam" prefix="genericcam.writeParamButton" />
<button role="genericcam1" command="init" prefix="genericcam.initButton" />
</group>
<newLine />
<switchable_composite switch_values="simulated" switcher_key="genericcam.stateSwitchKey">
<file_text role="genericcam1" property="file_simu" prefix="genericcam.filenamePrefix" extensions="tif"/>
<text role="genericcam1" property="index_simu" prefix="genericcam.index_simuPrefix" />
</switchable_composite>
</plugin>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment