31 return reinterpret_cast<const float &
>(
_begin[Index::HorizontalAngle]);
35 return _begin[Index::ChannelCount];
66 auto View = DeserializeHeader(data);
70 template <
typename Sensor>
83 template <
typename Sensor>
88 std::array<boost::asio::const_buffer, 2u> seq = {
89 boost::asio::buffer(data.
_header),
90 boost::asio::buffer(data.
_points)};
92 return std::move(output);
static Buffer Serialize(const Sensor &sensor, const data::LidarData &data, Buffer &&output)
static const FString SIZE
Serializes the data generated by Lidar sensors.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
This file contains definitions of common data structures used in traffic manager. ...
auto begin() noexcept
Begin iterator to the data generated by the sensor.
#define DEBUG_ASSERT(predicate)
static size_t GetHeaderOffset(const RawData &data)
std::vector< uint32_t > _header
static LidarHeaderView DeserializeHeader(const RawData &data)
void copy_from(const T &source)
Copy source into this buffer. Allocates memory if necessary.
Wrapper around the raw data generated by a sensor plus some useful meta-information.
std::vector< float > _points