summaryrefslogtreecommitdiff
path: root/include/decoder.h
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-06-06 09:11:22 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-06-06 09:11:22 +0200
commit1729acd9b72369af45ee5ed45a8d29642f3df367 (patch)
tree652f3f679b27287c9be6d3ea0676188f87fa5f33 /include/decoder.h
parent4ee01dab6105e346b731a13321a3e6a5d111d3e4 (diff)
downloadradio-controller-1729acd9b72369af45ee5ed45a8d29642f3df367.tar.gz
radio-controller-1729acd9b72369af45ee5ed45a8d29642f3df367.tar.bz2
radio-controller-1729acd9b72369af45ee5ed45a8d29642f3df367.tar.xz
radio-controller-1729acd9b72369af45ee5ed45a8d29642f3df367.zip
wip
o Dropping Samsung-specific code, will be replaces by a small script. o Starting on some unit test code.
Diffstat (limited to 'include/decoder.h')
-rw-r--r--include/decoder.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/decoder.h b/include/decoder.h
index 4ae723c..a9b4217 100644
--- a/include/decoder.h
+++ b/include/decoder.h
@@ -109,17 +109,22 @@ class decoding_result {
public:
decoding_state state;
bit_string data;
+ int field1;
+ int field2;
+ int field3;
- decoding_result(decoding_state state) : state(state), data()
+ decoding_result() : state(decoding_state::OK), data(), field1(0), field2(0), field3(0)
{}
- decoding_result(decoding_state state, bit_string data) : state(state), data(data)
- {}
+ void fail()
+ {
+ state = decoding_state::FAIL;
+ }
};
class decoder {
public:
- virtual decoding_result decode(sample_iterator *it) = 0;
+ virtual decoding_result decode(sample_iterator &it) = 0;
};
} // namespace radio_controller