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,69 @@
|
||||
#ifndef TRAILER_FIELD_HPP_3PDKGWCQ
|
||||
#define TRAILER_FIELD_HPP_3PDKGWCQ
|
||||
|
||||
#include <vanetza/common/byte_buffer.hpp>
|
||||
#include <vanetza/security/v2/signature.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
namespace vanetza
|
||||
{
|
||||
namespace security
|
||||
{
|
||||
namespace v2
|
||||
{
|
||||
|
||||
/// TrailerFieldType specified in TS 103 097 v1.2.1, section 5.7
|
||||
enum class TrailerFieldType : uint8_t
|
||||
{
|
||||
Signature = 1
|
||||
};
|
||||
|
||||
/// TrailerField specified in TS 103 097 v1.2.1, section 5.6
|
||||
using TrailerField = boost::variant<Signature>;
|
||||
|
||||
/**
|
||||
* \brief Determines TrailerFieldType to a given TrailerField
|
||||
* \param field
|
||||
* \return type
|
||||
*/
|
||||
TrailerFieldType get_type(const TrailerField&);
|
||||
|
||||
/**
|
||||
* \brief Calculates size of a TrailerField
|
||||
* \param field
|
||||
* \return number of octets needed to serialize the TrailerField
|
||||
*/
|
||||
size_t get_size(const TrailerField&);
|
||||
|
||||
/**
|
||||
* \brief Serializes a TrailerField into a binary archive
|
||||
* \param ar to serialize in
|
||||
* \param field to serialize
|
||||
*/
|
||||
void serialize(OutputArchive&, const TrailerField&);
|
||||
|
||||
/**
|
||||
* \brief Deserializes a TrailerField from a binary archive
|
||||
* \param ar with a serialized TrailerField at the beginning
|
||||
* \param field to deserialize
|
||||
* \return size of the deserialized TrailerField
|
||||
*/
|
||||
size_t deserialize(InputArchive&, TrailerField&);
|
||||
|
||||
/**
|
||||
* \brief resolve type for matching TrailerFieldType
|
||||
*
|
||||
* This is kind of the reverse function of get_type(const TrailerField&)
|
||||
*/
|
||||
template<TrailerFieldType>
|
||||
struct trailer_field_type;
|
||||
|
||||
template<>
|
||||
struct trailer_field_type<TrailerFieldType::Signature> { using type = Signature; };
|
||||
|
||||
} // namespace v2
|
||||
} // namespace security
|
||||
} // namespace vanetza
|
||||
|
||||
#endif /* TRAILER_FIELD_HPP_3PDKGWCQ */
|
||||
Reference in New Issue
Block a user