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
SerialPortA valid SerialPort. Note that you are responsible to set a watch char
\n
and provide the proper port configurations.shouldDispose
boolTrue 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
stringSerial port name.
baudRate
intBaud rate, default to 9600.
parity
ParityParity, default to None.
dataBits
intData bits, default to 8.
stopBits
StopBitsStop bits, default to One.
Properties
IsRunning
Gets a value indicating whether the GNSS device is running.
public override bool IsRunning { get; }
Property Value
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.