Commit dc99e1d2 authored by ahoms's avatar ahoms
Browse files

* First implementation of HwInterface and HwSyncCtrlObj


git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@4 45c4679d-1946-429d-baad-37912b19538b
parent 2b70d6cd
MAKE_CMD = $(MAKE) -C src
all:
$(MAKE_CMD) all
clean:
$(MAKE_CMD) clean
......@@ -15,11 +15,10 @@ public:
SerialLine, // Generic detector serial line
};
Type getType() const;
void *getCtrlObj() const;
HwCap(Type type, void *ctrl_obj);
Type getType() const;
void *getCtrlObj() const;
private:
Type m_type;
......
#ifndef HWINTERFACE_H
#define HWINTERFACE_H
#include "HwCap.h"
#include <vector>
namespace lima
{
class HwInterface
{
public:
typedef std::vector<HwCap> CapList;
enum AcqStatus {
AcqReady, AcqRunning, AcqFault,
};
enum DetStatus {
DetFault=0x1,
WaitForTrigger=0x2,
ShutterOpen=0x4,
Exposure=0x8,
ShutterClose=0x10,
ChargeShift=0x20,
Readout=0x40,
};
typedef struct Status {
AcqStatus acq;
DetStatus det;
DetStatus det_mask;
} StatusType;
enum ResetLevel {
SoftReset, HardReset,
};
HwInterface();
virtual ~HwInterface();
virtual const CapList& getCapList() const = 0;
virtual void reset(ResetLevel reset_level) = 0;
virtual void prepareAcq() = 0;
virtual void startAcq() = 0;
virtual void stopAcq() = 0;
virtual void getStatus(StatusType& status) = 0;
virtual unsigned long getAcqFrameNb() = 0;
};
} // namespace lima
#endif // HWINTERFACE_H
#ifndef HWSYNCCTRLOBJ_H
#define HWSYNCCTRLOBJ_H
namespace lima
{
class HwSyncCtrlObj
{
public:
enum TrigMode {
Internal,
ExtTrigSingle, ExtTrigMult,
ExtGate, ExtStartStop,
};
enum ShutMode {
Manual, AutoFrame, AutoSeq,
};
HwSyncCtrlObj();
virtual ~HwSyncCtrlObj();
virtual void setTrigMode(TrigMode trig_mode) = 0;
virtual void getTrigMode(TrigMode& trig_mode) = 0;
virtual void setExpTime(double exp_time) = 0;
virtual void getExpTime(double& exp_time) = 0;
virtual void setLatTime(double lat_time) = 0;
virtual void getLatTime(double& lat_time) = 0;
virtual void setShutMode(ShutMode shut_mode) = 0;
virtual void getShutMode(ShutMode& shut_mode) = 0;
virtual void setShutState(bool shut_open) = 0;
virtual void getShutState(bool& shut_open) = 0;
virtual void setShutOpenTime (double shut_open_time) = 0;
virtual void getShutOpenTime (double& shut_open_time) = 0;
virtual void setShutCloseTime(double shut_close_time) = 0;
virtual void getShutCloseTime(double& shut_close_time) = 0;
private:
};
} // namespace lima
#endif // HWSYNCCTRLOBJ_H
#include "HwInterface.h"
using namespace lima;
HwInterface::HwInterface()
{
}
HwInterface::~HwInterface()
{
}
#include "HwSyncCtrlObj.h"
using namespace lima;
HwSyncCtrlObj::HwSyncCtrlObj()
{
}
HwSyncCtrlObj::~HwSyncCtrlObj()
{
}
hw-objs := HwInterface.o HwCap.o HwSyncCtrlObj.o
CXXFLAGS += -I../include -I../../common/include -Wall
all: clean Hw.o
Hw.o: $(hw-objs)
ld -o $@ -r $+
clean:
rm -f Hw.o $(hw-objs)
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