CommandResult
Represents a command execution result that is sent in COMMAND_ACK.
Use case
You can use CommandResult when sending an ACK to the client from the server:
ServerEx handler example:
API
CommandResult
Represents the result of a command execution.
Constructor | Description |
|---|---|
| Represents the result of a command. |
CommandResult exposes a set of pre-allocated singleton instances for supported MavResult values, avoiding unnecessary allocations in hot paths. Each instance is lazy-initialized on first access.
Property | Underlying |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For each of the above, a corresponding Task<CommandResult> singleton is also available by appending Task to the property name (e.g. AcceptedTask, FailedTask). These are pre-completed tasks wrapping the respective instance, intended for use in synchronous-path async implementations to avoid Task.FromResult allocations.
Property | Type | Description |
|---|---|---|
|
| Gets or sets the second result parameter. |
|
| Gets the result code of a MAV operation. |
|
| Gets the result value. |
|
| Gets the progress of the property. |
Method | Return Type | Description |
|---|---|---|
|
| Returns a cached singleton |
|
| Returns a cached singleton |
CommandResult.FromResult
Parameter | Type | Description |
|---|---|---|
|
| The MAVLink result code to convert. |
CommandResult.AsTaskResult
Parameter | Type | Description |
|---|---|---|
|
| The MAVLink result code to convert. |