Vanetza
Loading...
Searching...
No Matches
path_history.ipp
1#include <vanetza/asn1/asn1c_wrapper.hpp>
2#include <vanetza/asn1/its/BasicVehicleContainerLowFrequency.h>
3#include <vanetza/asn1/its/PathHistory.h>
4#include <vanetza/asn1/its/r2/BasicVehicleContainerLowFrequency.h>
5#include <vanetza/asn1/its/r2/Path.h>
6#include <vanetza/asn1/its/r2/PathHistory.h>
7#include <vanetza/facilities/detail/macros.ipp>
8#include <vanetza/facilities/detail/path_history.tpp>
9
10namespace vanetza
11{
12namespace facilities
13{
14
15static_assert(DeltaLongitude_oneMicrodegreeEast == 10, "DeltaLongitude is an integer number of tenth microdegrees");
16static_assert(DeltaLatitude_oneMicrodegreeNorth == 10, "DeltaLatitude is an integer number of tenth microdegrees");
17static_assert(PathDeltaTime_tenMilliSecondsInPast == 1, "PathDeltaTime encodes 10ms steps");
18
19void copy(const facilities::PathHistory& src, ASN1_PREFIXED(PathHistory_t)& dest)
20{
21 copy<ASN1_PREFIXED(PathHistory_t), ASN1_PREFIXED(PathPoint_t)>(src, dest);
22}
23
24#if ITS_RELEASE != 1
25// no Path_t in ITS Release 1 ASN.1
26void copy(const facilities::PathHistory& src, ASN1_PREFIXED(Path_t)& dest)
27{
28 copy<ASN1_PREFIXED(Path_t), ASN1_PREFIXED(PathPoint_t)>(src, dest);
29}
30#endif
31
32void copy(const facilities::PathHistory& ph, ASN1_PREFIXED(BasicVehicleContainerLowFrequency)& container)
33{
34 copy(ph, container.pathHistory);
35}
36
37} // namespace facilities
38} // namespace vanetza