00001 #ifndef STROBEDELAYSCAN_H
00002 #define STROBEDELAYSCAN_H
00003
00004 #include "../ipc/Sct_CalibrationController.hh"
00005 #include "../CalibrationControllerImpl.h"
00006 #include "../SctApiAccessException.h"
00007 #include "Sct/LogicErrors.h"
00008
00009 #include <CommonWithDsp/ABCD/ABCDscans.h>
00010
00011 using namespace Sct;
00012 using namespace SctCalibrationController::Ipc;
00013 namespace SctCalibrationController {
00014 namespace Scripts {
00015
00016 class StrobeDelayScan : public ScanRequestImpl {
00017 public:
00018 static ScanRequestImpl& strobeDelayScan(unsigned long nTrigs) {
00019 static StrobeDelayScan request;
00020 Sct_SctApi_T_SctApi* api = CalibrationControllerImpl::instance().getApi();
00021 Sct_SctApi_T_Scan* s = 0;
00022 APIRETCALL(api, s, createScan(&st), "Failed to create scan")
00023 request.setScan(s);
00024
00025 APICALL(s, setNTrigs(&st, nTrigs), "Failed to set triggers")
00026
00027 Sct_SctApi_T_Trigger* t = 0;
00028 APIRETCALL(s, t, getTrigger1(&st), "Failed to get Trigger1")
00029
00030 APICALL(t, calL1A(&st, 0x82), "Failed to set trigger type")
00031
00032 APICALL(s, setOption(&st, Sct_SctApi_T_Scan_ScanOptions_loopCalLine, 1), "Failed to set loopCalLine")
00033
00034 APICALL(s, configure(&st, ST_STROBE_DELAY, 0, 63, 1), "Failed to set Scan information")
00035
00036 return request;
00037 }
00038
00039 private:
00040 StrobeDelayScan(){;}
00041 };
00042
00043 }
00044 }
00045
00046 #endif //STROBEDELAYSCAN_H