Table of Contents

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

conn Connection

Connection instance

initMessage ClientInitMessage

Initialization message from the client

logger ILogger<Command>

Logger instance

Properties

Connection

Connection to the IPC client served by this processor

public Connection Connection { get; }

Property Value

Connection

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

cancellationToken CancellationToken

Cancellation token to cancel the worker

Returns

Task

Asynchronous task