Class SickScanCommonTcp

Inheritance Relationships

Base Type

Class Documentation

class SickScanCommonTcp : public sick_scan_xd::SickScanCommon

Public Functions

SickScanCommonTcp(const std::string &hostname, const std::string &port, int &timelimit, rosNodePtr nh, SickGenericParser *parser, char cola_dialect_id)
virtual ~SickScanCommonTcp()
void readCallbackFunction(UINT8 *buffer, UINT32 &numOfBytes)
void setReplyMode(int _mode)
int getReplyMode()
void setEmulSensor(bool _emulFlag)
bool getEmulSensor()
bool stopScanData(bool force_immediate_shutdown = false)
int numberOfDatagramInInputFifo()
SopasEventMessage findFrameInReceiveBuffer()
void processFrame(rosTime timeStamp, SopasEventMessage &frame)
int reinit(rosNodePtr nh, int delay_millisec)
virtual int init_device()
virtual int close_device()
inline bool isConnected()

Public Members

Queue<DatagramWithTimeStamp> recvQueue
UINT32 m_alreadyReceivedBytes
UINT32 m_lastPacketSize
UINT8 m_packetBuffer[480000]

Public Static Functions

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

Protected Functions

void disconnectFunction()

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

void readCallbackFunctionOld(UINT8 *buffer, UINT32 &numOfBytes)
virtual int sendSOPASCommand(const char *request, std::vector<unsigned char> *reply, int cmdLen, bool wait_for_reply = true)

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

virtual int get_datagram(rosNodePtr nh, rosTime &recvTimeStamp, unsigned char *receiveBuffer, int bufferSize, int *actual_length, bool isBinaryProtocol, int *numberOfRemainingFifoEntries, const std::vector<std::string> &datagram_keywords)

Read a datagram from the device.

Parameters:
  • recvTimeStamp[out] timestamp of received datagram

  • receiveBuffer[in] data buffer to fill

  • bufferSize[in] max data size to write to buffer (result should be 0 terminated)

  • actual_length[out] the actual amount of data written

  • isBinaryProtocol[in] true=binary False=ASCII

  • datagram_keywords[in] keyword in returned datagram, e.g. { “LMDscandata” } to get scandata telegrams, or {} (empty vector) for next received datagram

virtual int readWithTimeout(size_t timeout_ms, char *buffer, int buffer_size, int *bytes_read, const std::vector<std::string> &datagram_keywords)