minipix_uart_interface
A library and examples for the MiniPIX UART interface
SerialPort Class Reference

#include <serial_port.h>

Public Member Functions

 SerialPort ()
 
virtual ~SerialPort ()
 
bool connect (const std::string port, const int baudrate, const bool virtual_comm)
 
void disconnect ()
 
bool sendChar (const char c)
 
bool sendCharArray (uint8_t *buffer, int len)
 
void setBlocking (int fd, int should_block)
 
bool checkConnected ()
 
int readSerial (uint8_t *arr, int arr_max_size)
 
 SerialPort ()
 
virtual ~SerialPort ()
 
bool connect (const std::string port, const int baudrate, const bool virtual_comm)
 
void disconnect ()
 
bool sendChar (const char c)
 
bool sendCharArray (uint8_t *buffer, int len)
 
void setBlocking (int fd, int should_block)
 
bool checkConnected ()
 
int readSerial (uint8_t *arr, int arr_max_size)
 
 SerialPort ()
 
virtual ~SerialPort ()
 
bool connect (const std::string port, const int baudrate, const bool virtual_comm)
 
void disconnect ()
 
bool sendChar (const char c)
 
bool sendCharArray (uint8_t *buffer, int len)
 
void setBlocking (int fd, int should_block)
 
bool checkConnected ()
 
int readSerial (uint8_t *arr, int arr_max_size)
 
 SerialPort ()
 
virtual ~SerialPort ()
 
bool connect (const std::string port, const int baudrate, const bool virtual_comm)
 
void disconnect ()
 
bool sendChar (const char c)
 
bool sendCharArray (uint8_t *buffer, int len)
 
void setBlocking (int fd, int should_block)
 
bool checkConnected ()
 
int readSerial (uint8_t *arr, int arr_max_size)
 
 SerialPort ()
 
virtual ~SerialPort ()
 
bool connect (const std::string port, const int baudrate, const bool virtual_comm)
 
void disconnect ()
 
bool sendChar (const char c)
 
bool sendCharArray (uint8_t *buffer, int len)
 
void setBlocking (int fd, int should_block)
 
bool checkConnected ()
 
int readSerial (uint8_t *arr, int arr_max_size)
 

Data Fields

bool virtual_ = false
 
int serial_port_fd_
 
uint8_t input_buffer [1024]
 
uint16_t input_it = 0
 

Constructor & Destructor Documentation

◆ SerialPort() [1/5]

SerialPort::SerialPort ( )

◆ ~SerialPort() [1/5]

SerialPort::~SerialPort ( )
virtual

◆ SerialPort() [2/5]

SerialPort::SerialPort ( )

◆ ~SerialPort() [2/5]

virtual SerialPort::~SerialPort ( )
virtual

◆ SerialPort() [3/5]

SerialPort::SerialPort ( )

◆ ~SerialPort() [3/5]

virtual SerialPort::~SerialPort ( )
virtual

◆ SerialPort() [4/5]

SerialPort::SerialPort ( )

◆ ~SerialPort() [4/5]

virtual SerialPort::~SerialPort ( )
virtual

◆ SerialPort() [5/5]

SerialPort::SerialPort ( )

◆ ~SerialPort() [5/5]

virtual SerialPort::~SerialPort ( )
virtual

Member Function Documentation

◆ checkConnected() [1/5]

bool SerialPort::checkConnected ( )

◆ checkConnected() [2/5]

bool SerialPort::checkConnected ( )

◆ checkConnected() [3/5]

bool SerialPort::checkConnected ( )

◆ checkConnected() [4/5]

bool SerialPort::checkConnected ( )

◆ checkConnected() [5/5]

bool SerialPort::checkConnected ( )

◆ connect() [1/5]

bool SerialPort::connect ( const std::string  port,
const int  baudrate,
const bool  virtual_comm 
)

◆ connect() [2/5]

bool SerialPort::connect ( const std::string  port,
const int  baudrate,
const bool  virtual_comm 
)

◆ connect() [3/5]

bool SerialPort::connect ( const std::string  port,
const int  baudrate,
const bool  virtual_comm 
)

◆ connect() [4/5]

bool SerialPort::connect ( const std::string  port,
const int  baudrate,
const bool  virtual_comm 
)

◆ connect() [5/5]

bool SerialPort::connect ( const std::string  port,
const int  baudrate,
const bool  virtual_comm 
)

◆ disconnect() [1/5]

void SerialPort::disconnect ( )

◆ disconnect() [2/5]

void SerialPort::disconnect ( )

◆ disconnect() [3/5]

void SerialPort::disconnect ( )

◆ disconnect() [4/5]

void SerialPort::disconnect ( )

◆ disconnect() [5/5]

void SerialPort::disconnect ( )

◆ readSerial() [1/5]

int SerialPort::readSerial ( uint8_t *  arr,
int  arr_max_size 
)

◆ readSerial() [2/5]

int SerialPort::readSerial ( uint8_t *  arr,
int  arr_max_size 
)

◆ readSerial() [3/5]

int SerialPort::readSerial ( uint8_t *  arr,
int  arr_max_size 
)

◆ readSerial() [4/5]

int SerialPort::readSerial ( uint8_t *  arr,
int  arr_max_size 
)

◆ readSerial() [5/5]

int SerialPort::readSerial ( uint8_t *  arr,
int  arr_max_size 
)

◆ sendChar() [1/5]

bool SerialPort::sendChar ( const char  c)

◆ sendChar() [2/5]

bool SerialPort::sendChar ( const char  c)

◆ sendChar() [3/5]

bool SerialPort::sendChar ( const char  c)

◆ sendChar() [4/5]

bool SerialPort::sendChar ( const char  c)

◆ sendChar() [5/5]

bool SerialPort::sendChar ( const char  c)

◆ sendCharArray() [1/5]

bool SerialPort::sendCharArray ( uint8_t *  buffer,
int  len 
)

◆ sendCharArray() [2/5]

bool SerialPort::sendCharArray ( uint8_t *  buffer,
int  len 
)

◆ sendCharArray() [3/5]

bool SerialPort::sendCharArray ( uint8_t *  buffer,
int  len 
)

◆ sendCharArray() [4/5]

bool SerialPort::sendCharArray ( uint8_t *  buffer,
int  len 
)

◆ sendCharArray() [5/5]

bool SerialPort::sendCharArray ( uint8_t *  buffer,
int  len 
)

◆ setBlocking() [1/5]

void SerialPort::setBlocking ( int  fd,
int  should_block 
)

◆ setBlocking() [2/5]

void SerialPort::setBlocking ( int  fd,
int  should_block 
)

◆ setBlocking() [3/5]

void SerialPort::setBlocking ( int  fd,
int  should_block 
)

◆ setBlocking() [4/5]

void SerialPort::setBlocking ( int  fd,
int  should_block 
)

◆ setBlocking() [5/5]

void SerialPort::setBlocking ( int  fd,
int  should_block 
)

Field Documentation

◆ input_buffer

uint8_t SerialPort::input_buffer

◆ input_it

uint16_t SerialPort::input_it = 0

◆ serial_port_fd_

int SerialPort::serial_port_fd_

◆ virtual_

bool SerialPort::virtual_ = false

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