From 1729acd9b72369af45ee5ed45a8d29642f3df367 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 6 Jun 2017 09:11:22 +0200 Subject: wip o Dropping Samsung-specific code, will be replaces by a small script. o Starting on some unit test code. --- include/decoder.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/decoder.h') 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 -- cgit v1.2.3