28 template <
typename... Items>
38 template <
typename Sensor,
typename... Args>
47 template <
size_t Index,
typename Data>
50 return Serializer::Deserialize(std::forward<Data>(data));
53 template <
typename Data,
size_t... Is>
59 std::initializer_list<int> ({
60 (i == Is ? (result = Deserialize_impl<Is>(std::forward<Data>(data))), 0 : 0)...
65 template <
typename Data>
69 std::forward<Data>(data),
78 template <
typename... Items>
79 template <
typename Sensor,
typename... Args>
81 using TheSensor =
typename std::remove_const<Sensor>::type;
83 return Serializer::Serialize(sensor, std::forward<Args>(args)...);
86 template <
typename... Items>
89 RawData message{std::move(data)};
static constexpr size_t size()
static interpreted_type Deserialize_impl(Data &&data)
typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get< InKey > get
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. ...
A compile time structure for mapping two types.
Compile-time map for mapping sensor objects to serializers.
static interpreted_type Deserialize(Buffer &&data)
Deserializes a Buffer by calling the "Deserialize" function of the serializer that generated the Buff...
static Buffer Serialize(Sensor &sensor, Args &&... args)
Serialize the arguments provided into a Buffer by calling to the serializer registered for the given ...
uint64_t GetSensorTypeId() const
Type-id of the sensor that generated the data.
typename detail::CompileTimeTypeMapImpl< sizeof...(Items), Items... >::template get_by_index< Index > get_by_index
SharedPtr< SensorData > interpreted_type
static interpreted_type Deserialize(size_t index, Data &&data)
static interpreted_type Deserialize_impl(size_t i, Data &&data, std::index_sequence< Is... >)
Wrapper around the raw data generated by a sensor plus some useful meta-information.