Keep the colleague's microbu-esp32c5 tree in this repository
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).
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#ifndef BYTE_BUFFER_SOURCE_HPP_6IBYOI0T
|
||||
#define BYTE_BUFFER_SOURCE_HPP_6IBYOI0T
|
||||
|
||||
#include <vanetza/common/byte_buffer.hpp>
|
||||
#include <boost/iostreams/categories.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
|
||||
namespace vanetza
|
||||
{
|
||||
|
||||
/**
|
||||
* Implementation of boost::iostreams' source device concept.
|
||||
* Allows to use a byte buffer as input stream.
|
||||
*/
|
||||
class byte_buffer_source
|
||||
{
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef boost::iostreams::source_tag category;
|
||||
typedef ByteBuffer::const_iterator iterator;
|
||||
typedef boost::iterator_range<iterator> range;
|
||||
|
||||
static_assert(sizeof(char_type) == sizeof(ByteBuffer::value_type),
|
||||
"size mismatch of char_type and ByteBuffer::value_type");
|
||||
|
||||
byte_buffer_source(const ByteBuffer& buffer);
|
||||
byte_buffer_source(range r);
|
||||
byte_buffer_source(iterator begin, iterator end);
|
||||
std::streamsize read(char_type* buf, std::streamsize n);
|
||||
|
||||
private:
|
||||
iterator m_begin;
|
||||
iterator m_end;
|
||||
};
|
||||
|
||||
} // namespace vanetza
|
||||
|
||||
#endif /* BYTE_BUFFER_SOURCE_HPP_6IBYOI0T */
|
||||
|
||||
Reference in New Issue
Block a user