mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 17:17:42 +00:00
AIS: Add MMSI type.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user