Skip to content

Reference

Core Classes

  • Device Manager
  • Winwing Device
  • Device Driver
    • HID Device
  • Helper classes
    • Aircraft
    • Action
    • Report

Implementation Example

  • Winwing Device / MCDU
  • HID Device / MCDU
  • Aircraft / MCDUAircraft
  • Aircraft / MCDUAircraft / ToLissAirbus

Device Manager

Winwing Device

WinwingDevice

WinwingDevice(vendor_id: int, product_id: int)

Methods:

on_dataref_update abstractmethod

on_dataref_update(dataref: str, value)

Stop device handling

run abstractmethod

run()

Starts device handling

set_api abstractmethod

set_api(api)

Stop device handling

terminate abstractmethod

terminate()

Stop device handling

Device Driver

DeviceDriver

DeviceDriver()

HID Device

HIDDevice

HIDDevice(vendor_id: int, product_id: int)

Winwing Device

WinwingDevice

WinwingDevice(vendor_id: int, product_id: int)

Methods:

on_dataref_update abstractmethod

on_dataref_update(dataref: str, value)

Stop device handling

run abstractmethod

run()

Starts device handling

set_api abstractmethod

set_api(api)

Stop device handling

terminate abstractmethod

terminate()

Stop device handling

Helper Classes

Aircraft

Aircraft

Aircraft(author: str, icao: str, variant: str = '')

Methods:

  • adapters

    Returns the list of all subclasses of Aircraft.

  • datarefs

    Returns all datarefs used by this aircraft configuration and that may be requested to the simulator

  • device_reports

    Returns key mapping.

  • display_datarefs

    Returns datarefs necessary to drive entire display content

  • init

    Convenience function that can be used to adjust aircraft properties

  • new

    Create aircraft for supplied (author, icao)

  • same_variant

    Compare two aicraft variants if they are set.

  • simulator_reports

    Returns simulator feedback for device handling.

  • variant_datarefs

    Returns list of datarefs necessary for variant determination.

  • variant_key

    Build variant string from variant dataref values

  • wait_for_aircraft_variant

    Wait for value of aicraft variant datarefs

adapters staticmethod

adapters() -> list

Returns the list of all subclasses of Aircraft.

Recurses through all sub-sub classes

Returns:

  • list

    [list]: list of all Aircraft subclasses

Raises:

  • ValueError

    If invalid class found in recursion (types, etc.)

datarefs

datarefs() -> Set[str]

Returns all datarefs used by this aircraft configuration and that may be requested to the simulator

Returns

List[str]: list of all datarefs used by this configuration

device_reports

device_reports() -> List

Returns key mapping.

Supplied information is sufficient to perform necessary action for key.

Returns

List[Dict]:

display_datarefs

display_datarefs() -> Set[str]

Returns datarefs necessary to drive entire display content

Returns

List[str]: list of datarefs used for display

init

init(device: WinwingDevice) -> bool

Convenience function that can be used to adjust aircraft properties depending on device and/or API used

Parameters:

Returns:

  • bool ( bool ) –

    success of initialisation

new staticmethod

new(author: str, icao: str, variant: str = '', extension_paths: List[str] = [])

Create aircraft for supplied (author, icao)

If no device aircraft can be found, returns None

Parameters:

  • author

    (str) –

    Author of aircraft

  • icao

    (str) –

    Aircraft ICAO

Returns:

same_variant

same_variant(variant) -> bool

Compare two aicraft variants if they are set.

If one if not set, returns that they are equivalent.

returns:

(bool): Aircraft variants equivalence

simulator_reports

simulator_reports() -> List

Returns simulator feedback for device handling.

Supplied information is sufficient to perform necessary action for key.

Returns

List[Dict]:

variant_datarefs

variant_datarefs() -> Set[str]

Returns list of datarefs necessary for variant determination.

returns (Set): List of datarefs necessary for variant determination

variant_key

variant_key() -> str

Build variant string from variant dataref values

This allows to inspect one or more datarefs and determine the aicraft variant from those datarefs.

Returns:

  • str

    Variant identification

wait_for_aircraft_variant

wait_for_aircraft_variant(api)

Wait for value of aicraft variant datarefs

Action

Action

Action(name: str, config: dict)

Report

Report

Report(name: str, key: str, action: Action)

Parameters:

  • name

    (str) –

    Name of report, documentation

  • key

    (str) –

    Access key of report, used to identify it