Go to the documentation of this file.
120 JLTRACEG(
"raw size: " << raw.size());
125 std::deque<XsMessage> msgs;
127 JLTRACEG(
"Parse result " << res <<
": " << msgs.size() <<
" messages");
170 StandardThread::signalStopThread();
A list of uint8_t values.
bool wait()
Wait for the event to be set or object termination.
@ XRV_TIMEOUT
258: A timeout occurred
void terminate()
Terminates the thread.
@ XS_THREAD_PRIORITY_HIGH
void XSTYPES_DLL_API xsNameThisThread(const char *threadName)
Set the name of the current thread to threadName.
void signalStopThread(void) override
Tells the thread to stop but does not wait for it to end.
virtual const char * parserType() const
bool lock()
Locks the unlocked mutex.
@ XRV_TIMEOUTNODATA
259: Operation aborted because of no data read
virtual XsResultValue processBufferedData(const XsByteArray &rawIn, std::deque< XsMessage > &messages)=0
Read all messages from the buffered read data after adding new data supplied in rawIn.
void initFunction() override
Initializes the thread.
bool startThread(const char *name=NULL)
Starts the thread.
XsResultValue
Xsens result values.
int32_t innerFunction() override
The inner thread function.
DataParser()
Default constructor.
bool isTerminating() volatile const noexcept
Returns whether the thread should (have) terminate(d)
virtual void handleMessage(const XsMessage &message)=0
Handles a message.
Structure for storing a single message.
xsens::Mutex m_incomingMutex
bool unlock() noexcept
Unlocks the locked mutex.
void stopThread(void) noexcept
Tells the thread to stop and waits for it to end.
void clear()
Clears the data queue.
xsens::WaitEvent m_newDataEvent
std::queue< XsByteArray > m_incoming
void reset()
Reset the event.
bool setPriority(XsThreadPriority pri)
Sets the priority of the thread.
void terminate()
Terminates the thread.
void addRawData(const XsByteArray &arr)
Adds the raw data to an array.