5 #ifndef SICK_SCAN_SICK_SCAN_COMMON_NW_H 6 #define SICK_SCAN_SICK_SCAN_COMMON_NW_H 47 bool init(std::string ipAddress,
48 unsigned short portNumber,
157 return m_frameLength;
161 UINT32 getPayLoadLength()
const;
163 std::string getCommandString()
const;
171 INT32 getVariableIndex();
174 std::string getVariableName();
177 {
return (m_buffer != NULL); }
180 void detectEncoding();
182 void detectMessageType();
201 {
return m_answerBuffer; }
204 {
return m_answerLength; }
207 {
return (m_answerBuffer != NULL); }
214 #endif //SICK_SCAN_SICK_SCAN_COMMON_NW_H
void closeTcpConnection()
SopasEventMessage findFrameInReceiveBuffer()
Class that encapsulates a buffer that was sent as return to a sync call. (variable / method) ...
bool init(std::string ipAddress, unsigned short portNumber, Tcp::DisconnectFunction disconnectFunction, void *obj)
void processFrame(SopasEventMessage &frame)
UINT8 m_responseBuffer[1024]
Receive buffer for everything except scan data and eval case data.
void sendCommandBuffer(UINT8 *buffer, UINT16 len)
UINT8 m_receiveBuffer[25000]
Low-Level receive buffer for all data (25000 should be enough for NAV300 Events)
void(* DisconnectFunction)(void *obj)
bool setReadCallbackFunction(Tcp::ReadFunction readFunction, void *obj)
void copyFrameToResposeBuffer(UINT32 frameLength)
bool isConnected()
Returns true if the tcp connection is established.
void(* ReadFunction)(void *obj, UINT8 *inputBuffer, UINT32 &numBytes)
UINT32 m_numberOfBytesInResponseBuffer
Number of bytes in buffer.
Object has been constructed. Use init() to go into CONNECTED state.
Unknown Command Language.
Mutex m_receiveDataMutex
Access mutex for buffer.
Class that represents a message that was sent by a sensor. (Event message)
UINT32 m_numberOfBytesInReceiveBuffer
Number of bytes in buffer.
void removeFrameFromReceiveBuffer(UINT32 frameLength)
void readCallbackFunction(UINT8 *buffer, UINT32 &numOfBytes)
~SopasEventMessage()
Destructor.
bool connect()
Connects to a sensor via tcp and reads the device name.
bool disconnect()
Closes the connection to the LMS. This is the opposite of init().
static void readCallbackFunctionS(void *obj, UINT8 *buffer, UINT32 &numOfBytes)
Function that will be called on incomming data via tcp.
SopasProtocol getProtocolType() const