Skip to main content

encode_message

Function encode_message 

Source
pub fn encode_message<M: Message>(header: Header, message: &M) -> Result<Frame>
Expand description

Builds a v2 frame carrying a typed message.

§Arguments

  • header - the addressing fields to stamp on the frame.
  • message - the message to send.

§Returns

The frame ready to send.

§Errors

Returns MavlinkError::PayloadTooLong if the message does not fit a frame.