Replies: 2 comments 1 reply
-
Hello,
instructions on how to generate Golang structs for custom dialects are in the README: You need a dialect definition in XML format. For more informations about the XML format, you can check files of existing dialects:
A frame contains a message. Beside the message, it also contains the message author (system ID and component ID), the message checksum and a sequence number that is increased sequentially. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the reply. I think i phrased my question wrong using the word generate. I was looking for a method or function that would return a frame for transport passing in a func (r *Reader) ReadFrom(buf *bufio.Reader) (*V2Frame, error) {
r.br = bufio.NewReaderSize(buf, bufferSize)
f, err := r.Read()
return f, err
} This allows you to get a frame ready for transport that is decoupled form an underlying transport method. The existing methods all seem to assume a frame or a message was being received from somewhere whether it be UDP, Serial, etc. By decoupling this I can integrte it with something like ROS2. If I justplain missed another way to do this please show me. Again thank you. |
Beta Was this translation helpful? Give feedback.
-
I was trying to use the examples to generate and read a Message. I see in one of the examples you have a snippet that does this for ardupilot dialect but for the life of me I could not figure out how to do this for a generic dialect.
Overall I am trying to create a message and broadcast it over udp to be received by any /all other nodes on the net.
Along those lines Im kind of unclear on what is the difference between a frame and a message? Im assuming that a message is part of a frame where a frame is what the mavlink docs refer to as a packet?
Beta Was this translation helpful? Give feedback.
All reactions