Dataflow Runtime API  4.0.1.0
Public Member Functions | List of all members
imt::base::os::linux::SerialPort Class Referencefinal

Provides functions to transmit serial port data. More...

#include <Imt.Base.OS.Linux/SerialPort.h>

Public Member Functions

 SerialPort (SerialPortConfig config) noexcept
 Constructor. More...
 
 ~SerialPort ()
 Destructor. More...
 
size_t read (uint8_t *const pData, size_t const countDataBytes) const
 Reads the given number of bytes from the serial port. More...
 
size_t write (uint8_t const *const pData, size_t const countDataBytes) const
 Writes the given data to the serial port. More...
 
 SerialPort (SerialPort const &source)=delete
 
 SerialPort (SerialPort &&source) noexcept=delete
 
SerialPortoperator= (SerialPort const &source)=delete
 
SerialPortoperator= (SerialPort &&source) noexcept=delete
 

Detailed Description

Provides functions to transmit serial port data.

Constructor & Destructor Documentation

◆ SerialPort() [1/3]

imt::base::os::linux::SerialPort::SerialPort ( SerialPortConfig  config)
noexcept

Constructor.

Parameters
configThe serial port configuration

◆ ~SerialPort()

imt::base::os::linux::SerialPort::~SerialPort ( )

Destructor.

◆ SerialPort() [2/3]

imt::base::os::linux::SerialPort::SerialPort ( SerialPort const &  source)
delete

◆ SerialPort() [3/3]

imt::base::os::linux::SerialPort::SerialPort ( SerialPort &&  source)
deletenoexcept

Member Function Documentation

◆ operator=() [1/2]

SerialPort& imt::base::os::linux::SerialPort::operator= ( SerialPort &&  source)
deletenoexcept

◆ operator=() [2/2]

SerialPort& imt::base::os::linux::SerialPort::operator= ( SerialPort const &  source)
delete

◆ read()

size_t imt::base::os::linux::SerialPort::read ( uint8_t *const  pData,
size_t const  countDataBytes 
) const

Reads the given number of bytes from the serial port.

Parameters
pDataThe buffer receiving the data
countDataBytesThe number of bytes to read
Returns
The number of bytes written into the buffer

◆ write()

size_t imt::base::os::linux::SerialPort::write ( uint8_t const *const  pData,
size_t const  countDataBytes 
) const

Writes the given data to the serial port.

Parameters
pDataThe databuffer to send
countDataBytesThe number of data stored in the buffer
Returns
The number of bytes sent

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