public HardwareComponent(string name, CommunicationTask cTask, CancellationToken ct, int si) { ComponentName = name; commTask = cTask; cancellationToken = ct; Debug.Assert(si > 1, "samplingIntervalMs must be larger than 1"); samplingIntervalMs = si; }
public ArduinoBrick(CancellationTokenSource cts) { // we create the Brick every time we open the COM port tokenSource = cts; commTask = new CommunicationTask(this); }