Class PipelineStackItem
Class representing an execution level on a given pipeline. This is the effective target for incoming codes
Inherited Members
Namespace: DuetControlServer.Codes.Pipelines
Assembly: DuetControlServer.dll
Syntax
public class PipelineStackItem
Constructors
PipelineStackItem(PipelineBase, CodeFile?)
Constructor of this class
Declaration
public PipelineStackItem(PipelineBase pipeline, CodeFile? file)
Parameters
Type | Name | Description |
---|---|---|
PipelineBase | pipeline | Pipeline holding this stack item |
CodeFile | file | Current file or null if not present |
Fields
CodeBeingExecuted
Current code being executed. This is not applicable on the Firmware stage because we buffer multiple codes there
Declaration
public Code? CodeBeingExecuted
Field Value
Type | Description |
---|---|
Code |
File
Code file corresponding to this stack item
Declaration
public CodeFile? File
Field Value
Type | Description |
---|---|
CodeFile |
PendingCodes
Pending codes to be executed
Declaration
public readonly Channel<Code> PendingCodes
Field Value
Type | Description |
---|---|
Channel<Code> |
Properties
Busy
Indicates if the pipeline state is busy processing codes
Declaration
public bool Busy { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
FlushAsync()
Wait for the pipeline state to finish processing codes
Declaration
public Task<bool> FlushAsync()
Returns
Type | Description |
---|---|
Task<bool> | Whether the codes have been flushed successfully |
FlushAsync(Code)
Wait for the pipeline state to finish processing codes
Declaration
public Task<bool> FlushAsync(Code code)
Parameters
Type | Name | Description |
---|---|---|
Code | code | Code waiting for the flush |
Returns
Type | Description |
---|---|
Task<bool> | Whether the codes have been flushed successfully |
WriteCode(Code)
Enqueue a given code on this pipeline state for execution
Declaration
public void WriteCode(Code code)
Parameters
Type | Name | Description |
---|---|---|
Code | code | Code to enqueue |
WriteCodeAsync(Code)
Enqueue a given code asynchrously on this pipeline state for execution
Declaration
public ValueTask WriteCodeAsync(Code code)
Parameters
Type | Name | Description |
---|---|---|
Code | code | Code to enqueue |
Returns
Type | Description |
---|---|
ValueTask | Asynchronous task |