omronmodbus.h
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 //---------------------------------------------------------------------------
15 
16 #ifndef usertempcontrolH
17 #define usertempcontrolH
18 
19 #include "tempcontrol.h"
20 #include "modbusrtuinterface.h"
21 #include "chardevicedriver.h"
22 
23 //OMRON E5*C controller via Modbus link.
24 class XOmronE5_CModbus : public XModbusRTUDriver<XTempControl> {
25 public:
26  XOmronE5_CModbus(const char *name, bool runtime,
27  Transaction &tr_meas, const shared_ptr<XMeasure> &meas);
28  virtual ~XOmronE5_CModbus() {}
29 
30 protected:
31  //! reads sensor value from the instrument
32  virtual double getRaw(shared_ptr<XChannel> &channel);
33  //! reads a value in Kelvin from the instrument
34  virtual double getTemp(shared_ptr<XChannel> &channel);
35  //! obtains current heater power
36  //! \sa m_heaterPowerUnit()
37  virtual double getHeater(unsigned int loop);
38  //! ex. "W", "dB", or so
39  virtual const char *m_heaterPowerUnit(unsigned int loop) {return "%";}
40 
41  //! Be called just after opening interface. Call start() inside this routine appropriately.
42  virtual void open() throw (XKameError &);
43 
44  virtual void onPChanged(unsigned int loop, double p);
45  virtual void onIChanged(unsigned int loop, double i);
46  virtual void onDChanged(unsigned int loop, double d);
47  virtual void onTargetTempChanged(unsigned int loop, double temp);
48  virtual void onManualPowerChanged(unsigned int loop, double pow);
49  virtual void onHeaterModeChanged(unsigned int loop, int mode);
50  virtual void onPowerRangeChanged(unsigned int loop, int range);
51  virtual void onPowerMaxChanged(unsigned int, double v) {}
52  virtual void onPowerMinChanged(unsigned int, double v) {}
53  virtual void onCurrentChannelChanged(unsigned int loop, const shared_ptr<XChannel> &ch);
54 
55  virtual void onExcitationChanged(const shared_ptr<XChannel> &ch, int exc);
56 private:
57 };
58 
59 #endif

Generated for KAME4 by  doxygen 1.8.3