Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q&A #31

Closed
brucebookman opened this issue May 25, 2021 · 8 comments
Closed

Q&A #31

brucebookman opened this issue May 25, 2021 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@brucebookman
Copy link

Single Messages
"Supports single messages": Can someone recommend a library that decodes multi-line messages. Or is there a work around that can leverage pyais?

I have code that can collate the message parts and put them all together in any manner a library might require. All I need is one that then can decode.

Message types
"Currently, this module is able to decode most message types. There are only a few exceptions. "

Which specific messages are not decoded? I have a close to production need to decode everything. Any plan to add the messages types that are currently not decoded?

@brucebookman
Copy link
Author

P.S. libais, which is kinda out of date, seems to be able to decode every message type. Could you use that as a guide?

@M0r13n
Copy link
Owner

M0r13n commented May 25, 2021

Hey there,

pyais supports multi line messages. A simple example can be found here

Regarding your question of supported messages:

It supports all message types. But it can not decode message specific payloads. This should be done by the user.

@brucebookman
Copy link
Author

brucebookman commented May 25, 2021 via email

@brucebookman
Copy link
Author

brucebookman commented May 25, 2021 via email

@M0r13n
Copy link
Owner

M0r13n commented May 28, 2021

This applies to messages of type 6, 8, 25, and 26. These messages have in common, that they contain unspecified binary payload.

  • Message type 6: data field with up to 920 bits of binary payload
  • Message type 8: data field with up to 952 bits of binary payload
  • Message type 26: data field with up to 128 bits of binary payload
  • Message type 27: data fiield with up to 1004 bits of binary payload

The decoding of the binary payload is message dependent and varies between different systems. If we want to decode the binary payload of message type 6, we firstly would have to look at the dac (Designated Area Code) and the fid (Functional ID). Dependening of their values, we would know, how to interpret the payload.

There are a lot of different application-specific messages, which are more or less standardized. Therefore pyais does not even try to decode the payload. Instead, you can access the raw payload as a bit-string or a bitarray.

@brucebookman
Copy link
Author

brucebookman commented May 28, 2021 via email

@M0r13n
Copy link
Owner

M0r13n commented May 29, 2021

You are totally right. I will do this as soon as I can. I'll keep this issue open until then as a reminder for myself.

@M0r13n M0r13n self-assigned this May 29, 2021
@M0r13n M0r13n added the documentation Improvements or additions to documentation label May 29, 2021
@M0r13n
Copy link
Owner

M0r13n commented Jun 6, 2021

Closed with #35.

@M0r13n M0r13n closed this as completed Jun 6, 2021
jimbofreedman added a commit to Spot-Ship/pyais that referenced this issue Oct 15, 2024
chore: Black code formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants