CLAM-Development  1.4.0
OutControlSender.hxx
Go to the documentation of this file.
1 
2 #ifndef __OutControlSender_hxx__
3 #define __OutControlSender_hxx__
4 
5 #include "OutControl.hxx"
6 #include "Processing.hxx"
7 #include "ProcessingConfig.hxx"
8 #include "Enum.hxx"
9 
10 namespace CLAM
11 {
12 
14 {
15 public:
16 
18  {
19  public:
20 
22  static tValue sDefault;
25  EControlRepresentation(std::string s) : Enum(sEnumValues, s) {};
26 
27  typedef enum {
33  } tEnum;
34 
35  Component* Species() const
36  {
37  return new EControlRepresentation;
38  };
39 
40  };
41 
42  class EMapping : public Enum
43  {
44  public:
45 
47  static tValue sDefault;
50  EMapping(std::string s) : Enum(sEnumValues, s) {};
51 
52  typedef enum {
55  eLog,
57  } tEnum;
58 
59  Component* Species() const
60  {
61  return new EMapping;
62  };
63 
64  };
65 
67  DYN_ATTRIBUTE (0, public, TControlData, Min );
68  DYN_ATTRIBUTE (1, public, TControlData, Default );
69  DYN_ATTRIBUTE (2, public, TControlData, Max );
70  DYN_ATTRIBUTE (3, public, TControlData, Step );
71  DYN_ATTRIBUTE (4, public, EControlRepresentation, ControlRepresentation );
72  DYN_ATTRIBUTE (5, public, EMapping, Mapping );
73 
74 
75 protected:
76  void DefaultInit(void);
77 };
78 
80 {
81  OutControlSenderConfig mConfig;
82  FloatOutControl mOutput;
83  TControlData mLastValue;
84  bool mFirstDoAfterStart;
85 public:
88 
89  bool Do();
90  const char * GetClassName() const {return "OutControlSender";}
91 
92  const ProcessingConfig &GetConfig() const { return mConfig;}
93  void SendControl(TControlData value);
94 protected:
95  bool ConcreteConfigure(const ProcessingConfig& c);
96  bool ConcreteStart();
97 };
98 
99 } //namespace CLAM
100 
101 #endif //__OutControlSender_hxx__
102 
103 
104