mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-01-13 09:33:38 +00:00
AIS: Add MMSI type.
This commit is contained in:
parent
ad22eab3d2
commit
0909cdb31e
@ -224,7 +224,11 @@ uint32_t Packet::message_id() const {
|
|||||||
return field_.read(0, 6);
|
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);
|
return field_.read(8, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ struct DateTime {
|
|||||||
using Latitude = int32_t;
|
using Latitude = int32_t;
|
||||||
using Longitude = int32_t;
|
using Longitude = int32_t;
|
||||||
|
|
||||||
|
using MMSI = uint32_t;
|
||||||
|
|
||||||
class Packet {
|
class Packet {
|
||||||
public:
|
public:
|
||||||
constexpr Packet(
|
constexpr Packet(
|
||||||
@ -72,7 +74,8 @@ public:
|
|||||||
bool is_valid() const;
|
bool is_valid() const;
|
||||||
|
|
||||||
uint32_t message_id() 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;
|
uint32_t read(const size_t start_bit, const size_t length) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user