Table of Contents

Class CodeParserBuffer

Namespace
DuetAPI.Commands
Assembly
DuetAPI.dll

Internal buffer for reading asynchronously from files

public sealed class CodeParserBuffer
Inheritance
CodeParserBuffer
Inherited Members

Constructors

CodeParserBuffer(int, bool)

Internal buffer for reading asynchronously from files

public CodeParserBuffer(int bufferSize, bool isFile)

Parameters

bufferSize int

How many bytes to buffer when reading from a file

isFile bool

Indicates if line numbers and file positions are valid

Fields

LastGCode

Last major G-code to repeat

public int LastGCode

Field Value

int

LineNumber

Current line number

public long? LineNumber

Field Value

long?

MayRepeatCode

Indicates if the last code may be repeated as per Fanuc or LaserWeb style

public bool MayRepeatCode

Field Value

bool

Methods

GetPosition(Stream)

Get the actual byte position when reading from a stream

public long GetPosition(Stream stream)

Parameters

stream Stream

Stream to read from

Returns

long

Actual position in bytes

Invalidate()

Invalidate the buffer

public void Invalidate()