Commands server
Use ICommandServer to implement low-level command protocol handling on the server side.
Use case
Register the service:
Then get the service:
Basic handling example:
Here we are using CommandResult to send a response.
API
ICommandServer
Represents a command server that receives and sends commands.
Property | Type | Description |
|---|---|---|
|
| Gets the event stream for receiving |
|
| Gets an observable sequence of |
Method | Return Type | Description |
|---|---|---|
|
| Sends a command acknowledgement with the specified parameters. |
ICommandServer.SendCommandAck
Parameter | Type | Description |
|---|---|---|
|
| The command being acknowledged. |
|
| The target device identity for the acknowledgement. |
|
| The result of the command execution. |
|
| Optional cancellation token. |
DeviceIdentity
Represents the identity of a device.
Constructor | Description |
|---|---|
| Represents a device identity. |
| Initializes a new instance of the |
Property | Type | Description |
|---|---|---|
|
| Represents the broadcast device identity. |
|
| Gets or sets the system ID. |
|
| Gets or sets the unique identifier for the component. |
CommandServerHelper
Helper class containing extension methods for ICommandServer interface.
Method | Return Type | Description |
|---|---|---|
|
| Sends command acknowledge accepted to the command server. |
|
| Sends a command acknowledgment indicating that the command has been accepted. |
ICommandServer.SendCommandAckAccepted (CommandIntPacket overload)
Parameter | Type | Description |
|---|---|---|
|
| The command server. |
|
| The command request packet. |
|
| The mav result. |
|
| Optional cancel token argument. |
ICommandServer.SendCommandAckAccepted (CommandLongPacket overload)
Parameter | Type | Description |
|---|---|---|
|
| The command server. |
|
| The command long packet. |
|
| The result of the command. |
|
| Optional cancel token argument. |
CommandHelper
Provides helper methods for registering and accessing command-related microservices, including base command server and extended CommandLong/CommandInt handlers.
Property | Type | Description |
|---|---|---|
|
| Represents the broadcast device identity. |
Method | Return Type | Description |
|---|---|---|
|
| Registers |
|
| Registers |
|
| Registers |
|
| Resolves |
|
| Resolves |
|
| Resolves |