Move common matchers to PacketBuilder.

This commit is contained in:
Jared Boone
2015-11-16 10:33:50 -08:00
parent 9900c29283
commit 8967f0eaa1
2 changed files with 14 additions and 14 deletions
+14
View File
@@ -29,6 +29,20 @@
#include "bit_pattern.hpp"
struct NeverMatch {
bool operator()(const BitHistory&, const size_t) const {
return false;
}
};
struct FixedLength {
bool operator()(const BitHistory&, const size_t symbols_received) const {
return symbols_received >= length;
}
const size_t length;
};
template<typename PreambleMatcher, typename UnstuffMatcher, typename EndMatcher>
class PacketBuilder {
public: