42 template <
typename Sensor>
48 template <
typename Sensor>
52 sensor.GetImageWidth(),
53 sensor.GetImageHeight(),
61 unsigned char *it = output.data();
64 std::memcpy(it,
reinterpret_cast<const void *
>(&header),
sizeof(header));
68 for (
auto e : events) {
69 std::memcpy(it,
reinterpret_cast<const void *
>(&e),
sizeof(
data::DVSEvent));
72 return std::move(output);
#define DEBUG_ASSERT(predicate)
Wrapper around the raw data generated by a sensor plus some useful meta-information.
auto begin() noexcept
Begin iterator to the data generated by the sensor.
Serializes events array generated by DVS camera sensors.
static Buffer Serialize(const Sensor &sensor, const DVSEventArray &events, Buffer &&output)
std::vector< data::DVSEvent > DVSEventArray
static SharedPtr< SensorData > Deserialize(RawData &&data)
static const DVSHeader & DeserializeHeader(const RawData &data)
static constexpr auto header_offset
This file contains definitions of common data structures used in traffic manager.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...