Newer
Older
#ifndef _MotionProxyHelper_H_
#define _MotionProxyHelper_H_
// ============================================================================
//
// = CONTEXT
// Utility class - Implementation of a class encapsulating creation and control
// of a Tango device proxy to a standard soleil motor
//
// = File
// MotionProxyHelper.h
//
// = AUTHOR
// Arafat NOUREDDINE - Synchrotron SOLEIL
// F. Langlois - Synchrotron SOLEIL
//
// ============================================================================
#include <tango.h>
#include <helpers/TangoExceptionsHelper.h>
#include <helpers/DeviceProxyHelper.h>
using namespace std;
namespace mph
{
class MotionProxyHelper : public Tango::LogAdapter
{
public:
//- ctor
MotionProxyHelper( const string sProxyName,
const string sDescription,
Tango::DeviceImpl * _device)
throw (Tango::DevFailed) ;
Arafat Nourredine
committed
//- ctor
MotionProxyHelper( const string sProxyName,
const string sDescription,
const string sAttributePositionName ,
const string sCommandStateName,
const string sCommandStopName,
Tango::DeviceImpl * _device)
throw (Tango::DevFailed) ;
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//- dtor
virtual ~MotionProxyHelper();
//- Move motor to a new position
virtual void Move(double)
throw (Tango::DevFailed);
//- Stop the motor
virtual void Stop(void)
throw (Tango::DevFailed);
//- Forward the motor
virtual void Forward(void)
throw (Tango::DevFailed);
//- Backward the motor
virtual void Backward(void)
throw (Tango::DevFailed);
//- Read the read part of the attribute "attributePositionName" associated to the motor (call read_attribute)
virtual double Read(void)
throw (Tango::DevFailed);
//- Read the write part of the attribute "attributePositionName" associated to the motor (call read_attribute_w)
virtual double ReadW(void)
throw (Tango::DevFailed);
//- Read the the attribute "attributeBLSWName" associated to the motor (call read_attribute)
bool ReadBLSW(void)
throw (Tango::DevFailed);
//- Read the the attribute "attributeFLSWName" associated to the motor (call read_attribute)
bool ReadFLSW(void)
throw (Tango::DevFailed);
//- Read the state of the motor
virtual Tango::DevState State(void)
throw (Tango::DevFailed);
//- Read the status of the motor
string Status(void)
throw (Tango::DevFailed);
protected:
Tango::DeviceProxyHelper* _mProxy;
string _sProxyName;
string _sDescription;
string _sAttributePositionName;
string _sAttributeBLSWName;
string _sAttributeFLSWName;
string _sCommandStateName;
string _sCommandStatusName;
string _sCommandStopName;
string _sCommandForwardName;
string _sCommandBackwardName;
private:
};
}
////////////////////////////////////////////////////////////////////////////////
#endif // _MotionProxyHelper_H_