qpidctrl  0.7.1
Public Member Functions | Private Attributes | List of all members
QLakeshoreCommand< T > Class Template Reference

#include <qlakeshoredevice.h>

Inheritance diagram for QLakeshoreCommand< T >:
Inheritance graph

Public Member Functions

 QLakeshoreCommand (QLakeshoreDevice *device, QString cmd, T *property)
 
bool replyExpected () const
 
bool processReply (QString reply)
 
void issueCommand ()
 
QString cmd () const
 
template<>
bool processReply (QString)
 
template<>
bool processReply (QString reply)
 
template<>
bool processReply (QString reply)
 
- Public Member Functions inherited from QPidDeviceCommand
 QPidDeviceCommand ()
 
virtual ~QPidDeviceCommand ()
 

Private Attributes

QLakeshoreDevicem_Device
 
QString m_Command
 
T * m_Property
 

Detailed Description

template<class T>
class QLakeshoreCommand< T >

Definition at line 54 of file qlakeshoredevice.h.

Constructor & Destructor Documentation

template<class T >
QLakeshoreCommand< T >::QLakeshoreCommand ( QLakeshoreDevice device,
QString  cmd,
T *  property 
)

Definition at line 92 of file qlakeshoredevice.cpp.

92  :
93  m_Device(device),
94  m_Command(cmd),
95  m_Property(property)
96 {
97 }
QString cmd() const
QLakeshoreDevice * m_Device

Member Function Documentation

template<class T >
QString QLakeshoreCommand< T >::cmd ( ) const

Definition at line 137 of file qlakeshoredevice.cpp.

138 {
139  return m_Command;
140 }
template<class T >
void QLakeshoreCommand< T >::issueCommand ( )
virtual

Implements QPidDeviceCommand.

Definition at line 143 of file qlakeshoredevice.cpp.

144 {
146 }
QString cmd() const
void writeOutput(QString cmd)
QLakeshoreDevice * m_Device
template<class T >
bool QLakeshoreCommand< T >::processReply ( QString  reply)
virtual

Implements QPidDeviceCommand.

template<>
bool QLakeshoreCommand< void >::processReply ( QString  )
virtual

Implements QPidDeviceCommand.

Definition at line 106 of file qlakeshoredevice.cpp.

107 {
108  return false;
109 }
template<>
bool QLakeshoreCommand< QcepDoubleProperty >::processReply ( QString  reply)
virtual

Implements QPidDeviceCommand.

Definition at line 112 of file qlakeshoredevice.cpp.

113 {
114  bool ok;
115  double value = reply.toDouble(&ok);
116 
117  if (ok && m_Property) {
118  m_Property->setValue(value);
119  }
120 
121  return (ok && m_Property);
122 }
template<>
bool QLakeshoreCommand< QcepBoolProperty >::processReply ( QString  reply)
virtual

Implements QPidDeviceCommand.

Definition at line 125 of file qlakeshoredevice.cpp.

126 {
127  bool value = reply.startsWith("On");
128 
129  if (m_Property) {
130  m_Property->setValue(value);
131  }
132 
133  return (value && m_Property);
134 }
template<class T >
bool QLakeshoreCommand< T >::replyExpected ( ) const
virtual

Implements QPidDeviceCommand.

Definition at line 100 of file qlakeshoredevice.cpp.

101 {
102  return m_Property;
103 }

Member Data Documentation

template<class T >
QString QLakeshoreCommand< T >::m_Command
private

Definition at line 67 of file qlakeshoredevice.h.

template<class T >
QLakeshoreDevice* QLakeshoreCommand< T >::m_Device
private

Definition at line 66 of file qlakeshoredevice.h.

template<class T >
T* QLakeshoreCommand< T >::m_Property
private

Definition at line 68 of file qlakeshoredevice.h.


The documentation for this class was generated from the following files: