Structure to store data returned from the laser scanner.
More...
#include <hokuyoaist/scan_data.h>
Structure to store data returned from the laser scanner.
Definition at line 60 of file scan_data.h.
hokuyoaist::ScanData::ScanData |
( |
| ) |
|
This constructor creates an empty ScanData with no data currently allocated.
hokuyoaist::ScanData::ScanData |
( |
uint32_t *const |
ranges_buffer, |
|
|
unsigned int |
ranges_length, |
|
|
uint32_t *const |
intensities_buffer = 0 , |
|
|
unsigned int |
intensities_length = 0 |
|
) |
| |
This constructor uses a provided data buffer rather than allocating automatically.
If the intensity pointer is 0, no data will be provided of that type.
- Parameters
-
ranges_buffer | A pointer to a data area to store range data in. It is the caller's responsibility to ensure that it is big enough. |
ranges_length | The size of the ranges buffer. Used only for copy constructor and similar. |
intensities_buffer | A pointer to a data area to store intensity data in. It is the caller's responsibility to ensure that it is big enough. |
intensities_length | The size of the intensities buffer. Used only for copy constructor and similar. |
hokuyoaist::ScanData::ScanData |
( |
ScanData const & |
rhs | ) |
|
This copy constructor performs a deep copy of present data.
hokuyoaist::ScanData::~ScanData |
( |
| ) |
|
void hokuyoaist::ScanData::allocate_data |
( |
unsigned int |
length, |
|
|
bool |
include_intensities = false |
|
) |
| |
|
protected |
std::string hokuyoaist::ScanData::as_string |
( |
| ) |
|
Format the entire object into a string.
bool hokuyoaist::ScanData::buffers_provided |
( |
| ) |
const |
|
inline |
Check if the buffers are being provided instead of automatic.
Definition at line 126 of file scan_data.h.
void hokuyoaist::ScanData::clean_up |
( |
| ) |
|
Force the data to clean up.
std::string hokuyoaist::ScanData::error_code_to_string |
( |
uint32_t |
error_code | ) |
|
Return a string representing the error for the given error code.
bool hokuyoaist::ScanData::get_error_status |
( |
| ) |
const |
|
inline |
Indicates if one or more steps had an error.
A step's value will be less than 20 if it had an error. Use error_code_to_string to get a textual representation of the error.
Definition at line 111 of file scan_data.h.
const uint32_t* hokuyoaist::ScanData::intensities |
( |
| ) |
const |
|
inline |
Return a pointer to an array of intensity readings.
Definition at line 101 of file scan_data.h.
unsigned int hokuyoaist::ScanData::intensities_length |
( |
| ) |
const |
|
inline |
Get the number of intensity samples in the data.
Definition at line 106 of file scan_data.h.
unsigned int hokuyoaist::ScanData::laser_time_stamp |
( |
| ) |
const |
|
inline |
Get the raw time stamp of the data in milliseconds.
This value is only available using SCIP version 2).
Definition at line 118 of file scan_data.h.
Get the model of the laser that produced this scan.
Definition at line 124 of file scan_data.h.
Assignment operator.
If the rhs has provided buffers, the lhs will not receive the same buffers. Instead, it will copy the data into its own buffers. If the lhs has provided buffers, it is the caller's responsibility to ensure they will be big enough to receive the data from the rhs, except in the case of 0 buffers (no data will be copied for 0 buffers).
uint32_t hokuyoaist::ScanData::operator[] |
( |
unsigned int |
index | ) |
|
Subscript operator.
Provides direct access to an element of the range data.
const uint32_t* hokuyoaist::ScanData::ranges |
( |
| ) |
const |
|
inline |
Return a pointer to array of range readings in millimetres.
Values less than 20mm indicate an error. Check the error value for the data to see a probable cause for the error. Most of the time, it will just be an out-of-range reading.
Definition at line 98 of file scan_data.h.
unsigned int hokuyoaist::ScanData::ranges_length |
( |
| ) |
const |
|
inline |
Get the number of range samples in the data.
Definition at line 104 of file scan_data.h.
unsigned long long hokuyoaist::ScanData::system_time_stamp |
( |
| ) |
const |
|
inline |
Get the system time stamp of the data in milliseconds.
This value is only available using SCIP version 2).
Definition at line 122 of file scan_data.h.
void hokuyoaist::ScanData::write_intensity |
( |
unsigned int |
index, |
|
|
uint32_t |
value |
|
) |
| |
|
protected |
void hokuyoaist::ScanData::write_range |
( |
unsigned int |
index, |
|
|
uint32_t |
value |
|
) |
| |
|
protected |
bool hokuyoaist::ScanData::buffers_provided_ |
|
protected |
bool hokuyoaist::ScanData::error_ |
|
protected |
uint32_t* hokuyoaist::ScanData::intensities_ |
|
protected |
unsigned int hokuyoaist::ScanData::intensities_length_ |
|
protected |
unsigned int hokuyoaist::ScanData::laser_time_ |
|
protected |
uint32_t* hokuyoaist::ScanData::ranges_ |
|
protected |
unsigned int hokuyoaist::ScanData::ranges_length_ |
|
protected |
unsigned long long hokuyoaist::ScanData::system_time_ |
|
protected |
The documentation for this class was generated from the following file:
- /home/geoff/src/hokuyoaist/include/hokuyoaist/scan_data.h