summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/edi/AFPacket.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-22 11:38:14 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-08-22 11:38:14 +0200
commit7a056ef2cb94fb2fa45d8ecaed9dd97e99749fde (patch)
treedb39d470c3209f5385f53ae453321a9f5f2f2b16 /src/dabOutput/edi/AFPacket.cpp
parent4e141ca1ebc12b8d647ed62c2930bf41166a4583 (diff)
downloaddabmux-7a056ef2cb94fb2fa45d8ecaed9dd97e99749fde.tar.gz
dabmux-7a056ef2cb94fb2fa45d8ecaed9dd97e99749fde.tar.bz2
dabmux-7a056ef2cb94fb2fa45d8ecaed9dd97e99749fde.zip
Add experimental EDI to configuration file
Diffstat (limited to 'src/dabOutput/edi/AFPacket.cpp')
-rw-r--r--src/dabOutput/edi/AFPacket.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/dabOutput/edi/AFPacket.cpp b/src/dabOutput/edi/AFPacket.cpp
index ae2bdd6..3b69f1c 100644
--- a/src/dabOutput/edi/AFPacket.cpp
+++ b/src/dabOutput/edi/AFPacket.cpp
@@ -45,13 +45,16 @@ AFPacket AFPacketiser::Assemble(TagPacket tag_packet)
{
std::vector<uint8_t> payload = tag_packet.Assemble();
- std::cerr << "Assemble AFPacket " << seq << std::endl;
+ if (m_verbose)
+ std::cerr << "Assemble AFPacket " << seq << std::endl;
std::string pack_data("AF"); // SYNC
std::vector<uint8_t> packet(pack_data.begin(), pack_data.end());
uint32_t taglength = payload.size();
- std::cerr << " AFPacket payload size " << payload.size() << std::endl;
+
+ if (m_verbose)
+ std::cerr << " AFPacket payload size " << payload.size() << std::endl;
// write length into packet
packet.push_back((taglength >> 24) & 0xFF);
@@ -73,12 +76,14 @@ AFPacket AFPacketiser::Assemble(TagPacket tag_packet)
crc = crc16(crc, &(packet.front()), packet.size());
crc ^= 0xffff;
- fprintf(stderr, " AFPacket crc %x\n", crc);
+ if (m_verbose)
+ fprintf(stderr, " AFPacket crc %x\n", crc);
packet.push_back((crc >> 8) & 0xFF);
packet.push_back(crc & 0xFF);
- std::cerr << " AFPacket length " << packet.size() << std::endl;
+ if (m_verbose)
+ std::cerr << " AFPacket length " << packet.size() << std::endl;
return packet;
}