SerialPort
A light-weight C++ library for cross-platform serial communication.
Loading...
Searching...
No Matches
serial_port::PortInfo Struct Reference

Holds information about a port. More...

#include <types.h>

Public Member Functions

 PortInfo ()=default
 Default constructor.
 
 PortInfo (const std::string &long_name, const std::string &short_name)
 Constructor initializing info.
 

Public Attributes

std::string long_name
 The long name of the port (same as short name on Linux)
 
std::string short_name
 short_name Short name of the port (e.g. "COM1" or "/dev/ttyS0")
 

Friends

std::ostream & operator<< (std::ostream &os, const PortInfo &obj)
 Overloaded stream output operator to display port information.
 
bool operator< (const PortInfo &lhs, const PortInfo &rhs)
 Overloaded relational operators that allow sorting PortInfo objects by their short name.
 
bool operator<= (const PortInfo &lhs, const PortInfo &rhs)
 
bool operator> (const PortInfo &lhs, const PortInfo &rhs)
 
bool operator>= (const PortInfo &lhs, const PortInfo &rhs)
 

Detailed Description

Holds information about a port.

Constructor & Destructor Documentation

◆ PortInfo()

serial_port::PortInfo::PortInfo ( const std::string & long_name,
const std::string & short_name )
inline

Constructor initializing info.

Parameters
long_nameLong name of the port (same as short name on Linux)
short_nameShort name of the port (e.g. "COM1" or "/dev/ttyS0")

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