Keep vanetza-idf in obu-firmware, so a plain clone builds the firmware
obu-firmware builds against the vanetza-idf C-ITS library, which until now came from the colleague's microbu-esp32c5 tree beside the repository and was not tracked here, so a clone of this repository could not build the firmware it ships. The library alone is now part of obu-firmware, as obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from there by default; -DVANETZA_IDF_DIR still points the build elsewhere. The rest of the colleague's tree (their own VAM firmware, PKI tooling, station-link Python tools, the V2X2MAP bridge) stays out of this repository and gitignored; nothing is pushed to their repository. NOTES.md, docs/06, TODO.md and the pcap verifier's usage line point at the new location.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#ifndef PROXY_HEADER_HPP_JWTV3BDT
|
||||
#define PROXY_HEADER_HPP_JWTV3BDT
|
||||
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <vanetza/access/access_category.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
namespace vanetza
|
||||
{
|
||||
|
||||
#ifndef _MSC_VER
|
||||
// GCC and Clang support packed attribute
|
||||
#define PACKED_STRUCT(name, block) struct name { block } __attribute__((__packed__));
|
||||
#else
|
||||
// MSVC variant
|
||||
#define PACKED_STRUCT(name, block) \
|
||||
__pragma(pack(push, 1)) \
|
||||
struct name { block }; \
|
||||
__pragma(pack(pop))
|
||||
#endif
|
||||
|
||||
PACKED_STRUCT(ProxyHeader,
|
||||
/** offset in bytes to payload's first byte, counting from packet start */
|
||||
uint16_t payload_offset;
|
||||
|
||||
/** length of payload in bytes */
|
||||
uint32_t payload_size;
|
||||
|
||||
/** signal power in dBm, fixed point format 8.8 = trunc(double * 256) */
|
||||
int16_t signal_power;
|
||||
|
||||
/** access category (transmission only) */
|
||||
uint8_t access_category;
|
||||
)
|
||||
|
||||
static_assert(sizeof(ProxyHeader) == 9, "ProxyHeader has invalid size");
|
||||
|
||||
double get_signal_power(const ProxyHeader&);
|
||||
void set_signal_power(ProxyHeader&, double dbm);
|
||||
access::AccessCategory get_access_category(const ProxyHeader&);
|
||||
void set_access_category(ProxyHeader&, access::AccessCategory);
|
||||
boost::iterator_range<const uint8_t*> get_payload(const ProxyHeader&, std::size_t);
|
||||
void set_payload(ProxyHeader&, std::size_t);
|
||||
|
||||
} // namespace vanetza
|
||||
|
||||
#endif /* PROXY_HEADER_HPP_JWTV3BDT */
|
||||
|
||||
Reference in New Issue
Block a user