Show / Hide Table of Contents

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
TargetVersions
.NET Framework100.10 - 200.8
In This Article
Back to top Copyright © 2022 Esri.