Permalink
Cannot retrieve contributors at this time
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?
bfs/breadcrumbs/include/IOProcessor.hpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
42 lines (31 sloc)
830 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* 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 |