UserStorage feature

event messageolympe.messages.user_storage.info(name=None, capacity=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Info

Information on user-storage

Parameters
  • name (string) – The name of the media.

  • capacity (u64) – The capacity of the media in Bytes.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered During formatting, on ready state, or if user storage is not available.

event messageolympe.messages.user_storage.monitor(available_bytes=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Monitor

Monitoring event advertising available space

Parameters
  • available_bytes (u64) – The free space in Bytes on the media.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered By a start monitoring command start_monitoring(). This event is sent every monitor_period (see state() until the stop monitoring command stop_monitoring() is received.

event messageolympe.messages.user_storage.state(physical_state=None, file_system_state=None, attribute=None, monitor_enabled=None, monitor_period=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.State

State of user-storage

Parameters
  • physical_state (olympe.enums.user_storage.phy_state) – The state of the physical media.

  • file_system_state (olympe.enums.user_storage.fs_state) – The state of the data stored on media.

  • attribute (BitfieldOf(olympe.enums.user_storage.attribute, u8)) – Details about removable storage.

  • monitor_enabled (u8) – Boolean. 1 if monitoring is enabled, 0 if not.

  • monitor_period (u8) – Current period of monitoring if monitoring is enabled, 0 if not enabled.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered During connection and when user storage internal state changes.

command messageolympe.messages.user_storage.format(label, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

User_storage.Format

Start format operation on the removable media. This could imply its repartitioning if needed. Can be done in state format_needed or, if capabilities() contains format_when_ready_allowed also in state ready.

Parameters
  • label (string) – Label to set to the file system. If empty, label is set to the product name.

  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – 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

Result: Event state is triggered once operation is performed. Event progress is triggered once the operation has been started if capabilities() contains format_progress_evt_supported

Expectations: state(file_system_state='ready', _policy='wait')

command messageolympe.messages.user_storage.start_monitoring(period, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

User_storage.Start_monitoring

Start monitoring operation of the removable media.

Parameters
  • period (u8) – Period in seconds to send monitor events. If set to 0, period is set to default value (one second).

  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – 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

Result: Monitor Events monitor() are triggered.

Expectations: monitor(_policy='wait')

command messageolympe.messages.user_storage.stop_monitoring(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

User_storage.Stop_monitoring

Stop monitoring operation of the removable media.

Parameters
  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – 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

Result: Monitor Events monitor() are stopped from being triggered.

event messageolympe.messages.user_storage.format_result(result=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Format_result

Result of the formatting command

Parameters
  • result (olympe.enums.user_storage.formatting_result) – Result of the last formatting command

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered By a formatting command format() or a formatting with type command format_with_type() only if this event is supported by the drone. To know if supported, see if capabilities() contains format_result_evt_supported.

event messageolympe.messages.user_storage.capabilities(supported_features=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Capabilities

Describes user storage supported capabilities.

Parameters
  • supported_features (BitfieldOf(olympe.enums.user_storage.feature, u16)) – Supported features.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered only during the connection

event messageolympe.messages.user_storage.supported_formatting_types(supported_types=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Supported_formatting_types

Describes user storage supported formatting types. When sent, it indicates that the format_with_type command is supported. If not sent, the format_with_type command is not supported.

Parameters
  • supported_types (BitfieldOf(olympe.enums.user_storage.formatting_type, u8)) – Supported formatting types.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered only during the connection

command messageolympe.messages.user_storage.format_with_type(label, type, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

User_storage.Format_with_type

Start format operation on the removable media given a formatting type. This could imply its repartitioning if needed. Can be done in state format_needed or, if capabilities() contains format_when_ready_allowed also in state ready.

Parameters
  • label (string) – Label to set to the file system. If empty, label is set to the product name.

  • type (olympe.enums.user_storage.formatting_type) – Formatting type.

  • _timeout (int) – command message timeout (defaults to 10)

  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)

  • _float_tol (tuple) – 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

Result: Event state is triggered once operation is performed. Event progress is triggered once the operation has been started if capabilities() contains format_progress_evt_supported

Expectations: state(file_system_state='ready', _policy='wait') & format_result(result='success', _policy='wait') & format_progress(_policy='wait')

event messageolympe.messages.user_storage.format_progress(step=None, percentage=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

User_storage.Format_progress

Progress of the formatting command

Parameters
  • step (olympe.enums.user_storage.formatting_step) – The formatting step the format process is in.

  • percentage (u8) – The progress of the current step expressed in percent.

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – 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

Triggered By a formatting command format() or a formatting with type command format_with_type() only if this event is supported by the drone. To know if supported, see if capabilities() contains format_progress_evt_supported.

enumolympe.enums.user_storage.phy_state
undetected

The removable media is not detected. (0)

too_small

The removable media is too small for operation. (1)

too_slow

The removable media is too slow for operation. (2)

available

The removable media is detected. (3)

usb_mass_storage

The removable media is used by mass-storage gadget. (4)

enumolympe.enums.user_storage.fs_state
unknown

The media file system state is not known (yet) (0)

format_needed

The media file system is not supported, unformatted or capacity is too low. (1)

formatting

The media file system is getting formatted. (2)

ready

The media file system is ready to be used. (3)

error

The media file system is not available. (4)

enumolympe.enums.user_storage.attribute
low_perf

The removable media has low performance. (0)

enumolympe.enums.user_storage.formatting_result
error

The last formatting command failed (0)

denied

The last formatting command was denied (1)

success

The last formatting command succeeded (2)

enumolympe.enums.user_storage.feature
format_when_ready_allowed

Format is available when state is ready (and also, as usual when state is format_needed). (0)

format_result_evt_supported

The format result event is supported and will be sent after a format has been asked. (1)

format_progress_evt_supported

The format progress event is supported and will be sent during format operation. (2)

enumolympe.enums.user_storage.formatting_type
full

Formatting which includes deep format operation that is time consuming but optimizes performance. (0)

quick

Formatting which removes content of the media. (1)

enumolympe.enums.user_storage.formatting_step
partitioning

The drone is currently partitioning the media. (0)

clearing_data

The drone is currently wiping data on the media in order to optimize performance. (1)

creating_fs

The drone is creating a file system on the media. (2)

enumolympe.enums.user_storage.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)