mavlink v0.7.0 MAVLink.Parser View Source
Parse a mavlink xml file into an idiomatic Elixir representation:
%{
version: 2,
dialect: 0,
enums: [
%{
name: :mav_autopilot,
description: "Micro air vehicle...",
entries: [
%{
value: 0,
name: :mav_autopilot_generic, (use atoms for identifiers)
description: "Generic autopilot..."
params: [ (only used by commands)
%{
index: 0,
description: ""
},
... more entry params
]
},
... more enum entries
]
},
... more enums
],
messages: [
%{
id: 0,
name: "optical_flow",
description: "Optical flow...",
fields: [
%{
type: "uint16_t",
ordinality: 1,
name: "flow_x",
units: "dpixels", (note: string not atom)
description: "Flow in pixels..."
},
... more message fields
]
},
... more messages
]
}
Link to this section Summary
Link to this section Types
Link to this type
entry_description()
View Source
entry_description()
View Source
entry_description() :: %{
value: integer() | nil,
name: atom(),
description: String.t(),
params: [param_description()]
}
entry_description() :: %{ value: integer() | nil, name: atom(), description: String.t(), params: [param_description()] }
Link to this type
enum_description()
View Source
enum_description()
View Source
enum_description() :: %{
name: atom(),
description: String.t(),
entries: [entry_description()]
}
enum_description() :: %{ name: atom(), description: String.t(), entries: [entry_description()] }
Link to this type
field_description() View Source
Link to this type
message_description()
View Source
message_description()
View Source
message_description() :: %{
id: integer(),
name: String.t(),
description: String.t(),
has_ext_fields: boolean(),
fields: [field_description()]
}
message_description() :: %{ id: integer(), name: String.t(), description: String.t(), has_ext_fields: boolean(), fields: [field_description()] }
Link to this type
param_description() View Source
Link to this section Functions
Link to this function
combine_definitions(list) View Source
Link to this function
merge_enums(as, bs) View Source
Link to this function
parse_mavlink_xml(path)
View Source
parse_mavlink_xml(path)
View Source
parse_mavlink_xml(String.t()) ::
%{
version: integer(),
dialect: integer(),
enums: [enum_description()],
messages: [message_description()]
}
| {:error, :enoent}
parse_mavlink_xml(String.t()) :: %{ version: integer(), dialect: integer(), enums: [enum_description()], messages: [message_description()] } | {:error, :enoent}
Link to this function
parse_mavlink_xml(path, paths) View Source
Link to this macro
xmlAttribute(args \\ []) View Source (macro)
Link to this macro
xmlAttribute(record, args) View Source (macro)
Link to this macro
xmlElement(args \\ []) View Source (macro)
Link to this macro
xmlElement(record, args) View Source (macro)
Link to this macro
xmlText(args \\ []) View Source (macro)
Link to this macro