Drone Manager feature¶
- event message olympe.messages.drone_manager.authentication_failed(serial=None, model=None, name=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.authentication_failed
Authentication failed because of a wrong key (passphrase).
Parameters:
- serialstring
Serial number of the drone.
- modelu16
Model id of the drone.
- namestring
Name (SSID) of the drone.
- _policy
olympe.messaging.arsdk_expectations.ExpectPolicy specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Triggered: when trying to
connect()to a protected drone with a wrong key (passphrase)
- command message olympe.messages.drone_manager.connect(serial, key, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.connect
Request connection to a specific drone. Override the auto-selected drone.
Parameters:
- serialstring
Serial number of the drone.
- keystring
Security key (passphrase) to use. This arg is ignored if the drone security is ‘none’. If the drone manager has a saved key for the drone, pass an empty string to use it
- _timeoutint
command message timeout (defaults to 10)
- _no_expectbool
if True, do not expect the usual command expectation (defaults to False)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Result: The drone manager will send an update of its
connection_state(), if relevantExpectations:
connection_state(_policy='wait')
- event message olympe.messages.drone_manager.connection_refused(serial=None, model=None, name=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.connection_refused
Connection refused by the drone because another peer is already connected to.
Parameters:
- serialstring
Serial number of the drone.
- modelu16
Model id of the drone.
- namestring
Name (SSID) of the drone.
- _policy
olympe.messaging.arsdk_expectations.ExpectPolicy specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Triggered: Try to
connect()to a drone where another peer is already connected to.
- event message olympe.messages.drone_manager.connection_state(state=None, serial=None, model=None, name=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.connection_state
State of the connection.
Parameters:
- state
olympe.enums.drone_manager.connection_state Current state of the connection.
- serialstring
Serial number of the drone.
- modelu16
Model id of the drone.
- namestring
Name (SSID) of the drone.
- _policy
olympe.messaging.arsdk_expectations.ExpectPolicy specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Triggered: when the state changes. If the state is ‘searching’, all informations about the drone will refer to the last connected drone. Otherwise, these informations will refer to the active drone.
- state
- command message olympe.messages.drone_manager.discover_drones(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.discover_drones
The list will contain: * known drones not currently visible. * known drones currently visible. * unknown drones currently visible.
Parameters:
- _timeoutint
command message timeout (defaults to 10)
- _no_expectbool
if True, do not expect the usual command expectation (defaults to False)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Result: The drone manager will answer with a list of
drone_list_item()Expectations: (
drone_list_item(list_flags='Last', _policy='wait')|drone_list_item(list_flags='Empty', _policy='wait'))
- event message olympe.messages.drone_manager.drone_list_item(serial=None, model=None, name=None, connection_order=None, active=None, visible=None, security=None, has_saved_key=None, rssi=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.drone_list_item
Item describing a drone.
Parameters:
- serialstring
Serial number of the drone.
- modelu16
Model id of the drone.
- namestring
Name (SSID) of the drone.
- connection_orderu8
0 if the drone is unknown (never connected). Else, order of last connection (1 = most recent)
- activeu8
1 if the drone is active (the drone manager tries to connect or is connected to it) 0 if the drone is not the active one.
- visibleBitfieldOf(
olympe.enums.drone_manager.visible_state, u8) Whether the drone is cellular online and/or in wifi scan results.
- security
olympe.enums.drone_manager.security Security method used by the drone.
- has_saved_keyu8
1 if the drone manager has a saved security key for the drone, 0 otherwise. If security method is not ‘none’, and this value is 0, then the controller should prompt the user for a passphrase before sending a connect.
- rssii8
The drone rssi (wifi signal strength estimation). The value is meaningless if the drone is not visible.
list_flags : BitfieldOf(
olympe.enums.drone_manager.list_flags, u8)- _policy
olympe.messaging.arsdk_expectations.ExpectPolicy specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Triggered: when requested
discover_drones().
- command message olympe.messages.drone_manager.forget(serial, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.forget
Forget the given drone. If the drone is the selected one, the auto- selection will run again.
Parameters:
- serialstring
Serial number of the drone to forget.
- _timeoutint
command message timeout (defaults to 10)
- _no_expectbool
if True, do not expect the usual command expectation (defaults to False)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Result: The drone manager will send
known_drone_item()message.Expectations:
known_drone_item(serial=self.serial, _policy='wait')
- event message olympe.messages.drone_manager.known_drone_item(serial=None, model=None, name=None, security=None, has_saved_key=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09), _int_tol=0)¶
drone_manager.known_drone_item
Item describing a known drone (already connected).
Parameters:
- serialstring
Serial number of the drone.
- modelu16
Model id of the drone.
- namestring
Last visible Name (SSID) of the drone.
- security
olympe.enums.drone_manager.security Security method used by the drone.
- has_saved_keyu8
1 if the drone manager has a saved security key for the drone, 0 otherwise. If security method is not ‘none’, and this value is 0, then the controller should prompt the user for a passphrase before sending a connect.
list_flags : BitfieldOf(
olympe.enums.drone_manager.list_flags, u8)- _policy
olympe.messaging.arsdk_expectations.ExpectPolicy specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
- _float_toltuple
specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information
- _matching_mode
olympe.MatchingMode specify the expectation matching mode (default to
olympe.MatchingMode.pattern)- _int_tolint
specify the int comparison tolerance, an int containing an absolute tolerate int value (default to 0)
Supported by:
- SkyController3:
with an up to date firmware
Triggered: when
AllSettings()is requested or when a drone is forgotten or connected for the first time.
- enum olympe.enums.drone_manager.connection_state¶
The state of the connection to a drone.
- idle:
The drone manager do nothing (wait for command). (0)
- searching:
The drone manager is searching for a known drone. (1)
- connecting:
The drone manager is connecting to a drone. (2)
- connected:
The drone manager is connected to a drone. (3)
- disconnecting:
The drone manager is finishing the connection with the drone before taking further action. (4)
- enum olympe.enums.drone_manager.list_flags¶
Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages
- First:
Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (0)
- Last:
Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (1)
- Empty:
Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (2)
- Remove:
Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (3)
- enum olympe.enums.drone_manager.security¶
The security of the drone network.
- none:
The drone is not protected. (0)
- wpa2:
The drone is protected with Wpa2 (passphrase). (1)
- enum olympe.enums.drone_manager.visible_state¶
Whether the drone is cellular online and/or in wifi scan results.
- wifi_visible:
The drone is in scan results. (0)
- cellular_online:
The drone is cellular online. (1)