#include <serial_comm.h>
Public Member Functions | |
int | close_port () |
void | cputs (const char *) |
void | disable_dtr () |
void | disable_rts () |
void | enable_dtr () |
void | enable_rts () |
int | is_cts_enabled () |
int | is_dcd_enabled () |
int | is_dsr_enabled () |
int | open_port (std::string port_name, int baudrate, std::string mode_s) |
int | poll_comport (unsigned char *, int) |
int | send_buf (unsigned char *, int) |
int | send_byte (unsigned char) |
SerialComm () | |
Constructor. | |
~SerialComm () | |
Destructor. | |
Private Attributes | |
int | baud_ |
Baud rate. | |
int | error |
int | fd_ |
File descriptor. | |
struct termios new_port_settings | old_port_settings |
std::string | port_name_ |
Definition at line 18 of file serial_comm.h.
Constructor.
Definition at line 10 of file serial_comm.cpp.
Destructor.
Definition at line 14 of file serial_comm.cpp.
int milvus::SerialComm::close_port | ( | ) |
Definition at line 202 of file serial_comm.cpp.
void milvus::SerialComm::cputs | ( | const char * | ) |
Definition at line 239 of file serial_comm.cpp.
void milvus::SerialComm::disable_dtr | ( | ) |
Definition at line 264 of file serial_comm.cpp.
void milvus::SerialComm::disable_rts | ( | ) |
Definition at line 274 of file serial_comm.cpp.
void milvus::SerialComm::enable_dtr | ( | ) |
Definition at line 259 of file serial_comm.cpp.
void milvus::SerialComm::enable_rts | ( | ) |
Definition at line 269 of file serial_comm.cpp.
Definition at line 249 of file serial_comm.cpp.
Definition at line 244 of file serial_comm.cpp.
Definition at line 254 of file serial_comm.cpp.
int milvus::SerialComm::open_port | ( | std::string | port_name, |
int | baudrate, | ||
std::string | mode_s | ||
) |
Definition at line 18 of file serial_comm.cpp.
int milvus::SerialComm::poll_comport | ( | unsigned char * | buf, |
int | size | ||
) |
Definition at line 222 of file serial_comm.cpp.
int milvus::SerialComm::send_buf | ( | unsigned char * | buf, |
int | size | ||
) |
Definition at line 234 of file serial_comm.cpp.
int milvus::SerialComm::send_byte | ( | unsigned | char | ) |
Definition at line 229 of file serial_comm.cpp.
int milvus::SerialComm::baud_ [private] |
Baud rate.
Definition at line 45 of file serial_comm.h.
int milvus::SerialComm::error [private] |
Definition at line 48 of file serial_comm.h.
int milvus::SerialComm::fd_ [private] |
File descriptor.
Definition at line 43 of file serial_comm.h.
struct termios new_port_settings milvus::SerialComm::old_port_settings [private] |
Definition at line 47 of file serial_comm.h.
std::string milvus::SerialComm::port_name_ [private] |
Definition at line 46 of file serial_comm.h.