• DuetAPI
  • DuetAPIClient
  • DuetControlServer
  • DuetWebServer
Show / Hide Table of Contents
  • DuetAPI
    • CodeChannel
  • DuetAPI.Commands
    • Acknowledge
    • AddHttpEndpoint
    • AddUserSession
    • BaseCommand
    • BaseResponse
    • Cancel
    • Code
    • CodeFlags
    • CodeParameter
    • CodeParameterConverter
    • CodeParserBuffer
    • CodeParserException
    • CodeResult
    • CodeType
    • Command
    • Command<T>
    • ErrorResponse
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetMachineModel
    • HttpResponseType
    • Ignore
    • KeywordType
    • LockMachineModel
    • PatchMachineModel
    • ReceivedHttpRequest
    • RemoveHttpEndpoint
    • RemoveUserSession
    • Resolve
    • ResolvePath
    • Response<T>
    • SendHttpResponse
    • SetMachineModel
    • SimpleCode
    • SyncMachineModel
    • UnlockMachineModel
    • WriteMessage
  • DuetAPI.Connection
    • ConnectionMode
    • Defaults
    • IncompatibleVersionException
    • InterceptionMode
    • SubscriptionMode
  • DuetAPI.Connection.InitMessages
    • ClientInitMessage
    • CommandInitMessage
    • InterceptInitMessage
    • ServerInitMessage
    • SubscribeInitMessage
  • DuetAPI.Machine
    • AccessLevel
    • AnalogSensor
    • AnalogSensorType
    • AnalogSensorTypeConverter
    • Axis
    • BeepRequest
    • Board
    • BoardState
    • Build
    • BuildObject
    • Compatibility
    • CoreKinematics
    • CurrentMove
    • DAA
    • DeltaKinematics
    • DeltaTower
    • Directories
    • DistanceUnit
    • Endstop
    • EndstopType
    • Extruder
    • ExtruderNonlinear
    • Fan
    • FanThermostaticControl
    • FilamentMonitor
    • FilamentMonitorType
    • GpInputPort
    • GpOutputPort
    • HangprinterKinematics
    • Heat
    • Heater
    • HeaterModel
    • HeaterModelPID
    • HeaterMonitor
    • HeaterMonitorAction
    • HeaterMonitorCondition
    • HeaterState
    • HttpEndpoint
    • HttpEndpointType
    • InputChannel
    • InputChannelState
    • Inputs
    • InterfaceType
    • Job
    • Kinematics
    • KinematicsName
    • KinematicsNameConverter
    • LaserFilamentMonitor
    • LaserFilamentMonitorCalibrated
    • LaserFilamentMonitorConfigured
    • Layer
    • Limits
    • LinuxPropertyAttribute
    • MachineMode
    • MachineModel
    • MachineModelConverter
    • MachineStatus
    • Message
    • MessageBox
    • MessageBoxMode
    • MessageType
    • Microstepping
    • MinMaxCurrent<T>
    • ModelCollection
    • ModelCollection<T>
    • ModelGrowingCollection
    • ModelGrowingCollection<T>
    • ModelObject
    • MotorsIdleControl
    • Move
    • MoveCalibration
    • MoveCompensation
    • MoveCompensationType
    • MoveDeviations
    • Network
    • NetworkInterface
    • NetworkProtocol
    • ParsedFileInfo
    • Probe
    • ProbeGrid
    • ProbeType
    • PulsedFilamentMonitor
    • PulsedFilamentMonitorCalibrated
    • PulsedFilamentMonitorConfigured
    • RestorePoint
    • RotatingMagnetFilamentMonitor
    • RotatingMagnetFilamentMonitorCalibrated
    • RotatingMagnetFilamentMonitorConfigured
    • Scanner
    • ScannerStatus
    • ScaraKinematics
    • Sensors
    • SessionType
    • SimpleFilamentMonitor
    • Skew
    • Spindle
    • State
    • TiltCorrection
    • TimesLeft
    • Tool
    • ToolRetraction
    • ToolState
    • UserSession
    • UserVariable
    • Volume
    • ZLeadscrewKinematics
  • DuetAPI.Utility
    • DriverId
    • FileLists
    • Heightmap
    • JsonCamelCaseStringEnumConverter
    • JsonCharEnumConverter
    • JsonHelper
    • JsonLowerCaseStringEnumConverter
    • JsonPolymorphicWriteOnlyConverter<T>
    • JsonRegexListConverter
  • DuetAPIClient
    • BaseCommandConnection
    • BaseConnection
    • CommandConnection
    • HttpEndpointConnection
    • HttpEndpointUnixSocket
    • HttpEndpointUnixSocket.EndpointRequestReceived
    • InterceptConnection
    • InternalServerException
    • SubscribeConnection
  • DuetControlServer
    • Program
    • Settings
  • DuetControlServer.Codes
    • GCodes
    • MCodes
    • TCodes
  • DuetControlServer.Commands
    • AddHttpEndpoint
    • AddUserSession
    • Code
    • EvaluateExpression
    • Flush
    • GetFileInfo
    • GetMachineModel
    • LockMachineModel
    • RemoveHttpEndpoint
    • RemoveUserSession
    • ResolvePath
    • SetMachineModel
    • SimpleCode
    • SyncMachineModel
    • UnlockMachineModel
    • WriteMessage
  • DuetControlServer.FileExecution
    • Job
    • Macro
  • DuetControlServer.Files
    • CodeBlock
    • CodeFile
    • ConfigOverride
    • FileDirectory
    • FilePath
    • InfoParser
  • DuetControlServer.IPC
    • Connection
    • LockManager
    • Server
  • DuetControlServer.IPC.Processors
    • Base
    • Command
    • Interception
    • Subscription
  • DuetControlServer.Model
    • Expressions
    • Filter
    • ItemPathNode
    • Observer
    • Observer.PropertyPathChanged
    • PeriodicUpdater
    • PropertyChangeType
    • Provider
    • Updater
  • DuetControlServer.SPI
    • DataTransfer
    • EvaluateExpressionRequest
    • Interface
  • DuetControlServer.SPI.Channel
    • LockRequest
    • Manager
    • Processor
    • State
  • DuetControlServer.SPI.Communication
    • Consts
  • DuetControlServer.SPI.Communication.FirmwareRequests
    • AbortFileHeader
    • CodeBufferUpdateHeader
    • DoCodeHeader
    • EvaluationResultHeader
    • ExecuteMacroHeader
    • FileChunkHeader
    • PrintPausedHeader
    • PrintPausedReason
    • Request
  • DuetControlServer.SPI.Communication.LinuxRequests
    • AssignFilamentHeader
    • CodeFlags
    • CodeHeader
    • CodeParameter
    • FileChunk
    • GetObjectModelHeader
    • MacroCompleteHeader
    • PrintStartedHeader
    • PrintStoppedHeader
    • Request
    • SetObjectModelHeader
  • DuetControlServer.SPI.Communication.Shared
    • CodeChannelHeader
    • DataType
    • HeightMapHeader
    • MessageHeader
    • MessageTypeFlags
    • PacketHeader
    • PrintStoppedReason
    • StringHeader
    • TransferHeader
    • TransferResponse
  • DuetControlServer.SPI.Serialization
    • Reader
    • Writer
  • DuetControlServer.Utility
    • CRC16
    • FilamentManager
    • Logger
  • DuetWebServer
    • Program
    • Startup
  • DuetWebServer.Controllers
    • MachineController
    • WebSocketController
  • DuetWebServer.FileProviders
    • DuetFileProvider
  • DuetWebServer.Middleware
    • CustomEndpointMiddleware
    • FallbackMiddleware
    • HttpEndpointConnection
  • DuetWebServer.Services
    • ModelObserver
    • ModelObserver.WebDirectoryChanged

