• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

plugin/roc/ReadoutModule.h (r4864/r2882)

Go to the documentation of this file.
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_READOUTMODULE_H
00016 #define ROC_READOUTMODULE_H
00017 
00018 #ifndef DABC_ModuleAsync
00019 #include "dabc/ModuleAsync.h"
00020 #endif
00021 
00022 namespace roc {
00023 
00024    class ReadoutModule : public dabc::ModuleAsync {
00025       protected:
00026          dabc::Condition fDataCond;
00027          dabc::Buffer   fCurrBuf; // this buffer accessed from user program without lock, means one cannot use it in module thread
00028          dabc::Buffer   fNextBuf; // this buffer provided by module to user, locked by fDataCond mutex
00029 
00030       public:
00031 
00032          ReadoutModule(const char* name, dabc::Command cmd = 0);
00033          virtual ~ReadoutModule();
00034 
00035          virtual void ProcessInputEvent(dabc::Port* port);
00036 
00037          virtual void ProcessOutputEvent(dabc::Port* port);
00038 
00039          virtual void AfterModuleStop();
00040 
00041          bool getNextBuffer(void* &buf, unsigned& len, double tmout = 1.);
00042    };
00043 }
00044 
00045 #endif

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1