Consolidate AIS Packet types.

This commit is contained in:
Jared Boone 2015-12-08 15:54:35 -08:00
parent 3e0acc9988
commit 644d3837ff
2 changed files with 2 additions and 3 deletions

View File

@ -27,8 +27,6 @@
namespace ais {
using CRCFieldReader = ::FieldReader<baseband::Packet, BitRemapNone>;
struct PacketLengthRange {
constexpr PacketLengthRange(
) : min_bytes { 0 },
@ -190,7 +188,7 @@ Longitude Packet::longitude(const size_t start_bit) const {
}
bool Packet::crc_ok() const {
CRCFieldReader field_crc { packet_ };
CRCReader field_crc { packet_ };
CRC<uint16_t> ais_fcs { 0x1021, 0xffff, 0xffff };
for(size_t i=0; i<data_length(); i+=8) {

View File

@ -82,6 +82,7 @@ public:
private:
using Reader = FieldReader<baseband::Packet, BitRemapByteReverse>;
using CRCReader = FieldReader<baseband::Packet, BitRemapNone>;
const baseband::Packet packet_;
const rtc::RTC received_at_;