Class SerialEventPoller
Helper class to fake events for a serial port by using polling behind the scenes.
Useful until events are fully supported for Meadow.Hardware.ISerialPort
.
Assembly: IDxxLA.dll
View Source
Declaration
public class SerialEventPoller : IDisposable
Implements:
System.IDisposable
Properties
SerialPort
The currently used Meadow.Hardware.ISerialPort
.
View Source
Declaration
public ISerialPort SerialPort { get; }
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
Declaration
public void Dispose()
Start(int)
Start polling the Meadow.Hardware.ISerialPort
buffer.
View Source
Declaration
public void Start(int pollingIntervalMs = 100)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pollingIntervalMs | The interval between polling calls. Defaults to 100ms. |
Stop()
Stop polling the Meadow.Hardware.ISerialPort
buffer.
View Source
Declaration
public void Stop()
Events
DataReceived
Event for if there is data in the serial port buffer to read.
View Source
Declaration
public event DataReceivedEventHandler DataReceived
Event Type
Meadow.Foundation.Sensors.Radio.Rfid.Serial.Helpers.DataReceivedEventHandler
Implements
System.IDisposable