00001 /******************************************************************** 00002 * The Data Acquisition Backbone Core (DABC) 00003 ******************************************************************** 00004 * Copyright (C) 2009- 00005 * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH 00006 * Planckstr. 1 00007 * 64291 Darmstadt 00008 * Germany 00009 * Contact: http://dabc.gsi.de 00010 ******************************************************************** 00011 * This software can be used under the GPL license agreements as stated 00012 * in LICENSE.txt file which is part of the distribution. 00013 ********************************************************************/ 00014 00015 #ifndef ROC_NXCALIBRMODULE_H 00016 #define ROC_NXCALIBRMODULE_H 00017 00018 #include "dabc/ModuleAsync.h" 00019 00020 #include "dabc/Device.h" 00021 00022 namespace roc { 00023 00024 class Board; 00025 00026 class NxCalibrModule : public dabc::ModuleAsync { 00027 00028 public: 00029 00030 NxCalibrModule(const char* name, dabc::Command cmd = 0, roc::Board* brd = 0); 00031 virtual ~NxCalibrModule(); 00032 00033 virtual void ProcessTimerEvent(dabc::Timer* timer); 00034 00035 virtual int ExecuteCommand(dabc::Command cmd); 00036 00037 int switchCalibration(bool on); 00038 00039 protected: 00040 00041 //dabc::Device* fDev; 00042 00043 roc::Board* fBrd; 00044 double fWorkPeriod; // time for normal working 00045 double fCalibrPeriod; // time for calibration 00046 int fLoopCounts; // number of calibration loops (-1 - infinite) 00047 int fState; // 0 - off, 1 - normal, 2 - calibr 00048 }; 00049 } 00050 00051 #endif