MavlinkCommand

public class MavlinkCommand : Equatable, Encodable

A MAVLink command.

Parrot FlightPlan Mavlink documentation.

Clients of this API cannot instantiate this class directly, and must use one of the subclasses defining a specific MAVLink command. If a subclass does not describe the command you want to use use OtherMavlinkCommand.

  • Parse related errors when creating or parsing MavlinkCommands.

    See more

    Declaration

    Swift

    public enum ParseError : Error, Equatable
  • The reference frame of the command.

    See more

    Declaration

    Swift

    public enum Frame : UInt, Equatable
  • The MAVLink command type.

    Declaration

    Swift

    public let rawType: Int
  • The coordinate frame; set to global coordinate frame or relative altitude over ground.

    Declaration

    Swift

    public let frame: Frame
  • The raw parameters of the command.

    Declaration

    Swift

    public let parameters: [Double]
  • Whether to autocontinue or not.

    Declaration

    Swift

    public var autocontinue: Int { get }
  • Declaration

    Swift

    public static func == (lhs: MavlinkCommand, rhs: MavlinkCommand) -> Bool
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws

Factory methods

  • Create a MAVLink command.

    Throws

    MavlinkStandard.MavlinkCommand.ParseError if the parameters are wrong.

    Declaration

    Swift

    public static func create(rawType: Int, frame: Frame,
                              parameters: [Double]) throws -> MavlinkStandard.MavlinkCommand

    Parameters

    rawType

    the integer that describes the type of the MAVLink command.

    frame

    the reference frame of the coordinates.

    parameters

    the raw parameters of the command.

    Return Value

    A MAVLink command.