35 #ifndef SICK_TIM3XX_COMMON_TCP_H 36 #define SICK_TIM3XX_COMMON_TCP_H 41 #include <boost/asio.hpp> 43 #undef NOMINMAX // to get rid off warning C4005: "NOMINMAX": Makro-Neudefinition 71 static void disconnectFunctionS(
void *obj);
74 char cola_dialect_id);
78 static void readCallbackFunctionS(
void *obj,
UINT8 *buffer,
UINT32 &numOfBytes);
80 void readCallbackFunction(
UINT8 *buffer,
UINT32 &numOfBytes);
82 void setReplyMode(
int _mode);
86 void setEmulSensor(
bool _emulFlag);
92 int numberOfDatagramInInputFifo();
109 void disconnectFunction();
111 void readCallbackFunctionOld(
UINT8 *buffer,
UINT32 &numOfBytes);
113 virtual int init_device();
115 virtual int close_device();
118 virtual int sendSOPASCommand(
const char *request, std::vector<unsigned char> *reply,
int cmdLen);
129 get_datagram(
ros::Time &recvTimeStamp,
unsigned char *receiveBuffer,
int bufferSize,
int *actual_length,
130 bool isBinaryProtocol,
int *numberOfRemainingFifoEntries);
133 int readWithTimeout(
size_t timeout_ms,
char *buffer,
int buffer_size,
int *bytes_read = 0,
134 bool *exception_occured = 0,
bool isBinary =
false);
136 void handleRead(boost::system::error_code error,
size_t bytes_transfered);
138 void checkDeadline();
159 boost::system::error_code
ec_;
boost::asio::io_service io_service_
boost::asio::ip::tcp::socket socket_
DatagramWithTimeStamp(ros::Time timeStamp_, std::vector< unsigned char > datagram_)
Queue< DatagramWithTimeStamp > recvQueue
UINT32 m_alreadyReceivedBytes
std::vector< unsigned char > datagram
boost::asio::streambuf input_buffer_
boost::asio::deadline_timer deadline_
UINT32 m_numberOfBytesInReceiveBuffer
Number of bytes in buffer.
boost::system::error_code ec_
UINT32 m_numberOfBytesInResponseBuffer
Number of bytes in buffer.
Class that represents a message that was sent by a sensor. (Event message)
Mutex m_receiveDataMutex
Access mutex for buffer.