WPILibC++ 2024.3.2
hal::SerialHelper Class Reference

A class for deterministically getting information about Serial Ports. More...

#include <hal/cpp/SerialHelper.h>

Public Member Functions

 SerialHelper ()
 
std::string GetVISASerialPortName (HAL_SerialPort port, int32_t *status)
 Get the VISA name of a serial port. More...
 
std::string GetOSSerialPortName (HAL_SerialPort port, int32_t *status)
 Get the OS name of a serial port. More...
 
std::vector< std::string > GetVISASerialPortList (int32_t *status)
 Get a vector of all serial port VISA names. More...
 
std::vector< std::string > GetOSSerialPortList (int32_t *status)
 Get a vector of all serial port OS names. More...
 

Detailed Description

A class for deterministically getting information about Serial Ports.

Constructor & Destructor Documentation

◆ SerialHelper()

hal::SerialHelper::SerialHelper ( )

Member Function Documentation

◆ GetOSSerialPortList()

std::vector< std::string > hal::SerialHelper::GetOSSerialPortList ( int32_t *  status)

Get a vector of all serial port OS names.

Parameters
[out]statusstatus check
Returns
vector of serial port OS names

◆ GetOSSerialPortName()

std::string hal::SerialHelper::GetOSSerialPortName ( HAL_SerialPort  port,
int32_t *  status 
)

Get the OS name of a serial port.

Parameters
[in]portthe serial port index
[out]statusstatus check
Returns
the OS name

◆ GetVISASerialPortList()

std::vector< std::string > hal::SerialHelper::GetVISASerialPortList ( int32_t *  status)

Get a vector of all serial port VISA names.

Parameters
[out]statusstatus check
Returns
vector of serial port VISA names

◆ GetVISASerialPortName()

std::string hal::SerialHelper::GetVISASerialPortName ( HAL_SerialPort  port,
int32_t *  status 
)

Get the VISA name of a serial port.

Parameters
[in]portthe serial port index
[out]statusstatus check
Returns
the VISA name

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