cisst-saw
Loading...
Searching...
No Matches
prmIMUSensors.h
Go to the documentation of this file.
1// file automatically generated, do not modify
2// cisst version: 1.5.0
3// source file: /Users/anton/devel/cisst-saw-doxygen/tmp/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
18
19
20// for mts-proxy
24
25/* source line: 1 */
26/* source line: 9 */
27
30
31// Always include last
33
34/* source line: 17 */
36{
37 /* default constructors and destructors. */
38 public:
43
44/* source line: 27 */
45 protected:
46 vct3 mAccel; // Accelerometer, units m/s*s
47 public:
48 /* accessors is set to: all */
49#ifndef SWIG
50 void GetAccel(vct3 & placeHolder) const;
51#endif
52 inline vct3 GetAccel(void) const {
53 return mAccel;
54 }
55 void SetAccel(const vct3 & newValue);
56 /* accessors is set to: all */
57 const vct3 & Accel(void) const;
58 vct3 & Accel(void);
59/* source line: 33 */
60 protected:
61 vct3 mGyro; // Gyroscope, units rad/s
62 public:
63 /* accessors is set to: all */
64#ifndef SWIG
65 void GetGyro(vct3 & placeHolder) const;
66#endif
67 inline vct3 GetGyro(void) const {
68 return mGyro;
69 }
70 void SetGyro(const vct3 & newValue);
71 /* accessors is set to: all */
72 const vct3 & Gyro(void) const;
73 vct3 & Gyro(void);
74/* source line: 39 */
75 protected:
76 vct3 mMag; // Magnetometer, units G (Gauss)
77 public:
78 /* accessors is set to: all */
79#ifndef SWIG
80 void GetMag(vct3 & placeHolder) const;
81#endif
82 inline vct3 GetMag(void) const {
83 return mMag;
84 }
85 void SetMag(const vct3 & newValue);
86 /* accessors is set to: all */
87 const vct3 & Mag(void) const;
88 vct3 & Mag(void);
89/* source line: 45 */
90 protected:
91 double mTemp; // Temperature, units deg-C
92 public:
93 /* accessors is set to: all */
94#ifndef SWIG
95 void GetTemp(double & placeHolder) const;
96#endif
97 inline double GetTemp(void) const {
98 return mTemp;
99 }
100 void SetTemp(const double & newValue);
101 /* accessors is set to: all */
102 const double & Temp(void) const;
103 double & Temp(void);
104/* source line: 51 */
105 protected:
106 double mPressure; // Barometric pressure, units kPa (kilo-Pascal)
107 public:
108 /* accessors is set to: all */
109#ifndef SWIG
110 void GetPressure(double & placeHolder) const;
111#endif
112 inline double GetPressure(void) const {
113 return mPressure;
114 }
115 void SetPressure(const double & newValue);
116 /* accessors is set to: all */
117 const double & Pressure(void) const;
118 double & Pressure(void);
119/* source line: 57 */
120
121 private:
122 CMN_DECLARE_SERVICES(CMN_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
123 /* default methods */
124 public:
125 void SerializeRaw(std::ostream & outputStream) const override;
126 void DeSerializeRaw(std::istream & inputStream) override;
127 void ToStream(std::ostream & outputStream) const override;
128 void ToStreamRaw(std::ostream & outputStream, const char delimiter = ' ',
129 bool headerOnly = false, const std::string & headerPrefix = "") const override;
130 /* default data methods */
131 public:
132 void Copy(const prmIMUSensors & source);
133 void SerializeBinary(std::ostream & outputStream) const CISST_THROW(std::runtime_error);
134 void DeSerializeBinary(std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) CISST_THROW(std::runtime_error);
135 void SerializeText(std::ostream & outputStream, const char delimiter = ',') const CISST_THROW(std::runtime_error);
136 std::string SerializeDescription(const char delimiter = ',', const std::string & userDescription = "") const;
137 void DeSerializeText(std::istream & inputStream, const char delimiter = ',') CISST_THROW(std::runtime_error);
138 std::string HumanReadable(void) const;
139 bool ScalarNumberIsFixed(void) const override;
140 size_t ScalarNumber(void) const override;
141 double Scalar(const size_t index) const CISST_THROW(std::out_of_range) override;
142 std::string ScalarDescription(const size_t index, const std::string & userDescription = "") const CISST_THROW(std::out_of_range) override;
143#if CISST_HAS_JSON
144 void SerializeTextJSON(Json::Value & jsonValue) const override;
145 void DeSerializeTextJSON(const Json::Value & jsonValue) CISST_THROW(std::runtime_error) override;
146#endif // CISST_HAS_JSON
147
148}; // prmIMUSensors
149
150// mts-proxy set to true
153
154/* default functions */
155void CISST_EXPORT cmnSerializeRaw(std::ostream & outputStream, const prmIMUSensors & object);
156void CISST_EXPORT cmnDeSerializeRaw(std::istream & inputStream, prmIMUSensors & placeHolder);
157/* data functions */
158template <> class cmnData<prmIMUSensors > {
159public:
160 enum {IS_SPECIALIZED = 1};
162 static void Copy(DataType & data, const DataType & source) {
163 data.Copy(source);
164 }
165 static std::string SerializeDescription(const DataType & data, const char delimiter, const std::string & userDescription) {
166 return data.SerializeDescription(delimiter, userDescription);
167 }
168 static void SerializeBinary(const DataType & data, std::ostream & outputStream) CISST_THROW(std::runtime_error) {
169 data.SerializeBinary(outputStream);
170 }
171 static void DeSerializeBinary(DataType & data, std::istream & inputStream, const cmnDataFormat & localFormat, const cmnDataFormat & remoteFormat) CISST_THROW(std::runtime_error) {
172 data.DeSerializeBinary(inputStream, localFormat, remoteFormat);
173 }
174 static void SerializeText(const DataType & data, std::ostream & outputStream, const char delimiter = ',') CISST_THROW(std::runtime_error) {
175 data.SerializeText(outputStream, delimiter);
176 }
177 static void DeSerializeText(DataType & data, std::istream & inputStream, const char delimiter = ',') CISST_THROW(std::runtime_error) {
178 data.DeSerializeText(inputStream, delimiter);
179 }
180 static std::string HumanReadable(const DataType & data) {
181 return data.HumanReadable();
182 }
183 static bool ScalarNumberIsFixed(const DataType & data) {
184 return data.ScalarNumberIsFixed();
185 }
186 static size_t ScalarNumber(const DataType & data) {
187 return data.ScalarNumber();
188 }
189 static std::string ScalarDescription(const DataType & data, const size_t index, const std::string & userDescription = "") CISST_THROW(std::out_of_range) {
190 return data.ScalarDescription(index, userDescription);
191 }
192 static double Scalar(const DataType & data, const size_t index) CISST_THROW(std::out_of_range) {
193 return data.Scalar(index);
194 }
195};
196inline std::ostream & operator << (std::ostream & outputStream, const prmIMUSensors & data) {
197 outputStream << cmnData<prmIMUSensors >::HumanReadable(data);
198 return outputStream;
199}
200#if CISST_HAS_JSON
201template <> void CISST_EXPORT cmnDataJSON<prmIMUSensors >::SerializeText(const prmIMUSensors & data, Json::Value & jsonValue);
202template <> void CISST_EXPORT cmnDataJSON<prmIMUSensors >::DeSerializeText(prmIMUSensors & data, const Json::Value & jsonValue) CISST_THROW(std::runtime_error);
203#endif // CISST_HAS_JSON
204
205/* source line: 63 */
206
208
209
210#endif // _cisstParameterTypes_prmIMUSensors_h
static void DeSerializeText(DataType &data, std::istream &inputStream, const char delimiter=',') CISST_THROW(std
Definition prmIMUSensors.h:177
prmIMUSensors DataType
Definition prmIMUSensors.h:161
@ IS_SPECIALIZED
Definition prmIMUSensors.h:160
static void DeSerializeBinary(DataType &data, std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat) CISST_THROW(std
Definition prmIMUSensors.h:171
static void SerializeBinary(const DataType &data, std::ostream &outputStream) CISST_THROW(std
Definition prmIMUSensors.h:168
static std::string ScalarDescription(const DataType &data, const size_t index, const std::string &userDescription="") CISST_THROW(std
Definition prmIMUSensors.h:189
static size_t ScalarNumber(const DataType &data)
Definition prmIMUSensors.h:186
static std::string HumanReadable(const DataType &data)
Definition prmIMUSensors.h:180
static double Scalar(const DataType &data, const size_t index) CISST_THROW(std
Definition prmIMUSensors.h:192
static std::string SerializeDescription(const DataType &data, const char delimiter, const std::string &userDescription)
Definition prmIMUSensors.h:165
static void Copy(DataType &data, const DataType &source)
Definition prmIMUSensors.h:162
static void SerializeText(const DataType &data, std::ostream &outputStream, const char delimiter=',') CISST_THROW(std
Definition prmIMUSensors.h:174
static bool ScalarNumberIsFixed(const DataType &data)
Definition prmIMUSensors.h:183
Definition cmnDataFormat.h:30
Definition cmnDataFunctions.h:51
virtual std::string ScalarDescription(const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const
Definition cmnGenericObject.h:154
virtual double Scalar(const size_t CMN_UNUSED(index)) const CISST_THROW(std
Definition cmnGenericObject.h:145
mtsGenericObject(void)
Definition mtsGenericObject.h:77
Definition mtsGenericObjectProxy.h:376
Definition prmIMUSensors.h:36
vct3 & Gyro(void)
void GetAccel(vct3 &placeHolder) const
double GetPressure(void) const
Definition prmIMUSensors.h:112
void SetPressure(const double &newValue)
void SetAccel(const vct3 &newValue)
const double & Pressure(void) const
void Copy(const prmIMUSensors &source)
double GetTemp(void) const
Definition prmIMUSensors.h:97
void GetPressure(double &placeHolder) const
vct3 & Mag(void)
void SetMag(const vct3 &newValue)
vct3 GetMag(void) const
Definition prmIMUSensors.h:82
prmIMUSensors(void)
void ToStreamRaw(std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const override
const vct3 & Mag(void) const
void SetTemp(const double &newValue)
vct3 GetAccel(void) const
Definition prmIMUSensors.h:52
size_t ScalarNumber(void) const override
const vct3 & Accel(void) const
void ToStream(std::ostream &outputStream) const override
vct3 GetGyro(void) const
Definition prmIMUSensors.h:67
void SerializeRaw(std::ostream &outputStream) const override
vct3 mAccel
Definition prmIMUSensors.h:46
vct3 mGyro
Definition prmIMUSensors.h:61
const double & Temp(void) const
void DeSerializeText(std::istream &inputStream, const char delimiter=',') CISST_THROW(std std::string HumanReadable(void) const
Definition prmIMUSensors.h:138
prmIMUSensors(const prmIMUSensors &other)
double & Temp(void)
void GetMag(vct3 &placeHolder) const
double mTemp
Definition prmIMUSensors.h:91
double mPressure
Definition prmIMUSensors.h:106
vct3 & Accel(void)
double & Pressure(void)
bool ScalarNumberIsFixed(void) const override
void GetGyro(vct3 &placeHolder) const
void GetTemp(double &placeHolder) const
void DeSerializeRaw(std::istream &inputStream) override
const vct3 & Gyro(void) const
vct3 mMag
Definition prmIMUSensors.h:76
void SetGyro(const vct3 &newValue)
void SerializeBinary(std::ostream &outputStream) const CISST_THROW(std void DeSerializeBinary(std::istream &inputStream, const cmnDataFormat &localFormat, const cmnDataFormat &remoteFormat) CISST_THROW(std void SerializeText(std::ostream &outputStream, const char delimiter=',') const CISST_THROW(std std::string SerializeDescription(const char delimiter=',', const std::string &userDescription="") const
Definition prmIMUSensors.h:136
Class registration macros.
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:328
Defines cmnClassServices.
void cmnDeSerializeRaw(std::istream &inputStream, _elementType &data) CISST_THROW(std
Definition cmnDeSerializer.h:82
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
void cmnSerializeRaw(std::ostream &outputStream, const _elementType &data) CISST_THROW(std
Definition cmnSerializer.h:76
Defines mtsGenericObject.
STL namespace.
mtsGenericObjectProxy< prmIMUSensors > prmIMUSensorsProxy
Definition prmIMUSensors.h:151
std::ostream & operator<<(std::ostream &outputStream, const prmIMUSensors &data)
Definition prmIMUSensors.h:196
ThisType & operator=(const vctDynamicConstMatrixBase< __matrixOwnerType, __elementType > &otherMatrix)
Definition vctDynamicMatrix.h:255
Typedef for fixed size vectors.
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46