DABC (Data Acquisition Backbone Core)  2.9.9
Player.h
Go to the documentation of this file.
1 // $Id: Player.h 3862 2018-05-11 10:06:18Z 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 GOSIP_Player
17 #define GOSIP_Player
18 
19 #ifndef DABC_ModuleAsync
20 #include "dabc/ModuleAsync.h"
21 #endif
22 
23 #ifndef DABC_Hierarchy
24 #include "dabc/Hierarchy.h"
25 #endif
26 
27 namespace gosip {
28 
35  class Player : public dabc::ModuleAsync {
36  protected:
37  virtual void BeforeModuleStart() {}
38 
39  virtual void AfterModuleStop() {}
40 
41  public:
42 
43  Player(const std::string &name, dabc::Command cmd = nullptr);
44  virtual ~Player();
45 
46  virtual void ModuleCleanup() {}
47 
48  virtual void ProcessTimerEvent(unsigned timer);
49 
50  virtual int ExecuteCommand(dabc::Command cmd);
51  };
52 }
53 
54 
55 #endif
Represents command with its arguments.
Definition: Command.h:99
Base class for user-derived code, implementing event-processing.
Definition: ModuleAsync.h:32
Player of GOSIP data.
Definition: Player.h:35
Player(const std::string &name, dabc::Command cmd=nullptr)
Definition: Player.cxx:22
virtual void ProcessTimerEvent(unsigned timer)
Method called by framework when timer event is produced.
Definition: Player.cxx:45
virtual void BeforeModuleStart()
Definition: Player.h:37
virtual void AfterModuleStop()
Definition: Player.h:39
virtual void ModuleCleanup()
Method, which can be reimplemented by user and should cleanup all references on buffers and other obj...
Definition: Player.h:46
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
Definition: Player.cxx:52
virtual ~Player()
Definition: Player.cxx:41
Support for GOSIP - communication protocol for different software kinds.
Definition: Factory.h:25