Expand description
C FFI bindings for the aivdm AIS decoder.
Exposes a decode-only subset of aivdm’s API: decode a single-fragment
!AIVDM/!AIVDO line into an opaque message handle, then read common
fields (MMSI, position, speed, course, heading, navigational status) off
it. See include/aivdm.h for the generated C declarations.
This crate is a plain (non-no_std) library: it targets host
environments linking a shared or static C library, not the embedded
no_alloc use case aivdm itself supports. Embedded consumers should use
the aivdm Rust crate directly.
Structs§
- Aivdm
Message - Opaque handle to a decoded AIS message, owned by the caller until freed
with
aivdm_message_free.
Enums§
- Aivdm
Error - Error codes returned by
aivdm_decode_line.
Functions§
- aivdm_
decode_ ⚠line - Decodes a single, complete, single-fragment
!AIVDM/!AIVDOline. - aivdm_
message_ ⚠cog_ degrees - Reads course over ground, in degrees, off a message.
- aivdm_
message_ ⚠free - Frees a message handle returned by
aivdm_decode_line. Passing NULL is a no-op. - aivdm_
message_ ⚠heading_ degrees - Reads true heading, in whole degrees (0-359), off a message.
- aivdm_
message_ ⚠mmsi - The source station MMSI.
- aivdm_
message_ ⚠navigation_ status - Reads the raw navigational status code (0-15, ITU-R M.1371 Table 45) off a message.
- aivdm_
message_ ⚠position - Reads the position, in decimal degrees, off a message.
- aivdm_
message_ ⚠repeat_ indicator - How many times a repeater has relayed this message (0-3).
- aivdm_
message_ ⚠sog_ knots - Reads speed over ground, in knots, off a message.
- aivdm_
message_ ⚠type - The ITU-R M.1371 message type number (1-27) of a decoded message.
- aivdm_
version - The
aivdmcrate version, as a NUL-terminated, statically allocated string (e.g."0.1.0"). Do not free.