7 #include "../tools/errorhandler.hpp" 8 #include "../tools/toolbox.hpp" 39 bool File::open(std::string inputFileName,
bool beVerbose)
121 else if (result == 0)
149 const std::streamsize max_length = 8192;
150 char inBuffer[max_length];
151 INT32 recvMsgSize = 0;
156 printError(
"File::readInputData: File is not open, aborting!");
179 printWarning(
"File::readInputData: Discarding data because there is no callback function!");
182 else if (recvMsgSize == 0)
185 printInfoMessage(
"File::readInputData: Read 0 bytes - end of file or file connection is lost!",
true);
void printError(std::string message)
std::string toString(const PositionWGS84::PositionWGS84SourceType &type)
void * m_readFunctionObjPtr
std::string m_inputFileName
DisconnectFunction m_disconnectFunction
void setReadCallbackFunction(ReadFunction readFunction, void *obj)
SickThread< File,&File::readThreadFunction > m_readThread
#define printInfoMessage(a, b)
void setDisconnectCallbackFunction(DisconnectFunction discFunction, void *obj)
ReadFunction m_readFunction
void(* DisconnectFunction)(void *obj)
void(* ReadFunction)(void *obj, UINT8 *inputBuffer, UINT32 &numBytes)
std::ifstream m_inputFileStream
void readThreadFunction(bool &endThread, UINT16 &waitTimeMs)
void printWarning(std::string message)
bool open(std::string inputFileName, bool beVerbose=false)
void * m_disconnectFunctionObjPtr