obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but that tree was gitignored, so a clone of this repository could not build the firmware it ships. It is now committed here as ordinary files in its own folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP bridge's signature verification (--trust) used on the bench. Nothing is fetched from or pushed to the colleague's repository; this repository and its remotes carry everything. The folder's own .gitignore keeps build output, downloaded components and private key material out, as it did there; the committed file set is identical to that repository's tracked files. The ESP32-C5 is still flashed from obu-firmware/, which only takes vanetza-idf from microbu-esp32c5/, so the two stay separate folders. FLASHING.md says how to take a newer version of the colleague's tree (copy it over the folder, rebuild, test, commit).
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#ifndef SERIALIZATION_BUFFER_HPP_8G2XAHRG
|
|
#define SERIALIZATION_BUFFER_HPP_8G2XAHRG
|
|
|
|
#include <vanetza/common/byte_buffer.hpp>
|
|
#include <vanetza/common/byte_buffer_sink.hpp>
|
|
#include <vanetza/common/byte_buffer_source.hpp>
|
|
#include <vanetza/geonet/serialization.hpp>
|
|
#include <boost/iostreams/stream_buffer.hpp>
|
|
|
|
namespace vanetza
|
|
{
|
|
namespace geonet
|
|
{
|
|
|
|
/**
|
|
* This function is deprecated.
|
|
* It will be removed as soon as geonet::serialize signatures are
|
|
* compatible with common::serialize_into_buffer
|
|
*/
|
|
template<typename T>
|
|
void serialize_into_buffer(const T& t, ByteBuffer& buf)
|
|
{
|
|
byte_buffer_sink sink(buf);
|
|
boost::iostreams::stream_buffer<byte_buffer_sink> stream(sink);
|
|
OutputArchive ar(stream);
|
|
serialize(t, ar);
|
|
}
|
|
|
|
/**
|
|
* This function is deprecated.
|
|
* It will be removed as soon as geonet::deserialize signatures are
|
|
* compatible with common::deserialize_into_buffer
|
|
*/
|
|
template<typename T>
|
|
void deserialize_from_buffer(T& t, const ByteBuffer& buf)
|
|
{
|
|
byte_buffer_source source(buf);
|
|
boost::iostreams::stream_buffer<byte_buffer_source> stream(source);
|
|
InputArchive ar(stream);
|
|
deserialize(t, ar);
|
|
}
|
|
|
|
} // namespace geonet
|
|
} // namespace vanetza
|
|
|
|
#endif /* SERIALIZATION_BUFFER_HPP_8G2XAHRG */
|
|
|