cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
prmIMUSensors.h
Go to the documentation of this file.
1 // file automatically generated, do not modify
2 // cisst version: 1.0.5
3 // source file: /home/adeguet1/catkin_ws/src/cisst-saw/cisst/cisstParameterTypes/code/../prmIMUSensors.cdg
4 
5 #pragma once
6 #ifndef _cisstParameterTypes_prmIMUSensors_h
7 #define _cisstParameterTypes_prmIMUSensors_h
8 
11 #if CISST_HAS_JSON
13 #endif // CISST_HAS_JSON
14 
15 /* source line: 1 */
16 
17 /* source line: 17 */
18 
19 // mts-proxy set to true
23 
24 
25 
26 /* source line: 1 */
27 /* source line: 9 */
28 
31 
32 // Always include last
34 
35 /* source line: 17 */
37 {
38  /* default constructors and destructors. */
39  public:
40  prmIMUSensors(void);
41  prmIMUSensors(const prmIMUSensors & other);
42  ~prmIMUSensors();
43 
44 /* source line: 27 */
45  protected:
46  vct3 mAccel; // Accelerometer, units m/s*s
47  public:
48  /* accessors is set to: all */
49  void GetAccel(vct3 & placeHolder) const;
50  void SetAccel(const vct3 & newValue);
51  /* accessors is set to: all */
52  const vct3 & Accel(void) const;
53  vct3 & Accel(void);
54 /* source line: 33 */
55  protected:
56  vct3 mGyro; // Gyroscope, units rad/s
57  public:
58  /* accessors is set to: all */
59  void GetGyro(vct3 & placeHolder) const;
60  void SetGyro(const vct3 & newValue);
61  /* accessors is set to: all */
62  const vct3 & Gyro(void) const;
63  vct3 & Gyro(void);
64 /* source line: 39 */
65  protected:
66  vct3 mMag; // Magnetometer, units G (Gauss)
67  public:
68  /* accessors is set to: all */
69  void GetMag(vct3 & placeHolder) const;
70  void SetMag(const vct3 & newValue);
71  /* accessors is set to: all */
72  const vct3 & Mag(void) const;
73  vct3 & Mag(void);
74 /* source line: 45 */
75  protected:
76  double mTemp; // Temperature, units deg-C
77  public:
78  /* accessors is set to: all */
79  void GetTemp(double & placeHolder) const;
80  void SetTemp(const double & newValue);
81  /* accessors is set to: all */
82  const double & Temp(void) const;
83  double & Temp(void);
84 /* source line: 51 */
85  protected:
86  double mPressure; // Barometric pressure, units kPa (kilo-Pascal)
87  public:
88  /* accessors is set to: all */
89  void GetPressure(double & placeHolder) const;
90  void SetPressure(const double & newValue);
91  /* accessors is set to: all */
92  const double & Pressure(void) const;
93  double & Pressure(void);
94 /* source line: 57 */
95 
96  private:
98  /* default methods */
99  public:
100  void SerializeRaw(std::ostream & outputStream) const;
101  void DeSerializeRaw(std::istream & inputStream);
102  void ToStream(std::ostream & outputStream) const;
103  void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
104  bool headerOnly = false, const std::string & headerPrefix = "") const;
105  /* default data methods */
106  public:
107  void Copy(const prmIMUSensors & source);
108  void SerializeBinary(std::ostream & outputStream) const throw (std::runtime_error);
109  void DeSerializeBinary(std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error);
110  void SerializeText(std::ostream & outputStream, const char delimiter = ',') const throw (std::runtime_error);
111  std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = "") const;
112  void DeSerializeText(std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error);
113  std::string HumanReadable(void) const;
114  bool ScalarNumberIsFixed(void) const;
115  size_t ScalarNumber(void) const;
116  double Scalar(const size_t index) const throw (std::out_of_range);
117  std::string ScalarDescription(const size_t index, const std::string & userDescription = "") const throw (std::out_of_range);
118 #if CISST_HAS_JSON
119  void SerializeTextJSON(Json::Value & jsonValue) const;
120  void DeSerializeTextJSON(const Json::Value & jsonValue) throw (std::runtime_error);
121 #endif // CISST_HAS_JSON
122 
123 }; // prmIMUSensors
124 
125 // mts-proxy set to true
127 CMN_DECLARE_SERVICES_INSTANTIATION(prmIMUSensorsProxy);
128 
129 /* default functions */
130 void CISST_EXPORT cmnSerializeRaw(std::ostream & outputStream, const prmIMUSensors & object);
131 void CISST_EXPORT cmnDeSerializeRaw(std::istream & inputStream, prmIMUSensors & placeHolder);
132 /* data functions */
133 template <> class cmnData<prmIMUSensors > {
134 public:
135  enum {IS_SPECIALIZED = 1};
137  static void Copy(DataType & data, const DataType & source) {
138  data.Copy(source);
139  }
140  static std::string SerializeDescription(const DataType & data, const char delimiter, const std::string & userDescription) {
141  return data.SerializeDescription(delimiter, userDescription);
142  }
143  static void SerializeBinary(const DataType & data, std::ostream & outputStream) throw (std::runtime_error) {
144  data.SerializeBinary(outputStream);
145  }
146  static void DeSerializeBinary(DataType & data, std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) throw (std::runtime_error) {
147  data.DeSerializeBinary(inputStream, localFormat, remoteFormat);
148  }
149  static void SerializeText(const DataType & data, std::ostream & outputStream, const char delimiter = ',') throw (std::runtime_error) {
150  data.SerializeText(outputStream, delimiter);
151  }
152  static void DeSerializeText(DataType & data, std::istream & inputStream, const char delimiter = ',') throw (std::runtime_error) {
153  data.DeSerializeText(inputStream, delimiter);
154  }
155  static std::string HumanReadable(const DataType & data) {
156  return data.HumanReadable();
157  }
158  static bool ScalarNumberIsFixed(const DataType & data) {
159  return data.ScalarNumberIsFixed();
160  }
161  static size_t ScalarNumber(const DataType & data) {
162  return data.ScalarNumber();
163  }
164  static std::string ScalarDescription(const DataType & data, const size_t index, const std::string & userDescription = "") throw (std::out_of_range) {
165  return data.ScalarDescription(index, userDescription);
166  }
167  static double Scalar(const DataType & data, const size_t index) throw (std::out_of_range) {
168  return data.Scalar(index);
169  }
170 };
171 inline std::ostream & operator << (std::ostream & outputStream, const prmIMUSensors & data) {
172  outputStream << cmnData<prmIMUSensors >::HumanReadable(data);
173  return outputStream;
174 }
175 #if CISST_HAS_JSON
176 template <> void CISST_EXPORT cmnDataJSON<prmIMUSensors >::SerializeText(const prmIMUSensors & data, Json::Value & jsonValue);
177 template <> void CISST_EXPORT cmnDataJSON<prmIMUSensors >::DeSerializeText(prmIMUSensors & data, const Json::Value & jsonValue) throw (std::runtime_error);
178 #endif // CISST_HAS_JSON
179 
180 /* source line: 63 */
181 
183 
184 
185 #endif // _cisstParameterTypes_prmIMUSensors_h
vct3 mGyro
Definition: prmIMUSensors.h:56
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
void DeSerializeText(std::istream &inputStream, const char delimiter= ',')
void Copy(const prmIMUSensors &source)
Definition: cmnDataFormat.h:32
Class registration macros.
virtual void SerializeRaw(std::ostream &outputStream) const
virtual void DeSerializeRaw(std::istream &inputStream)
virtual void ToStream(std::ostream &outputStream) const
std::string SerializeDescription(const char delimiter= ',', const std::string &userDescription="") const
Definition: prmIMUSensors.h:36
static size_t ScalarNumber(const DataType &data)
Definition: prmIMUSensors.h:161
void CISST_EXPORT cmnDeSerializeRaw(std::istream &inputStream, prmIMUSensors &placeHolder)
Typedef for fixed size vectors.
void CISST_EXPORT cmnSerializeRaw(std::ostream &outputStream, const prmIMUSensors &object)
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
mtsGenericObjectProxy< prmIMUSensors > prmIMUSensorsProxy
Definition: prmIMUSensors.h:126
static void DeSerializeText(DataType &data, std::istream &inputStream, const char delimiter= ',')
Definition: prmIMUSensors.h:152
static double Scalar(const DataType &data, const size_t index)
Definition: prmIMUSensors.h:167
static void SerializeText(const DataType &data, std::ostream &outputStream, const char delimiter= ',')
Definition: prmIMUSensors.h:149
void SerializeText(std::ostream &outputStream, const char delimiter= ',') const
std::string ScalarDescription(const size_t index, const std::string &userDescription="") const
prmIMUSensors DataType
Definition: prmIMUSensors.h:136
vct3 mAccel
Definition: prmIMUSensors.h:46
CMN_DECLARE_SERVICES_INSTANTIATION(prmIMUSensorsProxy)
Defines mtsGenericObject.
Definition: cmnDataFunctions.h:53
double mTemp
Definition: prmIMUSensors.h:76
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
size_t ScalarNumber(void) const
Definition: cmnDataFunctions.h:56
static std::string HumanReadable(const DataType &data)
Definition: prmIMUSensors.h:155
static std::string ScalarDescription(const DataType &data, const size_t index, const std::string &userDescription="")
Definition: prmIMUSensors.h:164
Defines cmnClassServices.
static void Copy(DataType &data, const DataType &source)
Definition: prmIMUSensors.h:137
static bool ScalarNumberIsFixed(const DataType &data)
Definition: prmIMUSensors.h:158
std::string HumanReadable(void) const
vct3 mMag
Definition: prmIMUSensors.h:66
Definition: mtsGenericObjectProxy.h:45
const int CMN_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:331
static void DeSerializeBinary(DataType &data, std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat)
Definition: prmIMUSensors.h:146
std::ostream & operator<<(std::ostream &outputStream, const prmIMUSensors &data)
Definition: prmIMUSensors.h:171
double mPressure
Definition: prmIMUSensors.h:86
virtual void ToStreamRaw(std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
static std::string SerializeDescription(const DataType &data, const char delimiter, const std::string &userDescription)
Definition: prmIMUSensors.h:140
bool ScalarNumberIsFixed(void) const
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76
static void SerializeBinary(const DataType &data, std::ostream &outputStream)
Definition: prmIMUSensors.h:143