Method FromSerialPort
FromSerialPort(String, Int32)
Creates a NMEA LocationDataSource based on a serial port.
Declaration
public static NmeaLocationDataSource FromSerialPort(string portName, int baudRate)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | portName | The port to use (for example, COM1). |
| System.Int32 | baudRate | The baud rate. |
Returns
| Type | Description |
|---|---|
| NmeaLocationDataSource | A NMEA Location Datasource that reads from the specified serial port |
Remarks
The created datasource will automatically handle creating and opening the specified serial port when the datasource is started. Once the datasource has been started, the NmeaDataStream will be available.
Exceptions
| Type | Condition |
|---|---|
| System.IO.IOException | The specified port could not be found or opened |
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Framework | 100.10 - 200.8 |