mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-11 17:19:29 +00:00
Abstract packet type/implementation details.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user