Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
sick_scan::SickScanCommonTcp Class Reference

#include <sick_scan_common_tcp.h>

Inheritance diagram for sick_scan::SickScanCommonTcp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

SopasEventMessage findFrameInReceiveBuffer ()
bool getEmulSensor ()
 get emulation flag (using emulation instead of "real" scanner - currently implemented for radar
int getReplyMode ()
int numberOfDatagramInInputFifo ()
void processFrame (ros::Time timeStamp, SopasEventMessage &frame)
void readCallbackFunction (UINT8 *buffer, UINT32 &numOfBytes)
void setEmulSensor (bool _emulFlag)
 Set emulation flag (using emulation instead of "real" scanner - currently implemented for radar.
void setReplyMode (int _mode)
 SickScanCommonTcp (const std::string &hostname, const std::string &port, int &timelimit, SickGenericParser *parser, char cola_dialect_id)
bool stopScanData ()
virtual ~SickScanCommonTcp ()

Static Public Member Functions

static void disconnectFunctionS (void *obj)
static void readCallbackFunctionS (void *obj, UINT8 *buffer, UINT32 &numOfBytes)

Public Attributes

UINT32 m_alreadyReceivedBytes
UINT32 m_lastPacketSize
UINT8 m_packetBuffer [480000]
Queue< DatagramWithTimeStamprecvQueue

Protected Member Functions

void checkDeadline ()
virtual int close_device ()
void disconnectFunction ()
virtual int get_datagram (ros::Time &recvTimeStamp, unsigned char *receiveBuffer, int bufferSize, int *actual_length, bool isBinaryProtocol, int *numberOfRemainingFifoEntries)
 Read a datagram from the device.
void handleRead (boost::system::error_code error, size_t bytes_transfered)
virtual int init_device ()
void readCallbackFunctionOld (UINT8 *buffer, UINT32 &numOfBytes)
int readWithTimeout (size_t timeout_ms, char *buffer, int buffer_size, int *bytes_read=0, bool *exception_occured=0, bool isBinary=false)
virtual int sendSOPASCommand (const char *request, std::vector< unsigned char > *reply, int cmdLen)
 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_
bool m_beVerbose
bool m_emulSensor
UINT32 m_numberOfBytesInReceiveBuffer
 Number of bytes in buffer.
UINT32 m_numberOfBytesInResponseBuffer
 Number of bytes in buffer.
UINT8 m_receiveBuffer [480000]
 Low-Level receive buffer for all data.
Mutex m_receiveDataMutex
 Access mutex for buffer.
int m_replyMode
UINT8 m_responseBuffer [1024]
 Receive buffer for everything except scan data and eval case data.
std::string port_
boost::asio::ip::tcp::socket socket_
int timelimit_

Detailed Description

Definition at line 66 of file sick_scan_common_tcp.h.


Constructor & Destructor Documentation

sick_scan::SickScanCommonTcp::SickScanCommonTcp ( const std::string &  hostname,
const std::string &  port,
int &  timelimit,
SickGenericParser parser,
char  cola_dialect_id 
)

Definition at line 170 of file sick_scan_common_tcp.cpp.

Definition at line 206 of file sick_scan_common_tcp.cpp.


Member Function Documentation

Definition at line 583 of file sick_scan_common_tcp.cpp.

int sick_scan::SickScanCommonTcp::close_device ( ) [protected, virtual]

Implements sick_scan::SickScanCommon.

Definition at line 562 of file sick_scan_common_tcp.cpp.

Read callback. Diese Funktion wird aufgerufen, sobald Daten auf der Schnittstelle hereingekommen sind.

Definition at line 217 of file sick_scan_common_tcp.cpp.

Definition at line 222 of file sick_scan_common_tcp.cpp.

Definition at line 285 of file sick_scan_common_tcp.cpp.

int sick_scan::SickScanCommonTcp::get_datagram ( ros::Time recvTimeStamp,
unsigned char *  receiveBuffer,
int  bufferSize,
int *  actual_length,
bool  isBinaryProtocol,
int *  numberOfRemainingFifoEntries 
) [protected, virtual]

Read a datagram from the device.

Parameters:
[out]recvTimeStamptimestamp of received datagram
[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
[in]isBinaryProtocoltrue=binary False=ASCII

Implements sick_scan::SickScanCommon.

Definition at line 758 of file sick_scan_common_tcp.cpp.

get emulation flag (using emulation instead of "real" scanner - currently implemented for radar

Parameters:
\returnbool: Flag to switch emulation on or off

Definition at line 273 of file sick_scan_common_tcp.cpp.

Definition at line 240 of file sick_scan_common_tcp.cpp.

void sick_scan::SickScanCommonTcp::handleRead ( boost::system::error_code  error,
size_t  bytes_transfered 
) [protected]

Definition at line 576 of file sick_scan_common_tcp.cpp.

int sick_scan::SickScanCommonTcp::init_device ( ) [protected, virtual]

Implements sick_scan::SickScanCommon.

Definition at line 546 of file sick_scan_common_tcp.cpp.

Definition at line 598 of file sick_scan_common_tcp.cpp.

Read callback. Diese Funktion wird aufgerufen, sobald Daten auf der Schnittstelle hereingekommen sind.

Definition at line 459 of file sick_scan_common_tcp.cpp.

void sick_scan::SickScanCommonTcp::readCallbackFunction ( UINT8 buffer,
UINT32 numOfBytes 
)

Definition at line 480 of file sick_scan_common_tcp.cpp.

void sick_scan::SickScanCommonTcp::readCallbackFunctionOld ( UINT8 buffer,
UINT32 numOfBytes 
) [protected]
void sick_scan::SickScanCommonTcp::readCallbackFunctionS ( void *  obj,
UINT8 buffer,
UINT32 numOfBytes 
) [static]

Definition at line 230 of file sick_scan_common_tcp.cpp.

int sick_scan::SickScanCommonTcp::readWithTimeout ( size_t  timeout_ms,
char *  buffer,
int  buffer_size,
int *  bytes_read = 0,
bool *  exception_occured = 0,
bool  isBinary = false 
) [protected]

Definition at line 603 of file sick_scan_common_tcp.cpp.

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

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

Implements sick_scan::SickScanCommon.

Definition at line 642 of file sick_scan_common_tcp.cpp.

Set emulation flag (using emulation instead of "real" scanner - currently implemented for radar.

Parameters:
_emulFlag,:Flag to switch emulation on or off
Returns:

Definition at line 263 of file sick_scan_common_tcp.cpp.

Definition at line 236 of file sick_scan_common_tcp.cpp.

Definition at line 570 of file sick_scan_common_tcp.cpp.


Member Data Documentation

Definition at line 154 of file sick_scan_common_tcp.h.

boost::asio::deadline_timer sick_scan::SickScanCommonTcp::deadline_ [private]

Definition at line 151 of file sick_scan_common_tcp.h.

boost::system::error_code sick_scan::SickScanCommonTcp::ec_ [private]

Definition at line 153 of file sick_scan_common_tcp.h.

Definition at line 156 of file sick_scan_common_tcp.h.

boost::asio::streambuf sick_scan::SickScanCommonTcp::input_buffer_ [private]

Definition at line 152 of file sick_scan_common_tcp.h.

boost::asio::io_service sick_scan::SickScanCommonTcp::io_service_ [private]

Definition at line 149 of file sick_scan_common_tcp.h.

Definition at line 94 of file sick_scan_common_tcp.h.

Definition at line 146 of file sick_scan_common_tcp.h.

Definition at line 147 of file sick_scan_common_tcp.h.

Definition at line 95 of file sick_scan_common_tcp.h.

Number of bytes in buffer.

Definition at line 143 of file sick_scan_common_tcp.h.

Number of bytes in buffer.

Definition at line 138 of file sick_scan_common_tcp.h.

Definition at line 96 of file sick_scan_common_tcp.h.

Low-Level receive buffer for all data.

Definition at line 144 of file sick_scan_common_tcp.h.

Access mutex for buffer.

Definition at line 140 of file sick_scan_common_tcp.h.

Definition at line 159 of file sick_scan_common_tcp.h.

Receive buffer for everything except scan data and eval case data.

Definition at line 139 of file sick_scan_common_tcp.h.

std::string sick_scan::SickScanCommonTcp::port_ [private]

Definition at line 157 of file sick_scan_common_tcp.h.

Definition at line 93 of file sick_scan_common_tcp.h.

boost::asio::ip::tcp::socket sick_scan::SickScanCommonTcp::socket_ [private]

Definition at line 150 of file sick_scan_common_tcp.h.

Definition at line 158 of file sick_scan_common_tcp.h.


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


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Tue Jul 9 2019 05:05:35