ud3tn/include/bundle7/timestamp.h
Maximilian Nitsch 2a981e86e2 Change DTN timestamp to milliseconds
To be compatible with the latest version of BPv7, the internal
representation of DTN timestamps, for both uD3TN and the Python library,
is changed to milliseconds.
For compatibility reasons, a conversion to seconds is performed during
the de-/serialization of BPv6.
Furthermore, additional test cases are added and the creation_time_ms of
the test bundle is set to a non-trivial timestamp.

Also, the Python functions for converting POSIX timestamps to DTN
timestamps are removed, as there is now a distinction between BPv6 and
BPv7 DTN timestamps. The conversion is now done in the corresponding BP
implementations themselves.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2021-01-14 14:42:55 +01:00

12 lines
267 B
C

#ifndef BUNDLE7_TIMESTAMP_H_INCLUDED
#define BUNDLE7_TIMESTAMP_H_INCLUDED
#include "cbor.h"
#include <stdint.h>
CborError bundle7_timestamp_parse(CborValue *it,
uint64_t *creation_timestamp_ms,
uint64_t *sequence_number);
#endif // BUNDLE7_TIMESTAMP_H_INCLUDED