summaryrefslogtreecommitdiffstats
path: root/src/fig/FIG.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:05:33 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:05:33 +0200
commit8f347e6eeb809cd51a561768619e0a64c86a469e (patch)
tree0e20aeccbb33aafc07d50abfe9f129de33c108f9 /src/fig/FIG.h
parent43c436d9150057019cfb2638f076ab1fe09266b8 (diff)
downloaddabmux-8f347e6eeb809cd51a561768619e0a64c86a469e.tar.gz
dabmux-8f347e6eeb809cd51a561768619e0a64c86a469e.tar.bz2
dabmux-8f347e6eeb809cd51a561768619e0a64c86a469e.zip
Add FIG FillStatus
Diffstat (limited to 'src/fig/FIG.h')
-rw-r--r--src/fig/FIG.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/fig/FIG.h b/src/fig/FIG.h
index 4e6c20f..7f6e499 100644
--- a/src/fig/FIG.h
+++ b/src/fig/FIG.h
@@ -73,10 +73,23 @@ inline int rate_increment_ms(FIG_rate rate)
return 1000; //some default value, shouldn't be used
}
+/* The fill function of each FIG shall return a status telling
+ * the carousel how many bytes have been written, and if the complete
+ * set of information from that FIG was transmitted.
+ */
+struct FillStatus
+{
+ FillStatus() :
+ num_bytes_written(0),
+ complete_fig_transmitted(false) {}
+ size_t num_bytes_written;
+ bool complete_fig_transmitted;
+};
+
class IFIG
{
public:
- virtual size_t fill(uint8_t *buf, size_t max_size) = 0;
+ virtual FillStatus fill(uint8_t *buf, size_t max_size) = 0;
virtual FIG_rate repetition_rate(void) = 0;