return have;
}
+bool TFileTransport::peek() {
+ // check if there is an event ready to be read
+ if (!currentEvent_) {
+ currentEvent_ = readEvent();
+ }
+
+ // did not manage to read an event from the file. This could have happened
+ // if the timeout expired or there was some other error
+ if (!currentEvent_) {
+ return false;
+ }
+
+ // check if there is anything to read
+ return (currentEvent_->eventSize_ - currentEvent_->eventBuffPos_) > 0;
+}
+
uint32_t TFileTransport::read(uint8_t* buf, uint32_t len) {
// check if there an event is ready to be read
if (!currentEvent_) {
uint32_t readAll(uint8_t* buf, uint32_t len);
uint32_t read(uint8_t* buf, uint32_t len);
+ bool peek();
// log-file specific functions
void seekToChunk(int32_t chunk);