3.0.1 (revision 9160da48)
|
This file provides all routines that read marker records. More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_Marker.h>
#include <otf2/OTF2_MarkerReaderCallbacks.h>
Go to the source code of this file.
Functions | |
OTF2_ErrorCode | OTF2_MarkerReader_ReadMarkers (OTF2_MarkerReader *reader, uint64_t recordsToRead, uint64_t *recordsRead) |
After callback registration, the markers could be read with the following function. The user of this function tells the system how many markers it is able to handle (recordsToRead) and the function returns how many markers where in the stream (recordsRead). It should usually be the case that both values are the same. If this is not the case, then there where less records than requested in the stream. More... | |
OTF2_ErrorCode | OTF2_MarkerReader_SetCallbacks (OTF2_MarkerReader *reader, const OTF2_MarkerReaderCallbacks *callbacks, void *userData) |
Sets the callback functions for the given reader object. Every time when OTF2 reads a record, a callback function is called and the records data is passed to this function. Therefore the programmer needs to set function pointers at the "callbacks" struct for the record type he wants to read. More... | |
This file provides all routines that read marker records.
OTF2_ErrorCode OTF2_MarkerReader_ReadMarkers | ( | OTF2_MarkerReader * | reader, |
uint64_t | recordsToRead, | ||
uint64_t * | recordsRead | ||
) |
After callback registration, the markers could be read with the following function. The user of this function tells the system how many markers it is able to handle (recordsToRead) and the function returns how many markers where in the stream (recordsRead). It should usually be the case that both values are the same. If this is not the case, then there where less records than requested in the stream.
reader | Reader Object. |
recordsToRead | How many records have to be read next. |
recordsRead | How many records where read? |
OTF2_ErrorCode OTF2_MarkerReader_SetCallbacks | ( | OTF2_MarkerReader * | reader, |
const OTF2_MarkerReaderCallbacks * | callbacks, | ||
void * | userData | ||
) |
Sets the callback functions for the given reader object. Every time when OTF2 reads a record, a callback function is called and the records data is passed to this function. Therefore the programmer needs to set function pointers at the "callbacks" struct for the record type he wants to read.
reader | This given reader object will be set up with new callback functions. |
callbacks | Struct which holds a function pointer for each record type. OTF2_MarkerReaderCallbacks_New. |
userData | Data passed as argument userData to the record callbacks. |