Class Interception

Interception processor that notifies clients about G/M/T-codes being processed

Inheritance
System.Object
Base
Interception
Inherited Members
Base.Connection
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DuetControlServer.IPC.Processors
Assembly: DuetControlServer.dll
Syntax
public class Interception : Base

Constructors

Interception(Connection, ClientInitMessage)

Constructor of the interception processor

Declaration
public Interception(Connection conn, ClientInitMessage initMessage)
Parameters
Type Name Description
Connection conn

Connection instance

ClientInitMessage initMessage

Initialization message

Fields

SupportedCommands

List of supported commands in this mode

Declaration
public static readonly Type[] SupportedCommands
Field Value
Type Description
System.Type[]
Remarks

In addition to these commands, commands of the Command interpreter are supported while a code is being intercepted

Methods

GetCodeBeingIntercepted(Int32)

Get the code being intercepted from a given connection

Declaration
public static Code GetCodeBeingIntercepted(int connection)
Parameters
Type Name Description
System.Int32 connection

Connection ID to look up

Returns
Type Description
Code

Code being intercepted

Intercept(Code, InterceptionMode)

Called by the Code class to intercept a code. This method goes through each connected interception channel and notifies the clients.

Declaration
public static Task<bool> Intercept(Code code, InterceptionMode type)
Parameters
Type Name Description
Code code

Code to intercept

InterceptionMode type

Type of the interception

Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

True if the code has been resolved

Exceptions
Type Condition
System.OperationCanceledException

Code has been cancelled

IsInterceptingConnection(Int32)

Checks if the given connection is currently intercepting a code

Declaration
public static bool IsInterceptingConnection(int connection)
Parameters
Type Name Description
System.Int32 connection

Connection ID to check

Returns
Type Description
System.Boolean

True if the connection is intercepting a code

Process()

Waits for commands to be received and enqueues them in a concurrent queue so that a Code can decide when to cancel/resume/resolve the execution.

Declaration
public override Task Process()
Returns
Type Description
System.Threading.Tasks.Task

Task that represents the lifecycle of the connection

Overrides
Base.Process()
Back to top Generated by DocFX