Functions | Variables
pymavlink::generator::mavgen_swift Namespace Reference

Functions

def append_static_code
def camel_case_from_underscores
def generate
def generate_enums
def generate_enums_info
def generate_header
def generate_message_crc_extra_array
def generate_message_lengths_array
def generate_message_mappings_array
def generate_messages
def generate_messages_info
def get_enum_raw_type
def lower_camel_case_from_underscores

Variables

list abbreviations = ["MAV", "PX4", "UDB", "PPZ", "PIXHAWK", "SLUGS", "FP", "ASLUAV", "VTOL", "ROI", "UART", "UDP", "IMU", "IMU2", "3D", "RC", "GPS", "GPS1", "GPS2", "NED", "RTK"]
dictionary swift_types
tuple t = mavtemplate.MAVTemplate()

Function Documentation

Open and copy static code from specified file

Definition at line 243 of file mavgen_swift.py.

Generate a CamelCase string from an underscore_string

Definition at line 304 of file mavgen_swift.py.

def pymavlink.generator.mavgen_swift.generate (   basename,
  xml_list 
)
Generate complete MAVLink Swift implemenation

Definition at line 407 of file mavgen_swift.py.

def pymavlink.generator.mavgen_swift.generate_enums (   outf,
  enums,
  msgs 
)
Iterate through all enums and create Swift equivalents

Definition at line 115 of file mavgen_swift.py.

Add camel case swift names for enums an entries, descriptions and sort enums alphabetically

Definition at line 328 of file mavgen_swift.py.

def pymavlink.generator.mavgen_swift.generate_header (   outf,
  filelist,
  xml 
)
Generate Swift file header with source files list and creation date

Definition at line 28 of file mavgen_swift.py.

Add array with CRC extra values to detect incompatible XML changes

Definition at line 288 of file mavgen_swift.py.

Create array with message lengths to validate known message lengths

Definition at line 271 of file mavgen_swift.py.

Create array for mapping message Ids to proper structs

Definition at line 255 of file mavgen_swift.py.

Generate Swift structs to represent all MAVLink messages

Definition at line 148 of file mavgen_swift.py.

Add proper formated variable names, initializers and type names to use in templates

Definition at line 364 of file mavgen_swift.py.

Search appropirate raw type for enums in messages fields

Definition at line 139 of file mavgen_swift.py.

Generate a lower-cased camelCase string from an underscore_string

Definition at line 318 of file mavgen_swift.py.


Variable Documentation

list pymavlink::generator::mavgen_swift::abbreviations = ["MAV", "PX4", "UDB", "PPZ", "PIXHAWK", "SLUGS", "FP", "ASLUAV", "VTOL", "ROI", "UART", "UDP", "IMU", "IMU2", "3D", "RC", "GPS", "GPS1", "GPS2", "NED", "RTK"]

Definition at line 12 of file mavgen_swift.py.

Initial value:
00001 {'char' : ("String", '"\\0"', "mavString(offset: %u, length: %u)"),
00002                'uint8_t' : ("UInt8", 0, "mavNumber(offset: %u)"),
00003                'int8_t' : ("Int8", 0, "mavNumber(offset: %u)"),
00004                'uint16_t' : ("UInt16", 0, "mavNumber(offset: %u)"),
00005                'int16_t' : ("Int16", 0, "mavNumber(offset: %u)"),
00006                'uint32_t' : ("UInt32", 0, "mavNumber(offset: %u)"),
00007                'int32_t' : ("Int32", 0, "mavNumber(offset: %u)"),
00008                'uint64_t' : ("UInt64", 0, "mavNumber(offset: %u)"),
00009                'int64_t' : ("Int64", 0, "mavNumber(offset: %u)"),
00010                'float' : ("Float", 0, "mavNumber(offset: %u)"),
00011                'double' : ("Double", 0, "mavNumber(offset: %u)"),
00012                'uint8_t_mavlink_version' : ("UInt8", 0, "mavNumber(offset: %u)")}

Definition at line 13 of file mavgen_swift.py.

Definition at line 26 of file mavgen_swift.py.



mavlink
Author(s): Lorenz Meier
autogenerated on Sun May 22 2016 04:05:44