DABC (Data Acquisition Backbone Core)  2.9.9
MultiplexerModule.h
Go to the documentation of this file.
1 // $Id: MultiplexerModule.h 4471 2020-04-15 13:19:26Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #ifndef DABC_MultiplexerModule
17 #define DABC_MultiplexerModule
18 
19 #ifndef DABC_ModuleAsync
20 #include "dabc/ModuleAsync.h"
21 #endif
22 
23 
24 namespace dabc {
25 
27 
39  protected:
41 
42  std::string fDataRateName;
43 
44  void CheckDataSending();
45 
46  public:
47  MultiplexerModule(const std::string &name, dabc::Command cmd = nullptr);
48 
49  virtual void ProcessInputEvent(unsigned port);
50  virtual void ProcessOutputEvent(unsigned port);
51  };
52 
53  // ====================================================================
54 
66 
67  public:
68  RepeaterModule(const std::string &name, dabc::Command cmd = nullptr);
69 
70  virtual bool ProcessRecv(unsigned port);
71  virtual bool ProcessSend(unsigned port);
72  };
73 
74 
75 }
76 
77 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Multiplexer module.
virtual void ProcessOutputEvent(unsigned port)
Method called by framework when output event is produced.
virtual void ProcessInputEvent(unsigned port)
Method called by framework when input event is produced.
MultiplexerModule(const std::string &name, dabc::Command cmd=nullptr)
Repeater module.
virtual bool ProcessSend(unsigned port)
Method called by framework when at least one buffer can be send to output port.
RepeaterModule(const std::string &name, dabc::Command cmd=nullptr)
virtual bool ProcessRecv(unsigned port)
Method called by framework when at least one buffer available in input port.
Event manipulation API.
Definition: api.h:23
Queue< unsigned, true > PortIdsQueue