0.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
NAV::UartSensor Class Reference

Abstract Uart Sensor Class. More...

Public Types

enum  Baudrate {
  BAUDRATE_FASTEST ,
  BAUDRATE_9600 ,
  BAUDRATE_19200 ,
  BAUDRATE_38400 ,
  BAUDRATE_57600 ,
  BAUDRATE_115200 ,
  BAUDRATE_128000 ,
  BAUDRATE_230400 ,
  BAUDRATE_460800 ,
  BAUDRATE_921600
}
 Available Baudrates. More...
 

Public Member Functions

UartSensoroperator= (const UartSensor &)=delete
 Copy assignment operator.
 
UartSensoroperator= (UartSensor &&)=delete
 Move assignment operator.
 
 UartSensor (const UartSensor &)=delete
 Copy constructor.
 
 UartSensor (UartSensor &&)=delete
 Move constructor.
 
 ~UartSensor ()=default
 Destructor.
 

Protected Member Functions

void restore (const json &j)
 Restores the node from a json object.
 
json save () const
 Saves the node into a json object.
 
Baudrate sensorBaudrate () const
 Returns the Baudrate for the element Selected by the GUI.
 
 UartSensor ()=default
 Default constructor.
 

Static Protected Member Functions

static int baudrate2Selection (Baudrate baud)
 Returns the guiSelection for the given baudrate.
 

Protected Attributes

int _selectedBaudrate
 Baudrate for the sensor.
 
std::string _sensorPort
 

Detailed Description

Abstract Uart Sensor Class.

Member Enumeration Documentation

◆ Baudrate

Available Baudrates.

Enumerator
BAUDRATE_FASTEST 

Fastest possible Baudrate will be automatically chosen.

BAUDRATE_9600 

Baudrate with 9600 symbols per second [Baud].

BAUDRATE_19200 

Baudrate with 19200 symbols per second [Baud].

BAUDRATE_38400 

Baudrate with 38400 symbols per second [Baud].

BAUDRATE_57600 

Baudrate with 57600 symbols per second [Baud].

BAUDRATE_115200 

Baudrate with 115200 symbols per second [Baud].

BAUDRATE_128000 

Baudrate with 128000 symbols per second [Baud].

BAUDRATE_230400 

Baudrate with 230400 symbols per second [Baud].

BAUDRATE_460800 

Baudrate with 460800 symbols per second [Baud].

BAUDRATE_921600 

Baudrate with 921600 symbols per second [Baud].

Member Function Documentation

◆ baudrate2Selection()

static int NAV::UartSensor::baudrate2Selection ( Baudrate baud)
staticprotected

Returns the guiSelection for the given baudrate.

Parameters
[in]baudBaudrate to convert

◆ restore()

void NAV::UartSensor::restore ( const json & j)
protected

Restores the node from a json object.

Parameters
[in]jJson object with the node state

Member Data Documentation

◆ _sensorPort

std::string NAV::UartSensor::_sensorPort
protected

COM port where the sensor is attached to

  • "COM1" (Windows format for physical and virtual (USB) serial port)
  • "/dev/ttyS1" (Linux format for physical serial port)
  • "/dev/ttyUSB0" (Linux format for virtual (USB) serial port)
  • "/dev/tty.usbserial-FTXXXXXX" (Mac OS X format for virtual (USB) serial port)
  • "/dev/ttyS0" (CYGWIN format. Usually the Windows COM port number minus 1. This would connect to COM1)

The documentation for this class was generated from the following file: