Public Member Functions | Protected Member Functions | Private Attributes
sick_tim::SickTimCommonTcp Class Reference

#include <sick_tim_common_tcp.h>

Inheritance diagram for sick_tim::SickTimCommonTcp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SickTimCommonTcp (const std::string &hostname, const std::string &port, int &timelimit, AbstractParser *parser)
virtual ~SickTimCommonTcp ()

Protected Member Functions

void checkDeadline ()
virtual int close_device ()
virtual int get_datagram (unsigned char *receiveBuffer, int bufferSize, int *actual_length)
 Read a datagram from the device.
void handleRead (boost::system::error_code error, size_t bytes_transfered)
virtual int init_device ()
int readWithTimeout (size_t timeout_ms, char *buffer, int buffer_size, int *bytes_read=0, bool *exception_occured=0)
virtual int sendSOPASCommand (const char *request, std::vector< unsigned char > *reply)
 Send a SOPAS command to the device and print out the response to the console.

Private Attributes

size_t bytes_transfered_
boost::asio::deadline_timer deadline_
boost::system::error_code ec_
std::string hostname_
boost::asio::streambuf input_buffer_
boost::asio::io_service io_service_
std::string port_
boost::asio::ip::tcp::socket socket_
int timelimit_

Detailed Description

Definition at line 48 of file sick_tim_common_tcp.h.


Constructor & Destructor Documentation

sick_tim::SickTimCommonTcp::SickTimCommonTcp ( const std::string &  hostname,
const std::string &  port,
int &  timelimit,
AbstractParser parser 
)

Definition at line 45 of file sick_tim_common_tcp.cpp.

Definition at line 61 of file sick_tim_common_tcp.cpp.


Member Function Documentation

Definition at line 145 of file sick_tim_common_tcp.cpp.

int sick_tim::SickTimCommonTcp::close_device ( ) [protected, virtual]

Implements sick_tim::SickTimCommon.

Definition at line 129 of file sick_tim_common_tcp.cpp.

int sick_tim::SickTimCommonTcp::get_datagram ( unsigned char *  receiveBuffer,
int  bufferSize,
int *  actual_length 
) [protected, virtual]

Read a datagram from the device.

Parameters:
[in]receiveBufferdata buffer to fill
[in]bufferSizemax data size to write to buffer (result should be 0 terminated)
[out]actual_lengththe actual amount of data written

Implements sick_tim::SickTimCommon.

Definition at line 269 of file sick_tim_common_tcp.cpp.

void sick_tim::SickTimCommonTcp::handleRead ( boost::system::error_code  error,
size_t  bytes_transfered 
) [inline, protected]

Definition at line 87 of file sick_tim_common_tcp.h.

int sick_tim::SickTimCommonTcp::init_device ( ) [protected, virtual]

Implements sick_tim::SickTimCommon.

Definition at line 71 of file sick_tim_common_tcp.cpp.

int sick_tim::SickTimCommonTcp::readWithTimeout ( size_t  timeout_ms,
char *  buffer,
int  buffer_size,
int *  bytes_read = 0,
bool *  exception_occured = 0 
) [protected]

Definition at line 159 of file sick_tim_common_tcp.cpp.

int sick_tim::SickTimCommonTcp::sendSOPASCommand ( const char *  request,
std::vector< unsigned char > *  reply 
) [protected, virtual]

Send a SOPAS command to the device and print out the response to the console.

Implements sick_tim::SickTimCommon.

Definition at line 227 of file sick_tim_common_tcp.cpp.


Member Data Documentation

Definition at line 80 of file sick_tim_common_tcp.h.

boost::asio::deadline_timer sick_tim::SickTimCommonTcp::deadline_ [private]

Definition at line 77 of file sick_tim_common_tcp.h.

boost::system::error_code sick_tim::SickTimCommonTcp::ec_ [private]

Definition at line 79 of file sick_tim_common_tcp.h.

Definition at line 82 of file sick_tim_common_tcp.h.

boost::asio::streambuf sick_tim::SickTimCommonTcp::input_buffer_ [private]

Definition at line 78 of file sick_tim_common_tcp.h.

boost::asio::io_service sick_tim::SickTimCommonTcp::io_service_ [private]

Definition at line 75 of file sick_tim_common_tcp.h.

std::string sick_tim::SickTimCommonTcp::port_ [private]

Definition at line 83 of file sick_tim_common_tcp.h.

boost::asio::ip::tcp::socket sick_tim::SickTimCommonTcp::socket_ [private]

Definition at line 76 of file sick_tim_common_tcp.h.

Definition at line 84 of file sick_tim_common_tcp.h.


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


sick_tim
Author(s): Jochen Sprickerhof , Martin Günther , Sebastian Pütz
autogenerated on Thu May 9 2019 02:32:02