Shell¶
- class mavsdk.shell.Shell(async_plugin_manager)¶
Bases:
AsyncBase
Allow to communicate with the vehicle’s system shell.
Generated by dcsdkgen - MAVSDK Shell API
- name = 'Shell'¶
- async receive()¶
Receive feedback from a sent command line.
This subscription needs to be made before a command line is sent, otherwise, no response will be sent.
- Yields:
data (std::string) – Received data.
- async send(command)¶
Send a command line.
- Parameters:
command (std::string) – The command line to send
- Raises:
ShellError – If the request fails. The error contains the reason for the failure.
- exception mavsdk.shell.ShellError(result, origin, *params)¶
Bases:
Exception
Raised when a ShellResult is a fail code
- class mavsdk.shell.ShellResult(result, result_str)¶
Bases:
object
Result type.
- Parameters:
result (Result) – Result enum value
result_str (std::string) – Human-readable English string describing the result
- class Result(value)¶
Bases:
Enum
Possible results returned for shell requests
Values¶
- UNKNOWN
Unknown result
- SUCCESS
Request succeeded
- NO_SYSTEM
No system is connected
- CONNECTION_ERROR
Connection error
- NO_RESPONSE
Response was not received
- BUSY
Shell busy (transfer in progress)
- BUSY = 5¶
- CONNECTION_ERROR = 3¶
- NO_RESPONSE = 4¶
- NO_SYSTEM = 2¶
- SUCCESS = 1¶
- UNKNOWN = 0¶