Class CodeStream
Command interpreter for code streams
Inherited Members
Namespace: DuetControlServer.IPC.Processors
Assembly: DuetControlServer.dll
Syntax
public sealed class CodeStream : Base
Constructors
CodeStream(Connection, ClientInitMessage)
Constructor of the code stream interpreter
Declaration
public CodeStream(Connection conn, ClientInitMessage initMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| Connection | conn | Connection instance |
| ClientInitMessage | initMessage | Initialization message from the client |
Fields
SupportedCommands
List of supported commands in this mode. This is not really used because this mode reads lines and no JSON objects
Declaration
public static readonly Type[] SupportedCommands
Field Value
| Type | Description |
|---|---|
| Type[] |
Properties
HasClientsWaitingForMessages
Check if there are any clients waiting for generic messages
Declaration
public static bool HasClientsWaitingForMessages { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
Process()
Reads incoming codes and processes them asynchronously
Declaration
public override Task Process()
Returns
| Type | Description |
|---|---|
| Task | Asynchronous task |
Overrides
RecordMessage(MessageTypeFlags, Message)
Record a new message based on the message flags
Declaration
public static void RecordMessage(MessageTypeFlags flags, Message message)
Parameters
| Type | Name | Description |
|---|---|---|
| MessageTypeFlags | flags | Message flags |
| Message | message |