Table of Contents

Class GenericSerialGnssDevice

Namespace
Iot.Device.Common.GnssDevice
Assembly
Iot.Device.Common.GnssDevice.dll

Implementation of a generic serial GNSS device.

public class GenericSerialGnssDevice : GnssDevice
Inheritance
GenericSerialGnssDevice
Inherited Members

Constructors

GenericSerialGnssDevice(SerialPort, bool)

Initializes a new instance of the GenericSerialGnssDevice class.

public GenericSerialGnssDevice(SerialPort serialPort, bool shouldDispose = true)

Parameters

serialPort SerialPort

A valid SerialPort. Note that you are responsible to set a watch char \n and provide the proper port configurations.

shouldDispose bool

True to dispose the serial port.

GenericSerialGnssDevice(string, int, Parity, int, StopBits)

Initializes a new instance of the GenericSerialGnssDevice class.

public GenericSerialGnssDevice(string portName, int baudRate = 9600, Parity parity = Parity.None, int dataBits = 8, StopBits stopBits = StopBits.One)

Parameters

portName string

Serial port name.

baudRate int

Baud rate, default to 9600.

parity Parity

Parity, default to None.

dataBits int

Data bits, default to 8.

stopBits StopBits

Stop bits, default to One.

Properties

IsRunning

Gets a value indicating whether the GNSS device is running.

public override bool IsRunning { get; }

Property Value

bool

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetProductDetails()

Gets the product details.

public override string GetProductDetails()

Returns

string

A string representing the product details.

Start()

Starts the GNSS device.

public override bool Start()

Returns

bool

A value indicating whether the start was successful.

Stop()

Stops the GNSS device.

public override bool Stop()

Returns

bool

A value indicating whether the stop was successful.