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
mrpt::obs::CObservationRawDAQ::AIN_32bits
std::vector< uint32_t > AIN_32bits
Readings from 16-bit analog input (ADCs) channels (vector length=channel count) in ADC units.
Definition: CObservationRawDAQ.h:50
mrpt::obs::CObservationRawDAQ
Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital cha...
Definition: CObservationRawDAQ.h:32
uint16_t
unsigned __int16 uint16_t
Definition: rptypes.h:44
mrpt::obs::CObservationRawDAQ::AIN_double
std::vector< double > AIN_double
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
Definition: CObservationRawDAQ.h:56
mrpt::obs::CObservationRawDAQ::~CObservationRawDAQ
virtual ~CObservationRawDAQ()
Destructor.
Definition: CObservationRawDAQ.h:42
mrpt::obs::CObservationRawDAQ::DIN
std::vector< uint8_t > DIN
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
Definition: CObservationRawDAQ.h:79
mrpt::obs::CObservationRawDAQ::CObservationRawDAQ
CObservationRawDAQ()
Constructor.
Definition: CObservationRawDAQ.h:37
mrpt::obs::CObservationRawDAQ::AIN_float
std::vector< float > AIN_float
Readings from 32-bit analog input (ADCs) channels (vector length=channel count) in ADC units.
Definition: CObservationRawDAQ.h:53
mrpt::obs::CObservationRawDAQ::AOUT_float
std::vector< float > AOUT_float
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in DAC u...
Definition: CObservationRawDAQ.h:71
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::obs::CObservationRawDAQ::AOUT_16bits
std::vector< uint16_t > AOUT_16bits
Present output values for 8-bit analog output (DACs) channels (vector length=channel count) in DAC un...
Definition: CObservationRawDAQ.h:69
mrpt::obs::CObservationRawDAQ::setSensorPose
void setSensorPose(const mrpt::poses::CPose3D &) override
Not used in this class.
Definition: CObservationRawDAQ.h:99
mrpt::obs::CObservationRawDAQ::AIN_8bits
std::vector< uint8_t > AIN_8bits
Definition: CObservationRawDAQ.h:44
mrpt::obs::CObservationRawDAQ::AOUT_8bits
std::vector< uint8_t > AOUT_8bits
Definition: CObservationRawDAQ.h:66
mrpt::obs::CObservationRawDAQ::CNTRIN_32bits
std::vector< uint32_t > CNTRIN_32bits
Present digital output values; each byte stores 8 digital inputs, or 8-bit port.
Definition: CObservationRawDAQ.h:85
mrpt::obs::CObservationRawDAQ::getSensorPose
void getSensorPose(mrpt::poses::CPose3D &) const override
Not used in this class.
Definition: CObservationRawDAQ.h:97
mrpt::obs::CObservationRawDAQ::AIN_16bits
std::vector< uint16_t > AIN_16bits
Readings from 8-bit analog input (ADCs) channels (vector length=channel count) in ADC units.
Definition: CObservationRawDAQ.h:47
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
mrpt::obs::CObservationRawDAQ::sample_rate
double sample_rate
Readings from ticks counters, such as quadrature encoders.
Definition: CObservationRawDAQ.h:94
mrpt::obs::CObservationRawDAQ::CNTRIN_double
std::vector< double > CNTRIN_double
Readings from ticks counters, such as quadrature encoders.
Definition: CObservationRawDAQ.h:88
mrpt::obs::CObservationRawDAQ::getDescriptionAsText
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
Definition: CObservationRawDAQ.cpp:51
CObservation.h
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:102
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::obs::CObservationRawDAQ::AIN_channel_count
uint16_t AIN_channel_count
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
Definition: CObservationRawDAQ.h:60
mrpt::obs::CObservationRawDAQ::DOUT
std::vector< uint8_t > DOUT
Readings from digital inputs; each byte stores 8 digital inputs, or 8-bit port.
Definition: CObservationRawDAQ.h:81
CSerializable.h
mrpt::obs::CObservationRawDAQ::AOUT_double
std::vector< double > AOUT_double
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
Definition: CObservationRawDAQ.h:75
mrpt::obs::CObservationRawDAQ::AIN_interleaved
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....
Definition: CObservationRawDAQ.h:63



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST