Releases: M0r13n/pyais
Releases · M0r13n/pyais
Bug fix: Rename shipname to name for type 21
Release version 2.0.0
- WARNING: The v2 release will introduce breaking changes
- Introduces the possibility to encode messages
- decoding has been rewritten and implements an iterative decoding approach
- The following fields were renamed:
- message_fragments -> frag_cnt
- fragment_number -> frag_num
- message_id -> seq_id
- type -> msg_type
- shiptype -> ship_type
msg.decode()
does not return apyais.messages.AISMessage
instance anymore- instead an instance of
pyais.messages.MessageTypeX
is returned, whereX
is the type of the message (1-27)
- instead an instance of
- in v1 you called
decoded.content
to get the decoded message as a dictionary - this is nowdecoded.asdict()
Add bounds check for variable length messages
- Correctly handles variable length messages (#40)
- prior versions were missing required length checks
- therefore some messages were not correctly decoded
- this affects Type 7, 15, 16, 20, 22, 24, 25 and 26
Better error messages for `decode_msg`
v1.6.2 Raise a meaningful exception if 'decode_msg' is used improperly (#38)
Bugfixes
Make NMEAMessage subscriptable
- Makes
NMEAMessage
subscribable - Adds documentation on readthedocs.org
- Renames instance attributes of
NMEAMessage
:- msg_type to type
- count to message_fragments
- index to fragment_number
- seq_id to message_id
- data to payload#
- Adds fill_bits field to NMEAMessage
Improve stability
This release improves the stability. This includes:
- more gentle stream like objects
- invalid checksums are logged but do not cause errors
- the class
NMEAMessage
is more restrictive in what it accepts - better type hints
- additional type checks
- more unittests
Add a commandline utility (`ais-decode`)
-
Pyais comes with a commandline utility now
ais-decode
can decode single messages or files- you can read from a TCP/UDP socket from the terminal
- no need to write Python code
-
Improves Socket API
Mark package as typed
Thanks to the work of @mjakob the package is now strictly typed and also marked as typed. So every dependent code can profit from the type hints.
These changes should be non-breaking and therefore no issues are expected.