Public Member Functions | Protected Member Functions | Private Attributes
sick_tim3xx::SickTim3xxCommonTcp Class Reference

#include <sick_tim3xx_common_tcp.h>

Inheritance diagram for sick_tim3xx::SickTim3xxCommonTcp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SickTim3xxCommonTcp (const std::string &hostname, AbstractParser *parser)
virtual ~SickTim3xxCommonTcp ()

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_
boost::asio::ip::tcp::socket socket_

Detailed Description

Definition at line 48 of file sick_tim3xx_common_tcp.h.


Constructor & Destructor Documentation

sick_tim3xx::SickTim3xxCommonTcp::SickTim3xxCommonTcp ( const std::string &  hostname,
AbstractParser parser 
)

Definition at line 45 of file sick_tim3xx_common_tcp.cpp.

Definition at line 59 of file sick_tim3xx_common_tcp.cpp.


Member Function Documentation

Definition at line 142 of file sick_tim3xx_common_tcp.cpp.

int sick_tim3xx::SickTim3xxCommonTcp::close_device ( ) [protected, virtual]

Implements sick_tim3xx::SickTim3xxCommon.

Definition at line 126 of file sick_tim3xx_common_tcp.cpp.

int sick_tim3xx::SickTim3xxCommonTcp::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_tim3xx::SickTim3xxCommon.

Definition at line 266 of file sick_tim3xx_common_tcp.cpp.

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

Definition at line 85 of file sick_tim3xx_common_tcp.h.

int sick_tim3xx::SickTim3xxCommonTcp::init_device ( ) [protected, virtual]

Implements sick_tim3xx::SickTim3xxCommon.

Definition at line 69 of file sick_tim3xx_common_tcp.cpp.

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

Definition at line 156 of file sick_tim3xx_common_tcp.cpp.

int sick_tim3xx::SickTim3xxCommonTcp::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_tim3xx::SickTim3xxCommon.

Definition at line 224 of file sick_tim3xx_common_tcp.cpp.


Member Data Documentation

Definition at line 80 of file sick_tim3xx_common_tcp.h.

boost::asio::deadline_timer sick_tim3xx::SickTim3xxCommonTcp::deadline_ [private]

Definition at line 77 of file sick_tim3xx_common_tcp.h.

boost::system::error_code sick_tim3xx::SickTim3xxCommonTcp::ec_ [private]

Definition at line 79 of file sick_tim3xx_common_tcp.h.

Definition at line 82 of file sick_tim3xx_common_tcp.h.

boost::asio::streambuf sick_tim3xx::SickTim3xxCommonTcp::input_buffer_ [private]

Definition at line 78 of file sick_tim3xx_common_tcp.h.

boost::asio::io_service sick_tim3xx::SickTim3xxCommonTcp::io_service_ [private]

Definition at line 75 of file sick_tim3xx_common_tcp.h.

boost::asio::ip::tcp::socket sick_tim3xx::SickTim3xxCommonTcp::socket_ [private]

Definition at line 76 of file sick_tim3xx_common_tcp.h.


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


sick_tim3xx
Author(s): Jochen Sprickerhof, Martin Günther
autogenerated on Fri Aug 15 2014 11:54:25