Main MRPT website > C++ reference for MRPT 1.9.9
CObservationRawDAQ.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CObservationRawDAQ_H
10 #define CObservationRawDAQ_H
11 
13 #include <mrpt/obs/CObservation.h>
14 
15 namespace mrpt
16 {
17 namespace obs
18 {
19 /** Store raw data from a Data Acquisition (DAQ) device, such that input or
20  * output analog and digital channels, counters from encoders, etc. at one
21  * sampling instant.
22  * All analog values are assumed to be volts.
23  * On timing:
24  * - CObservation::timestamp corresponds to the time of the first samples in
25  * each of the vectors.
26  * - CObservationRawDAQ::sample_rate is the sampling rate, in samples per second
27  * per channel, as stored by the source driver.
28  *
29  * \sa CObservation
30  * \ingroup mrpt_obs_grp
31  */
33 {
35  public:
36  /** Constructor */
39  {
40  }
41  /** Destructor */
42  virtual ~CObservationRawDAQ() {}
43  std::vector<uint8_t>
44  AIN_8bits; /** Readings from 8-bit analog input (ADCs) channels
45  (vector length=channel count) in ADC units. */
46  std::vector<uint16_t>
47  AIN_16bits; /** Readings from 16-bit analog input (ADCs) channels
48  (vector length=channel count) in ADC units. */
49  std::vector<uint32_t>
50  AIN_32bits; /** Readings from 32-bit analog input (ADCs) channels
51  (vector length=channel count) in ADC units. */
52  std::vector<float>
53  AIN_float; /** Readings from analog input (ADCs) channels (vector
54  length=channel count) in Volts. */
55  std::vector<double>
56  AIN_double; /** Readings from analog input (ADCs) channels (vector
57  length=channel count) in Volts. */
58 
59  /** How many different ADC channels are present in the AIN_* vectors. */
61  /** Whether the channels are interleaved (A0 A1 A2 A0 A1 A2...) or not (A0
62  * A0 A0 A1 A1 A1 A2 A2 A2...) in the AIN_* vectors. */
64 
65  std::vector<uint8_t>
66  AOUT_8bits; /** Present output values for 8-bit analog output (DACs)
67  channels (vector length=channel count) in DAC units.*/
68  std::vector<uint16_t>
69  AOUT_16bits; /** Present output values for 16-bit analog output (DACs)
70  channels (vector length=channel count) in DAC units.*/
71  std::vector<float> AOUT_float; /** Present output values for 16-bit analog
72  output (DACs) channels (vector
73  length=channel count) in volts.*/
74  std::vector<double>
75  AOUT_double; /** Present output values for 16-bit analog output (DACs)
76  channels (vector length=channel count) in volts.*/
77 
78  std::vector<uint8_t>
79  DIN; /** Readings from digital inputs; each byte stores 8 digital
80  inputs, or 8-bit port. */
81  std::vector<uint8_t> DOUT; /** Present digital output values; each byte
82  stores 8 digital inputs, or 8-bit port. */
83 
84  std::vector<uint32_t>
85  CNTRIN_32bits; /** Readings from ticks counters, such as quadrature
86  encoders. (vector length=channel count) in ticks. */
87  std::vector<double>
88  CNTRIN_double; /** Readings from ticks counters, such as quadrature
89  encoders. (vector length=channel count) in radians,
90  degrees or any other unit (depends on the source
91  driver). */
92 
93  /** The sampling rate, in samples per second per channel */
94  double sample_rate;
95 
96  /** Not used in this class */
97  void getSensorPose(mrpt::poses::CPose3D&) const override {}
98  /** Not used in this class */
99  void setSensorPose(const mrpt::poses::CPose3D&) override {}
100  // See base class docs
101  void getDescriptionAsText(std::ostream& o) const override;
102 
103 }; // End of class def.
104 
105 } // End of namespace
106 } // End of namespace
107 
108 #endif
uint16_t AIN_channel_count
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
double sample_rate
Readings from ticks counters, such as quadrature encoders.
unsigned __int16 uint16_t
Definition: rptypes.h:44
std::vector< uint8_t > AOUT_8bits
void getSensorPose(mrpt::poses::CPose3D &) const override
Not used in this class.
virtual ~CObservationRawDAQ()
Destructor.
std::vector< uint16_t > AOUT_16bits
Present output values for 8-bit analog output (DACs) channels (vector length=channel count) in DAC un...
std::vector< uint32_t > AIN_32bits
Readings from 16-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< double > AOUT_double
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
bool AIN_interleaved
Whether the channels are interleaved (A0 A1 A2 A0 A1 A2...) or not (A0 A0 A0 A1 A1 A1 A2 A2 A2...
Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital cha...
std::vector< double > CNTRIN_double
Readings from ticks counters, such as quadrature encoders.
std::vector< uint8_t > DOUT
Readings from digital inputs; each byte stores 8 digital inputs, or 8-bit port.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::vector< double > AIN_double
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setSensorPose(const mrpt::poses::CPose3D &) override
Not used in this class.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
Declares a class that represents any robot&#39;s observation.
Definition: CObservation.h:43
std::vector< float > AOUT_float
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in DAC u...
std::vector< float > AIN_float
Readings from 32-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< uint8_t > DIN
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
std::vector< uint32_t > CNTRIN_32bits
Present digital output values; each byte stores 8 digital inputs, or 8-bit port.
std::vector< uint16_t > AIN_16bits
Readings from 8-bit analog input (ADCs) channels (vector length=channel count) in ADC units...
std::vector< uint8_t > AIN_8bits



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019