summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/metadata.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-28 16:11:32 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-28 16:11:32 +0200
commit5d1b6420535c72d7a8df85a5db08ff1c0230690a (patch)
treef1263f6d67776b884fd484fdb87552a2fa147656 /src/dabOutput/metadata.h
parenta1921a1a967b65c99a830141e9faaecd77b0f317 (diff)
downloaddabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.tar.gz
dabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.tar.bz2
dabmux-5d1b6420535c72d7a8df85a5db08ff1c0230690a.zip
Add work in progress odr-zmq2edi
Diffstat (limited to 'src/dabOutput/metadata.h')
-rw-r--r--src/dabOutput/metadata.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/dabOutput/metadata.h b/src/dabOutput/metadata.h
index e250938..ed16de5 100644
--- a/src/dabOutput/metadata.h
+++ b/src/dabOutput/metadata.h
@@ -39,12 +39,18 @@
*/
enum class output_metadata_id_e {
+ // Contains no value, can be used to group fields
+ separation_marker = 0,
+
// TAI-UTC offset, value is int16_t.
utc_offset = 1,
/* EDI Time is the number of SI seconds since 2000-01-01 T 00:00:00 UTC.
* value is an uint32_t */
edi_time = 2,
+
+ /* The DLFC field from the EDI TAG deti. value is uint16_t */
+ dlfc = 3,
};
struct OutputMetadata {
@@ -58,6 +64,14 @@ struct OutputMetadata {
virtual size_t write(uint8_t *buf) = 0;
};
+struct OutputMetadataSeparation : public OutputMetadata {
+ explicit OutputMetadataSeparation() {}
+ output_metadata_id_e getId(void) const { return output_metadata_id_e::separation_marker; }
+ virtual size_t getLength(void) const { return 3; }
+ virtual size_t write(uint8_t *buf);
+};
+
+
struct OutputMetadataUTCO : public OutputMetadata {
explicit OutputMetadataUTCO(int16_t utco) : utco(utco) {}
output_metadata_id_e getId(void) const { return output_metadata_id_e::utc_offset; }
@@ -77,3 +91,13 @@ struct OutputMetadataEDITime : public OutputMetadata {
};
+struct OutputMetadataDLFC : public OutputMetadata {
+ explicit OutputMetadataDLFC(uint16_t dlfc) : dlfc(dlfc) {}
+ output_metadata_id_e getId(void) const { return output_metadata_id_e::dlfc; }
+ virtual size_t getLength(void) const { return 5; }
+ virtual size_t write(uint8_t *buf);
+
+ uint16_t dlfc;
+
+};
+