Skip to content

Commit

Permalink
asn1: update ITS message wrappers for Release 2 messages
Browse files Browse the repository at this point in the history
  • Loading branch information
riebl committed Oct 17, 2024
1 parent 946a7e0 commit 9ca0d3b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
22 changes: 21 additions & 1 deletion vanetza/asn1/cam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,41 @@
#include <vanetza/asn1/asn1c_conversion.hpp>
#include <vanetza/asn1/asn1c_wrapper.hpp>
#include <vanetza/asn1/its/CAM.h>
#include <vanetza/asn1/its/r2/CAM.h>

namespace vanetza
{
namespace asn1
{

namespace r1
{

class Cam : public asn1c_per_wrapper<CAM_t>
{
public:
using wrapper = asn1c_per_wrapper<CAM_t>;
Cam() : wrapper(asn_DEF_CAM) {}
};

} // namespace r1

namespace r2
{

class Cam : public asn1c_per_wrapper<Vanetza_ITS2_CAM_t>
{
public:
using wrapper = asn1c_per_wrapper<Vanetza_ITS2_CAM_t>;
Cam() : wrapper(asn_DEF_Vanetza_ITS2_CAM) {}
};

} // namespace r2

// alias for backward compatibility
using Cam = r1::Cam;

} // namespace asn1
} // namespace vanetza

#endif /* CAM_HPP_WXYNEKFN */

21 changes: 20 additions & 1 deletion vanetza/asn1/cpm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,39 @@
#include <vanetza/asn1/asn1c_conversion.hpp>
#include <vanetza/asn1/asn1c_wrapper.hpp>
#include <vanetza/asn1/its/CPM.h>
#include <vanetza/asn1/its/r2/CollectivePerceptionMessage.h>

namespace vanetza
{
namespace asn1
{

namespace r1
{

class Cpm : public asn1c_per_wrapper<CPM_t>
{
public:
Cpm() : asn1c_per_wrapper(asn_DEF_CPM) {}
};

} // namespace r1

namespace r2
{

class Cpm : public asn1c_per_wrapper<Vanetza_ITS2_CollectivePerceptionMessage_t>
{
public:
Cpm() : asn1c_per_wrapper(asn_DEF_Vanetza_ITS2_CollectivePerceptionMessage) {}
};

} // namespace r2

// alias for backward compatibility
using Cpm = r1::Cpm;

} // namespace asn1
} // namespace vanetza

#endif /* CPM_HPP_WEWZK69S */

22 changes: 21 additions & 1 deletion vanetza/asn1/denm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,41 @@
#include <vanetza/asn1/asn1c_conversion.hpp>
#include <vanetza/asn1/asn1c_wrapper.hpp>
#include <vanetza/asn1/its/DENM.h>
#include <vanetza/asn1/its/r2/DENM.h>

namespace vanetza
{
namespace asn1
{

namespace r1
{

class Denm : public asn1c_per_wrapper<DENM_t>
{
public:
using wrapper = asn1c_per_wrapper<DENM_t>;
Denm() : wrapper(asn_DEF_DENM) {}
};

} // namespace r1

namespace r2
{

class Denm : public asn1c_per_wrapper<Vanetza_ITS2_DENM_t>
{
public:
using wrapper = asn1c_per_wrapper<Vanetza_ITS2_DENM_t>;
Denm() : wrapper(asn_DEF_Vanetza_ITS2_DENM) {}
};

} // namespace r2

// alias for backward compatibility
using Denm = r1::Denm;

} // namespace asn1
} // namespace vanetza

#endif /* DENM_HPP_XGC8NRDI */

0 comments on commit 9ca0d3b

Please sign in to comment.