summaryrefslogtreecommitdiffstats
path: root/lib/edi/STIWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/edi/STIWriter.cpp')
-rw-r--r--lib/edi/STIWriter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/edi/STIWriter.cpp b/lib/edi/STIWriter.cpp
index 399922a..ea3bfe8 100644
--- a/lib/edi/STIWriter.cpp
+++ b/lib/edi/STIWriter.cpp
@@ -53,6 +53,7 @@ void STIWriter::reinit()
m_stat_valid = false;
m_time_valid = false;
m_payload_valid = false;
+ m_audio_levels = audio_level_data();
m_stiFrame.frame.clear();
}
@@ -84,6 +85,16 @@ void STIWriter::add_payload(sti_payload_data&& payload)
m_payload_valid = true;
}
+void STIWriter::update_audio_levels(const audio_level_data& data)
+{
+ m_audio_levels = data;
+}
+
+void STIWriter::update_odr_version(const odr_version_data& data)
+{
+ m_version_data = data;
+}
+
void STIWriter::update_edi_time(
uint32_t utco,
uint32_t seconds)
@@ -118,6 +129,8 @@ void STIWriter::assemble()
// Do copies so as to preserve existing payload data
m_stiFrame.frame = m_payload.istd;
+ m_stiFrame.audio_levels = m_audio_levels;
+ m_stiFrame.version_data = m_version_data;
m_stiFrame.timestamp.seconds = m_seconds;
m_stiFrame.timestamp.utco = m_utco;
m_stiFrame.timestamp.tsta = m_management_data.tsta;