PIDUINO
Loading...
Searching...
No Matches
Piduino::SerialPort::Info

Provides information about existing serial ports. More...

#include <serialport.h>

Collaboration diagram for Piduino::SerialPort::Info:

Public Member Functions

 Info ()
 
 Info (const Info &other)
 
 Info (const std::string &name)
 
 Info (const SerialPort &port)
 
virtual ~Info ()
 
Infooperator= (const Info &other)
 
void swap (Info &other)
 
bool operator== (const Info &other)
 
bool operator!= (const Info &other)
 
std::string portName () const
 
std::string systemLocation () const
 
std::string driverName () const
 
std::string description () const
 
std::string manufacturer () const
 
std::string serialNumber () const
 
uint16_t vendorIdentifier () const
 
bool hasVendorIdentifier () const
 
uint16_t productIdentifier () const
 
bool hasProductIdentifier () const
 
bool isNull () const
 

Static Public Member Functions

static std::deque< InfoavailablePorts ()
 
static std::deque< int32_t > standardBaudRates ()
 
static Info defaultPort ()
 Information sur le port série par défaut sur la carte Pi Dépend du modèle de carte (informations stockées dans la base de données)
 

Protected Member Functions

 Info (Private &dd)
 

Protected Attributes

std::unique_ptr< Privated_ptr
 

Detailed Description

Provides information about existing serial ports.

Use the static functions to generate a list of SerialPort::Info objects. Each SerialPort::Info object in the list represents a single serial port and can be queried for the port name, system location, description, and manufacturer. The SerialPort::Info class can also be used as an input parameter for the setPort() method of the SerialPort class.

See also
SerialPort

Definition at line 391 of file serialport.h.

Constructor & Destructor Documentation

◆ Info() [1/5]

Piduino::SerialPort::Info::Info ( )

Constructs an empty SerialPort::Info object.

See also
isNull()

◆ Info() [2/5]

Piduino::SerialPort::Info::Info ( const Info other)

Constructs a copy of other.

◆ Info() [3/5]

Piduino::SerialPort::Info::Info ( const std::string &  name)
explicit

Constructs a SerialPort::Info object from serial port name.

This constructor finds the relevant serial port among the available ones according to the port name name, and constructs the serial port info instance for that port.

◆ Info() [4/5]

Piduino::SerialPort::Info::Info ( const SerialPort port)
explicit

Constructs a SerialPort::Info object from serial port.

◆ ~Info()

virtual Piduino::SerialPort::Info::~Info ( )
virtual

Destroys the SerialPort::Info object. References to the values in the object become invalid.

◆ Info() [5/5]

Piduino::SerialPort::Info::Info ( Private dd)
protected

Member Function Documentation

◆ availablePorts()

static std::deque< Info > Piduino::SerialPort::Info::availablePorts ( )
static

Returns a list of available serial ports on the system.

◆ defaultPort()

static Info Piduino::SerialPort::Info::defaultPort ( )
static

Information sur le port série par défaut sur la carte Pi Dépend du modèle de carte (informations stockées dans la base de données)

Returns
informations sur le port qui peut être isNull() si le port n'a pas été trouvé.

◆ description()

std::string Piduino::SerialPort::Info::description ( ) const

Returns the description string of the serial port, if available; otherwise returns an empty string.

See also
manufacturer(), serialNumber()

◆ driverName()

std::string Piduino::SerialPort::Info::driverName ( ) const

Returns the driver name string of the serial port, if available; otherwise returns an empty string.

◆ hasProductIdentifier()

bool Piduino::SerialPort::Info::hasProductIdentifier ( ) const

Returns true if there is a valid 16-bit product number present; otherwise returns false.

See also
productIdentifier(), vendorIdentifier(), hasVendorIdentifier()

◆ hasVendorIdentifier()

bool Piduino::SerialPort::Info::hasVendorIdentifier ( ) const

Returns true if there is a valid 16-bit vendor number present; otherwise returns false.

See also
vendorIdentifier(), productIdentifier(), hasProductIdentifier()

◆ isNull()

bool Piduino::SerialPort::Info::isNull ( ) const

Returns whether this SerialPort::Info object holds a serial port definition.

◆ manufacturer()

std::string Piduino::SerialPort::Info::manufacturer ( ) const

Returns the manufacturer string of the serial port, if available; otherwise returns an empty string.

See also
description(), serialNumber()

◆ operator!=()

bool Piduino::SerialPort::Info::operator!= ( const Info other)
Parameters
other

◆ operator=()

Info & Piduino::SerialPort::Info::operator= ( const Info other)

Sets the SerialPort::Info object to be equal to other.

◆ operator==()

bool Piduino::SerialPort::Info::operator== ( const Info other)
Parameters
other

◆ portName()

std::string Piduino::SerialPort::Info::portName ( ) const

Returns the name of the serial port.

See also
systemLocation()

◆ productIdentifier()

uint16_t Piduino::SerialPort::Info::productIdentifier ( ) const

Returns the 16-bit product number for the serial port, if available; otherwise returns zero.

See also
hasProductIdentifier(), vendorIdentifier(), hasVendorIdentifier()

◆ serialNumber()

std::string Piduino::SerialPort::Info::serialNumber ( ) const

Returns the serial number string of the serial port, if available; otherwise returns an empty string.

Note
The serial number may include letters.
See also
description(), manufacturer()

◆ standardBaudRates()

static std::deque< int32_t > Piduino::SerialPort::Info::standardBaudRates ( )
static

Returns a list of available standard baud rates supported by the target platform.

◆ swap()

void Piduino::SerialPort::Info::swap ( Info other)

Swaps SerialPort::Info other with this SerialPort::Info. This operation is very fast and never fails.

◆ systemLocation()

std::string Piduino::SerialPort::Info::systemLocation ( ) const

Returns the system location of the serial port.

See also
portName()

◆ vendorIdentifier()

uint16_t Piduino::SerialPort::Info::vendorIdentifier ( ) const

Returns the 16-bit vendor number for the serial port, if available; otherwise returns zero.

See also
hasVendorIdentifier(), productIdentifier(), hasProductIdentifier()

Member Data Documentation

◆ d_ptr

std::unique_ptr<Private> Piduino::SerialPort::Info::d_ptr
protected

Definition at line 556 of file serialport.h.