Documentation ¶
Overview ¶
Package message contains the message definition and its parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message interface {
GetID() uint32
}
Message is the interface that must be implemented by all Mavlink messages. Furthermore, any message struct must be labeled "MessageNameOfMessage".
type MessageRaw ¶
MessageRaw is a special struct that contains an unencoded message. It is used:
* as intermediate step in the encoding/decoding process
* when the parser receives an unknown message
func (*MessageRaw) GetID ¶
func (m *MessageRaw) GetID() uint32
GetID implements the Message interface.
type ReadWriter ¶
type ReadWriter struct {
// contains filtered or unexported fields
}
ReadWriter is a Message Reader and Writer.
func NewReadWriter ¶
func NewReadWriter(msg Message) (*ReadWriter, error)
NewReadWriter allocates a ReadWriter.
func (*ReadWriter) CRCExtra ¶
func (mde *ReadWriter) CRCExtra() byte
CRCExtra returns the CRC extra of the message.
func (*ReadWriter) Read ¶
func (mde *ReadWriter) Read(m *MessageRaw, isV2 bool) (Message, error)
Read converts a *MessageRaw into a Message.
func (*ReadWriter) Write ¶
func (mde *ReadWriter) Write(msg Message, isV2 bool) *MessageRaw
Write converts a Message into a *MessageRaw.