31 #define PARSE_ERROR( buffer ) \
32 OTF_Error( "Parse error in function %s, file: %s, line: %i:\n %s\n", \
33 __FUNCTION__, __FILE__, __LINE__, OTF_RBuffer_printRecord( buffer ) );
101 uint32_t zbuffersize;
Definition: OTF_File.c:78
uint64_t time
Current time inside this stream, necessary for state machine, (-1) means unknown. ...
Definition: OTF_RBuffer.h:76
void OTF_RBuffer_setZBufferSize(OTF_RBuffer *rbuffer, uint32_t size)
Set zbuffer size.
Definition: OTF_RBuffer.c:372
uint32_t lastnewline
Last ' ' in the buffer.
Definition: OTF_RBuffer.h:58
uint32_t arraysize
Current size of array.
Definition: OTF_RBuffer.h:72
void OTF_RBuffer_setCurrentTime(OTF_RBuffer *rbuffer, uint64_t time)
Set the current time of the buffer to the given one.
Definition: OTF_RBuffer.c:827
void OTF_RBuffer_skipKeyword(OTF_RBuffer *rbuffer)
Advance the buffer position while there are capital letters.
Definition: OTF_RBuffer.c:1293
uint64_t lastTime
The very last timestamp of that stream.
Definition: OTF_RBuffer.h:95
int OTF_RBuffer_setJumpSize(OTF_RBuffer *rbuffer, size_t size)
Set 'jumpsize'.
Definition: OTF_RBuffer.c:408
uint64_t firstTime
The very first timestamp of that stream.
Definition: OTF_RBuffer.h:90
const char * OTF_RBuffer_readString(OTF_RBuffer *rbuffer)
Read a string from buffer and return it.
Definition: OTF_RBuffer.c:1205
OTF_RBuffer * OTF_RBuffer_open_with_external_buffer(uint32_t len, const char *buffer, uint8_t is_compressed)
constructor - internal use only – special version with a memory buffer to read from instead of an in...
Definition: OTF_RBuffer.c:254
uint32_t process
Current process inside this stream, necessary for state machine, (-1) means unknown.
Definition: OTF_RBuffer.h:80
int OTF_RBuffer_getFileProperties(OTF_RBuffer *rbuffer)
Determine buffers filesize, firstTime and lastTime if not already set.
Definition: OTF_RBuffer.c:993
OTF_RBuffer * OTF_RBuffer_open(const char *filename, OTF_FileManager *manager)
constructor - internal use only
Definition: OTF_RBuffer.c:191
uint32_t * array
Array which hold the members of a DEFPROCESSGROUP record or the list of attributes of a DEFATTRLIST r...
Definition: OTF_RBuffer.h:69
uint32_t OTF_RBuffer_readUint32(OTF_RBuffer *rbuffer)
Read an unsigned integer in hex format from buffer and return it.
Definition: OTF_RBuffer.c:879
Provides a low-level API for accessing files.
uint32_t end
Current end of data in buffer in case it is not full.
Definition: OTF_RBuffer.h:55
Definition: OTF_RBuffer.h:40
char * buffer
actual buffer
Definition: OTF_RBuffer.h:47
uint32_t size
Current size of buffer.
Definition: OTF_RBuffer.h:61
uint32_t OTF_RBuffer_getCurrentProcess(OTF_RBuffer *rbuffer)
Return the current process of the buffer.
Definition: OTF_RBuffer.c:834
int OTF_RBuffer_guaranteeRecord(OTF_RBuffer *rbuffer)
Ask the buffer to guarantee at least one complete record at the current read position inside the buff...
Definition: OTF_RBuffer.c:473
uint64_t filesize
Total size of the file in bytes.
Definition: OTF_RBuffer.h:85
uint32_t OTF_RBuffer_readArray(OTF_RBuffer *rbuffer, uint32_t **array, uint32_t *size)
Read an array from buffer and return the number of elements.
Definition: OTF_RBuffer.c:1239
uint32_t OTF_RBuffer_readBytes(OTF_RBuffer *rbuffer, uint8_t *array, uint32_t max_len)
Read a byte array in hex format from buffer and return the number of bytes read (=lenght of array)...
Definition: OTF_RBuffer.c:1319
int OTF_RBuffer_testKeyword(OTF_RBuffer *rbuffer, const char *string)
Test if the next string equals the given one (leading spaces are ignored).
Definition: OTF_RBuffer.c:927
int OTF_RBuffer_close(OTF_RBuffer *rbuffer)
destructor - internal use only
Definition: OTF_RBuffer.c:308
int OTF_RBuffer_testChar(OTF_RBuffer *rbuffer, char c)
Test if the next character equals the given one (leading spaces are ignored).
Definition: OTF_RBuffer.c:910
uint64_t OTF_RBuffer_readUint64(OTF_RBuffer *rbuffer)
Read an 64bit unsigned integer in hex format from buffer and return it.
Definition: OTF_RBuffer.c:848
char * OTF_RBuffer_getRecord(OTF_RBuffer *rbuffer)
Make the next record availabe from the buffer.
Definition: OTF_RBuffer.c:445
int OTF_RBuffer_jump(OTF_RBuffer *rbuffer, uint64_t filepos)
Jump to the given file position and restore buffer and references as if the buffer had reached the po...
Definition: OTF_RBuffer.c:650
void OTF_RBuffer_skipSpaces(OTF_RBuffer *rbuffer)
Advance the buffer position while there are spaces.
Definition: OTF_RBuffer.c:801
int OTF_RBuffer_testPrefix(OTF_RBuffer *rbuffer, const char *string)
Test if the next string equals the given one (leading spaces are ignored).
Definition: OTF_RBuffer.c:962
Provides an additional list of key value pairs that can be added to records.
uint64_t OTF_RBuffer_getFilePos(OTF_RBuffer *rbuffer)
Returns the fileposition of the file attached to this buffer.
Definition: OTF_RBuffer.c:1313
int OTF_RBuffer_searchTime(OTF_RBuffer *rbuffer, uint64_t time)
Search the buffer for the given time and set the buffer position to the next record after that time...
Definition: OTF_RBuffer.c:1077
void OTF_RBuffer_setCurrentProcess(OTF_RBuffer *rbuffer, uint32_t process)
Set the current process of the buffer to the given one.
Definition: OTF_RBuffer.c:841
int OTF_RBuffer_setSize(OTF_RBuffer *rbuffer, size_t size)
Set buffer size.
Definition: OTF_RBuffer.c:329
struct OTF_KeyValueList_struct OTF_KeyValueList
Object type which holds a key-value list.
Definition: OTF_KeyValue.h:242
char * OTF_RBuffer_printRecord(OTF_RBuffer *rbuffer)
Print the record at the current buffer position, i.e.
Definition: OTF_RBuffer.c:550
file handles management structure
Definition: OTF_FileManager.c:32
uint32_t jumpsize
If 'OTF_RBuffer_jump()' is called only 'jumpsize' bytes are read into buffer.
Definition: OTF_RBuffer.h:65
uint32_t OTF_RBuffer_readKeyValueList(OTF_RBuffer *buffer)
Read a KeyValueList from the buffer.
Definition: OTF_RBuffer.c:1361
uint32_t pos
Current read position in buffer.
Definition: OTF_RBuffer.h:51
int OTF_RBuffer_readNewline(OTF_RBuffer *rbuffer)
Read a newline such that the buffer pos is at the next record beginning.
Definition: OTF_RBuffer.c:777
Deals with all data type related issues.
uint64_t OTF_RBuffer_getFileSize(OTF_RBuffer *rbuffer)
Returns the filesize of the file attached to this buffer.
Definition: OTF_RBuffer.c:1306
uint64_t OTF_RBuffer_getCurrentTime(OTF_RBuffer *rbuffer)
Return the current time of the buffer.
Definition: OTF_RBuffer.c:813