AIS: Add MMSI type.

This commit is contained in:
Jared Boone 2015-12-02 22:39:05 -08:00
parent ad22eab3d2
commit 0909cdb31e
2 changed files with 9 additions and 2 deletions

View File

@ -224,7 +224,11 @@ uint32_t Packet::message_id() const {
return field_.read(0, 6);
}
uint32_t Packet::source_id() const {
MMSI Packet::user_id() const {
return field_.read(8, 30);
}
MMSI Packet::source_id() const {
return field_.read(8, 30);
}

View File

@ -56,6 +56,8 @@ struct DateTime {
using Latitude = int32_t;
using Longitude = int32_t;
using MMSI = uint32_t;
class Packet {
public:
constexpr Packet(
@ -72,7 +74,8 @@ public:
bool is_valid() const;
uint32_t message_id() const;
uint32_t source_id() const;
MMSI user_id() const;
MMSI source_id() const;
uint32_t read(const size_t start_bit, const size_t length) const;