diff options
author | KuntzeM <github@kuntze.email> | 2020-03-17 16:37:42 +0100 |
---|---|---|
committer | KuntzeM <github@kuntze.email> | 2020-03-17 16:37:42 +0100 |
commit | f97de5d4b6b6d77dfbe7e50432a8b3057e9361f8 (patch) | |
tree | 57db198462a1a651a11a50d52ad9e42cab187134 | |
parent | aba6f8678180a88c397f2f41b1b750be264882d4 (diff) | |
download | dabmux-f97de5d4b6b6d77dfbe7e50432a8b3057e9361f8.tar.gz dabmux-f97de5d4b6b6d77dfbe7e50432a8b3057e9361f8.tar.bz2 dabmux-f97de5d4b6b6d77dfbe7e50432a8b3057e9361f8.zip |
change FIG 0/0 alarm flag if an alarm cluster available in mux
-rw-r--r-- | src/ConfigParser.cpp | 5 | ||||
-rw-r--r-- | src/MuxElements.h | 4 | ||||
-rw-r--r-- | src/fig/FIG0_0.cpp | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index dd0041e..538cb76 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -509,6 +509,11 @@ static void parse_general(ptree& pt, throw runtime_error("Announcement cluster id " + to_string(cl->cluster_id) + " is not allowed"); } + if (cl->cluster_id == 255) { + etiLog.level(debug) << + "Alarm flag for FIG 0/0 is set 1, because announcement group with cluster id oxFF is found."; + ensemble->alarm_flag = 1; + } cl->flags = get_announcement_flag_from_ptree( pt_announcement.get_child("flags")); cl->subchanneluid = pt_announcement.get<string>("subchannel"); diff --git a/src/MuxElements.h b/src/MuxElements.h index 55bddaf..3640e6c 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -337,6 +337,10 @@ class dabEnsemble : public RemoteControllable { static constexpr int RECONFIG_COUNTER_HASH = -2; int reconfig_counter = RECONFIG_COUNTER_DISABLED; + // alarm flag is use for AL flag in FIG 0/0. + // set to true if one announcement group with cluster ID 0xFF is available in multiplex file + bool alarm_flag = 0; + vec_sp_service services; vec_sp_component components; vec_sp_subchannel subchannels; diff --git a/src/fig/FIG0_0.cpp b/src/fig/FIG0_0.cpp index 9a99984..a793b98 100644 --- a/src/fig/FIG0_0.cpp +++ b/src/fig/FIG0_0.cpp @@ -67,7 +67,7 @@ FillStatus FIG0_0::fill(uint8_t *buf, size_t max_size) fig0_0->EId = htons(m_rti->ensemble->id); fig0_0->Change = 0; - fig0_0->Al = 0; + fig0_0->Al = m_rti->ensemble->alarm_flag; fig0_0->CIFcnt_hight = (m_rti->currentFrame / 250) % 20; fig0_0->CIFcnt_low = (m_rti->currentFrame % 250); |