diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-15 11:53:55 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-08-15 11:53:55 +0200 |
commit | 55a66f6408042abfd102f92fd0072a000d8e0235 (patch) | |
tree | 12269221fd70e6a2a33a9e68aeecbbfb9fed1014 /src/fig/FIG0.cpp | |
parent | 3dab3da3f669e1f2c70fd81c13f67c9c5c77278a (diff) | |
download | dabmux-55a66f6408042abfd102f92fd0072a000d8e0235.tar.gz dabmux-55a66f6408042abfd102f92fd0072a000d8e0235.tar.bz2 dabmux-55a66f6408042abfd102f92fd0072a000d8e0235.zip |
Add cluster handling for announcements
Diffstat (limited to 'src/fig/FIG0.cpp')
-rw-r--r-- | src/fig/FIG0.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fig/FIG0.cpp b/src/fig/FIG0.cpp index 7cb3dde..9f89109 100644 --- a/src/fig/FIG0.cpp +++ b/src/fig/FIG0.cpp @@ -953,8 +953,7 @@ FillStatus FIG0_18::fill(uint8_t *buf, size_t max_size) continue; } - // TODO support more than one cluster - const int numclusters = 1; + const ssize_t numclusters = (*service)->clusters.size(); if (remaining < (int)sizeof(FIGtype0_18) + numclusters) { break; @@ -982,8 +981,10 @@ FillStatus FIG0_18::fill(uint8_t *buf, size_t max_size) programme->Rfa = 0; programme->NumClusters = numclusters; buf += sizeof(FIGtype0_18); - buf[0] = 0x1; // TODO support not only cluster 1 - buf += numclusters; + + for (uint8_t cluster : (*service)->clusters) { + *(buf++) = cluster; + } fig0->Length += sizeof(FIGtype0_18) + numclusters; remaining -= sizeof(FIGtype0_18) + numclusters; |