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.
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
#ifndef PDU_HPP_PQEC9PDO
|
|
#define PDU_HPP_PQEC9PDO
|
|
|
|
#include <vanetza/geonet/header_variant.hpp>
|
|
#include <vanetza/geonet/serialization.hpp>
|
|
#include <vanetza/security/secured_message.hpp>
|
|
#include <cstddef>
|
|
#include <memory>
|
|
|
|
namespace vanetza
|
|
{
|
|
namespace geonet
|
|
{
|
|
|
|
struct BasicHeader;
|
|
struct CommonHeader;
|
|
|
|
class Pdu;
|
|
|
|
class ConstAccessiblePdu
|
|
{
|
|
public:
|
|
using SecuredMessage = security::SecuredMessage;
|
|
|
|
virtual const BasicHeader& basic() const = 0;
|
|
virtual const CommonHeader& common() const = 0;
|
|
virtual const SecuredMessage* secured() const = 0;
|
|
virtual HeaderConstRefVariant extended_variant() const = 0;
|
|
virtual std::unique_ptr<Pdu> clone() const = 0;
|
|
virtual ~ConstAccessiblePdu() = default;
|
|
};
|
|
|
|
class Pdu : public ConstAccessiblePdu
|
|
{
|
|
public:
|
|
using ConstAccessiblePdu::basic;
|
|
using ConstAccessiblePdu::common;
|
|
using ConstAccessiblePdu::secured;
|
|
|
|
virtual BasicHeader& basic() = 0;
|
|
virtual CommonHeader& common() = 0;
|
|
virtual SecuredMessage* secured() = 0;
|
|
virtual void secured(const SecuredMessage&) = 0;
|
|
};
|
|
|
|
void serialize(const ConstAccessiblePdu&, OutputArchive&);
|
|
inline void serialize(const Pdu& pdu, OutputArchive& ar)
|
|
{
|
|
serialize(static_cast<const ConstAccessiblePdu&>(pdu), ar);
|
|
}
|
|
|
|
std::size_t get_length(const ConstAccessiblePdu&);
|
|
|
|
} // namespace geonet
|
|
} // namespace vanetza
|
|
|
|
#endif /* PDU_HPP_PQEC9PDO */
|
|
|