Table of Contents

Method CreateAsync

Namespace
Harp.Hobgoblin
Assembly
Harp.Hobgoblin.dll

CreateAsync(string, CancellationToken)

Initializes a new instance of the asynchronous API to configure and interface with Hobgoblin devices on the specified serial port.

public static Task<AsyncDevice> CreateAsync(string portName, CancellationToken cancellationToken = default)

Parameters

portName string

The name of the serial port used to communicate with the Harp device.

cancellationToken CancellationToken

A CancellationToken which can be used to cancel the operation.

Returns

Task<AsyncDevice>

A task that represents the asynchronous initialization operation. The value of the Result parameter contains a new instance of the AsyncDevice class.