Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

dev1d.H

Go to the documentation of this file.
00001 #ifndef GLUE_DEV1D_H
00002 #define GLUE_DEV1D_H
00003 
00004 #include "event/event.H"
00005 #include "dev/dev.H"
00006 
00007 
00008 //
00009 //   DEVice_1d - a 1 DOF device such as an iCubeX channel
00010 //
00011 //   
00012 //
00013 class DllImpExp DEVice_1d : public DEVice {
00014   protected:
00015    Greal      &_cur;
00016 
00017   public :
00018                 DEVice_1d(Cstr_ptr &devname, Cstr_ptr &evtname);
00019    virtual     ~DEVice_1d()                 { }
00020 
00021    double       cur       ()          const { return _cur; }
00022    void         set_cur   (double &p);
00023 
00024   virtual void event_delta(double );
00025    virtual void event(double );
00026 
00027     /* ----------- TYPEDOBJ methods --------------- */
00028     DEFINE_DERIVED_TYPE(DEVice_1d, DEVice, const DEVice *);
00029 };
00030 
00031 MAKE_PTR_SUBC(EVENT1d, EVENT);
00032 class DllImpExp EVENT1d : public EVENT {
00033  public:
00034 
00035    EVENT1d(Cstr_ptr    &n);
00036    EVENT1d(Cstr_ptr    &n, double &o, double &c);
00037    EVENT1d(EVENTsource *s);
00038    EVENT1d(DEVice_1d *s, double o, double c):EVENT(s),_old(o),_cur(c),_dev(s){}
00039 
00040    double        cur    ()            const  { return _cur; }
00041    double        old    ()            const  { return _old; }
00042    double        delta  ()            const;
00043  
00044    void          set_cur(double p)    const  { }
00045 
00046     /* ------------ TYPEDOBJ methods ---------------- */
00047 
00048    DEFINE_DERIVED_TYPE(EVENT1d, EVENT, cEVENTptr);
00049    static EVENT1dptr cast(cEVENTptr &e) { return EVENT1d::isa(e) ? 
00050                                                  (EVENT1d *)&*e : 0; }
00051 
00052 
00053  protected:
00054     /* ------------ EVENT methods ---------------- */
00055    virtual bool compare(cEVENTptr &e) const { return true; }
00056 
00057    double      _old;
00058    double      _cur;
00059 
00060    DEVice_1d *_dev;
00061 };
00062 
00063 
00064 
00065 
00066 
00067 #endif

Generated on Mon Sep 15 16:25:56 2003 for gluebase by doxygen1.2.18