aboutsummaryrefslogtreecommitdiff
path: root/sensor/include
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-07-21 11:26:42 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-07-21 11:26:42 +0200
commita0d83abee95e0ba7fcb882c970a76576cd3afb81 (patch)
tree06e3b53e32ce4eee61f6a2bd9c4dbaed6424323c /sensor/include
parent5dbc69fb16c71c02859ec8665c55a1e2b068ddd7 (diff)
downloadble-toys-a0d83abee95e0ba7fcb882c970a76576cd3afb81.tar.gz
ble-toys-a0d83abee95e0ba7fcb882c970a76576cd3afb81.tar.bz2
ble-toys-a0d83abee95e0ba7fcb882c970a76576cd3afb81.tar.xz
ble-toys-a0d83abee95e0ba7fcb882c970a76576cd3afb81.zip
Fixing two bugs in mqtt-publish:
o The last character after EOF was parsed twice. o Create a separate counter for unacked messages instead of checking want_write.
Diffstat (limited to 'sensor/include')
-rw-r--r--sensor/include/trygvis/sensor/io.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sensor/include/trygvis/sensor/io.h b/sensor/include/trygvis/sensor/io.h
index dd1460b..71b0b84 100644
--- a/sensor/include/trygvis/sensor/io.h
+++ b/sensor/include/trygvis/sensor/io.h
@@ -208,6 +208,12 @@ class SampleStreamParser {
public:
virtual int process(mutable_buffers_1 &buffer) = 0;
+ /**
+ * Tells the parser that the data that has been written so far either "is it" (there is no more input) or that
+ * it should just process what it has so far. It is ok to call process() after again after this method.
+ *
+ * TODO: should probably be renamed to "process()", "flush()" or "done()".
+ */
virtual int finish() = 0;
virtual sample_format_type type() {