Table of Contents

Class LinkService

Namespace
DuetControlServer.Link
Assembly
DuetControlServer.dll

This class accesses RepRapFirmware via SPI and deals with general communication

public sealed class LinkService : BackgroundService, IHostedService, IDisposable
Inheritance
LinkService
Implements
Inherited Members

Constructors

This class accesses RepRapFirmware via SPI and deals with general communication

public LinkService(Manager channels, EventLogger eventLogger, FilePathResolver filePathResolver, JobProcessor jobProcessor, ILinkAdapter linkAdapter, LinkInterface linkInterface, ObjectModel model, IHostApplicationLifetime lifetime, ILogger<LinkService> logger, IOptions<Settings> settings)

Parameters

channels Manager

Channel manager

eventLogger EventLogger

Event logger

filePathResolver FilePathResolver

File path resolver

jobProcessor JobProcessor

Job processor

linkAdapter ILinkAdapter

Firmware link adapter

linkInterface LinkInterface

Link interface

model ObjectModel

Object model

lifetime IHostApplicationLifetime

Host application lifetime

logger ILogger<LinkService>

Logger

settings IOptions<Settings>

Settings

Fields

Handle counter for open files

public uint _openFileHandleCounter

Field Value

uint

Methods

Start a thread that performs the communication with the firmware

protected override Task ExecuteAsync(CancellationToken stoppingToken)

Parameters

stoppingToken CancellationToken

Cancellation token

Returns

Task

This effectively starts a thread with higher priority in order to ensure that the communication with the controller is not blocked by other tasks

Start this service asynchronously

public override Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token

Returns

Task

Asynchronous task

Shut down this service

public override Task StopAsync(CancellationToken stoppingToken)

Parameters

stoppingToken CancellationToken

Cancellation token

Returns

Task

Asynchronous task