From 63219e29a5da0c1b723d2b511ab2554a1ddc756a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 31 Jul 2017 15:20:39 +0200 Subject: odr-zmq2edi fix subchannel index, FICF --- src/zmq2edi/zmq2edi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/zmq2edi/zmq2edi.cpp b/src/zmq2edi/zmq2edi.cpp index 5fd02e2..1597f87 100644 --- a/src/zmq2edi/zmq2edi.cpp +++ b/src/zmq2edi/zmq2edi.cpp @@ -241,8 +241,8 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata) etiLog.level(warn) << "Frame FCT=" << fct << " does not correspond to DLFC=" << metadata.dlfc; } - bool ficf = (p[5] & 0x80) >> 7; + edi_tagDETI.ficf = ficf; const int nst = p[5] & 0x7F; @@ -267,6 +267,9 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata) std::vector stl(nst); // Loop over STC subchannels: for (int i=0; i < nst; i++) { + // EDI stream index is 1-indexed + const int edi_stream_id = i + 1; + uint32_t scid = (p[8 + 4*i] & 0xFC) >> 2; sad[i] = (p[8+4*i] & 0x03) * 256 + p[9+4*i]; uint32_t tpl = (p[10+4*i] & 0xFC) >> 2; @@ -274,7 +277,7 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata) p[11+4*i]; edi::TagESTn tag_ESTn; - tag_ESTn.id = i; + tag_ESTn.id = edi_stream_id; tag_ESTn.scid = scid; tag_ESTn.sad = sad[i]; tag_ESTn.tpl = tpl; -- cgit v1.2.3