Class Command
- Namespace
- DuetControlServer.IPC.Processors
- Assembly
- DuetControlServer.dll
Command interpreter for client requests
public sealed class Command : IProcessor
- Inheritance
-
Command
- Implements
- Inherited Members
Constructors
Command(Connection, ClientInitMessage, ILogger<Command>)
Constructor of the command interpreter
public Command(Connection conn, ClientInitMessage initMessage, ILogger<Command> logger)
Parameters
connConnectionConnection instance
initMessageClientInitMessageInitialization message from the client
loggerILogger<Command>Logger instance
Properties
Connection
Connection to the IPC client served by this processor
public Connection Connection { get; }
Property Value
SupportedCommands
List of supported commands in this mode
public static Type[] SupportedCommands { get; }
Property Value
- Type[]
Methods
ProcessAsync(CancellationToken)
Reads incoming command requests and processes them. See DuetAPI.Commands namespace for a list of supported commands. The actual implementations can be found in DuetControlServer.Commands.
public Task ProcessAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancellation token to cancel the worker
Returns
- Task
Asynchronous task