Method CreateAsync
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
stringThe name of the serial port used to communicate with the Harp device.
cancellationToken
CancellationTokenA 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.