00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _EXTERN_IN_CONTROL_
00023 #define _EXTERN_IN_CONTROL_
00024
00025 #include "Processing.hxx"
00026 #include "OutControl.hxx"
00027
00028 namespace CLAM{
00029
00030 class ControlSourceConfig : public ProcessingConfig
00031 {
00032 public:
00033 DYNAMIC_TYPE_USING_INTERFACE ( ControlSourceConfig, 4, ProcessingConfig);
00034 DYN_ATTRIBUTE(0,public,TData, MinValue);
00035 DYN_ATTRIBUTE(1,public,TData, MaxValue);
00036 DYN_ATTRIBUTE(2,public,TData, Step);
00037 DYN_ATTRIBUTE(3,public, std::string, UnitName);
00038 protected:
00039 void DefaultInit()
00040 {
00041 AddAll();
00042 UpdateData();
00043 SetMinValue(0.0);
00044 SetMaxValue(100.0);
00045 SetStep(1.0);
00046 SetUnitName("-");
00047 }
00048 };
00049
00050 class ControlSource : public Processing
00051 {
00052 private:
00053 ControlSourceConfig mConf;
00054 OutControl mOutput;
00055
00056 public:
00057 ControlSource()
00058 : mOutput("output",this)
00059 {
00060 }
00061
00062 ControlSource(const ControlSourceConfig & c)
00063 : mOutput("output",this)
00064 {
00065 ConcreteConfigure(c);
00066 }
00067
00068 ~ControlSource() {}
00069
00070 bool Do()
00071 {
00072 return true;
00073 }
00074
00075 bool Do( const float value );
00076
00077 const char* GetClassName() const { return "ControlSource";}
00078
00079 bool ConcreteConfigure(const ProcessingConfig &c);
00080
00081 const ProcessingConfig& GetConfig() const
00082 {
00083 return mConf;
00084 }
00085 };
00086 }
00087
00088 #endif
00089