Go to the documentation of this file.
91 if (bytes.size() == 0)
93 else if (bytes.size() < 256)
A list of uint8_t values.
virtual int32_t conjureUpWaitTime(const XsByteArray &bytes) const
Conjure up the time to wait based on properties of the received data (like the length)
void XSTYPES_DLL_API xsNameThisThread(const char *threadName)
Set the name of the current thread to threadName.
virtual ~DataPoller()
Destroy the data poller.
virtual const char * parserType() const
@ XS_THREAD_PRIORITY_HIGHER
int32_t innerFunction() override
The inner thread function.
@ XRV_OK
0: Operation was performed successfully
void initFunction() override
Init function for the thread, sets the priority higher.
void cleanup()
Clean up the DataPoller.
DataPoller(DataParser &parser)
Create a DataPoller with a parser.
virtual XsResultValue readDataToBuffer(XsByteArray &raw)=0
Read available data from the open IO device.
void stopThread(void) noexcept
Tells the thread to stop and waits for it to end.
A class for the data parsing on a separete thread.
XsThreadId getThreadId(void) const
bool setPriority(XsThreadPriority pri)
Sets the priority of the thread.
#define xsGetCurrentThreadId()
void addRawData(const XsByteArray &arr)
Adds the raw data to an array.