Skip to content
Permalink
8bcf32fcd8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
42 lines (31 sloc) 830 Bytes
/*
*
* Stores the interface for building a sensor thread
* implementation.
*
*/
#ifndef SENSOR_INTERFACE_HPP
#define SENSOR_INTERFACE_HPP
#include <stdio.h>
#include <Windows.h>
class IOProcessor
{
public:
IOProcessor(LPCVOID pThreadArgs) { threadArgs = pThreadArgs; };
// Thread routine for implementation to override
virtual VOID threadRuntime(IOProcessor *ioProc) = 0;
// Thread initialization, should not be called directly!
static DWORD threadInit(LPVOID pThreadArgs);
// Async control
UINT8 startThread();
BOOL waitForThread();
// Sync control
BOOLEAN bufferDataAvailable();
SIZE_T getBufferData(LPCSTR* bufferKeyArray, LPCSTR* bufferValueArray);
VOID setDataStoreValue(LPCSTR key, LPCVOID value, SIZE_T valueSize);
protected:
LPCVOID threadArgs;
DWORD dwThreadId;
HANDLE hThread;
};
#endif