public class MavlinkFiles
Utility class that provides methods to generate a MAVLink file from a list of
MavlinkCommand, and conversely,
parse a MAVLink file.
A MAVLink file contains a list of commands in a plain-text format, which forms a mission script. Note that supported MAVLink commands differ from official MAVLink common message set. For further information about supported MAVLink commands, please refer to Parrot FlightPlan MAVLink documentation.
Generates a MAVLink file from the given list of commands.
public static func generate(filepath: String, commands: [MavlinkCommand])
local path of the file to write
list of MAVLink commands
Parses a MAVLink file into a list of commands.
Any malformed command is simply ignored. If the given file is not properly formatted, this method returns an empty list.
public static func parse(filepath: String) -> [MavlinkCommand]
local path of the file to read
the command list extracted from the file