Abstract packet type/implementation details.

This commit is contained in:
Jared Boone
2015-12-07 12:35:05 -08:00
parent b9ea7fa786
commit bd33e652ea
16 changed files with 129 additions and 90 deletions
+5 -6
View File
@@ -27,6 +27,8 @@
#include <bitset>
#include <string>
#include "packet.hpp"
class ManchesterDecoder {
public:
struct DecodedSymbol {
@@ -35,11 +37,9 @@ public:
};
constexpr ManchesterDecoder(
const std::bitset<1024>& encoded,
const size_t count,
const ::Packet& packet,
const size_t sense = 0
) : encoded { encoded },
count { count },
) : packet { packet },
sense { sense }
{
}
@@ -49,8 +49,7 @@ public:
size_t symbols_count() const;
private:
const std::bitset<1024>& encoded;
const size_t count;
const ::Packet& packet;
const size_t sense;
};