Interface ICodeHandler
- Namespace
- DuetControlServer.Codes.Handlers
- Assembly
- DuetControlServer.dll
Interface for code handlers that process codes sent to the control server
public interface ICodeHandler
Methods
CodeExecutedAsync(Code, CancellationToken)
React to an executed code before its result is returned
ValueTask CodeExecutedAsync(Code code, CancellationToken cancellationToken)
Parameters
codeCodeCode processed by RepRapFirmware
cancellationTokenCancellationTokenCancellation token
Returns
- ValueTask
Result to output
ProcessAsync(Code, CancellationToken)
Process a code that should be interpreted by the control server
ValueTask<Message?> ProcessAsync(Code code, CancellationToken cancellationToken)
Parameters
codeCodeCode to process
cancellationTokenCancellationTokenCancellation token