Public Member Functions | Public Attributes | Private Attributes | List of all members
seed::controller::SerialCommunication Class Reference

#include <seed3_command.h>

Public Member Functions

void can_receive (std::vector< uint8_t > &_receive_data)
 
void closePort ()
 
void flushPort ()
 
void onReceive (const boost::system::error_code &_error, size_t _bytes_transferred)
 
void onTimer (const boost::system::error_code &_error)
 
bool openPort (std::string _port, unsigned int _baud_rate)
 
std::string readBuffer (uint16_t _wait_time=0)
 
void readBufferAsync (std::string _delim, uint16_t _timeout=50)
 
 SerialCommunication ()
 
void writeBuffer (std::vector< char > &_send_data)
 
 ~SerialCommunication ()
 

Public Attributes

std::string receive_buffer_
 

Private Attributes

io_service io_
 
bool is_canceled_
 
serial_port serial_
 
boost::mutex serial_mtx_
 
boost::asio::streambuf stream_buffer_
 
deadline_timer timer_
 

Detailed Description

Definition at line 15 of file seed3_command.h.

Constructor & Destructor Documentation

◆ SerialCommunication()

SerialCommunication::SerialCommunication ( )

Definition at line 9 of file seed3_command.cpp.

◆ ~SerialCommunication()

SerialCommunication::~SerialCommunication ( )

Definition at line 15 of file seed3_command.cpp.

Member Function Documentation

◆ can_receive()

void seed::controller::SerialCommunication::can_receive ( std::vector< uint8_t > &  _receive_data)

◆ closePort()

void SerialCommunication::closePort ( )

Definition at line 35 of file seed3_command.cpp.

◆ flushPort()

void SerialCommunication::flushPort ( )

Definition at line 104 of file seed3_command.cpp.

◆ onReceive()

void SerialCommunication::onReceive ( const boost::system::error_code &  _error,
size_t  _bytes_transferred 
)

Definition at line 65 of file seed3_command.cpp.

◆ onTimer()

void SerialCommunication::onTimer ( const boost::system::error_code &  _error)

Definition at line 83 of file seed3_command.cpp.

◆ openPort()

bool SerialCommunication::openPort ( std::string  _port,
unsigned int  _baud_rate 
)

Definition at line 21 of file seed3_command.cpp.

◆ readBuffer()

std::string SerialCommunication::readBuffer ( uint16_t  _wait_time = 0)

Definition at line 49 of file seed3_command.cpp.

◆ readBufferAsync()

void SerialCommunication::readBufferAsync ( std::string  _delim = "\r",
uint16_t  _timeout = 50 
)

Definition at line 89 of file seed3_command.cpp.

◆ writeBuffer()

void SerialCommunication::writeBuffer ( std::vector< char > &  _send_data)

Definition at line 41 of file seed3_command.cpp.

Member Data Documentation

◆ io_

io_service seed::controller::SerialCommunication::io_
private

Definition at line 36 of file seed3_command.h.

◆ is_canceled_

bool seed::controller::SerialCommunication::is_canceled_
private

Definition at line 42 of file seed3_command.h.

◆ receive_buffer_

std::string seed::controller::SerialCommunication::receive_buffer_

Definition at line 33 of file seed3_command.h.

◆ serial_

serial_port seed::controller::SerialCommunication::serial_
private

Definition at line 37 of file seed3_command.h.

◆ serial_mtx_

boost::mutex seed::controller::SerialCommunication::serial_mtx_
private

Definition at line 40 of file seed3_command.h.

◆ stream_buffer_

boost::asio::streambuf seed::controller::SerialCommunication::stream_buffer_
private

Definition at line 43 of file seed3_command.h.

◆ timer_

deadline_timer seed::controller::SerialCommunication::timer_
private

Definition at line 38 of file seed3_command.h.


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


seed_smartactuator_sdk
Author(s):
autogenerated on Mon Feb 28 2022 23:42:58