SEPIA
Software documentation for the APEX SEPIA receivers
property.h
Go to the documentation of this file.
1 /* Copyright 2017 Michael Olberg <michael.olberg@chalmers.se> */
2 #ifndef PROPERTY_H
3 #define PROPERTY_H
4 
9 template<class T>
10 
20 class Property
21 {
22  public:
23  Property();
28  T commanded() const;
33  T actual() const;
38  void setCommanded(T value);
43  void update(T value);
44 
45  private:
46  T m_cmd;
47  T m_act;
48 };
49 
50 template<class T>
52 {
53 }
54 
55 template<class T>
57 {
58  return m_cmd;
59 }
60 
61 template<class T>
63 {
64  return m_act;
65 }
66 
67 template<class T>
69 {
70  m_cmd = val;
71 }
72 
73 template<class T>
75 {
76  m_act = val;
77 }
78 
79 #endif
T commanded() const
Read the commanded value.
Definition: property.h:56
void update(T value)
Update the actual value.
Definition: property.h:74
A template class representing a device property.
Definition: property.h:20
void setCommanded(T value)
Set a new commanded value.
Definition: property.h:68
T actual() const
Read the actual value.
Definition: property.h:62