3.1-rc3 (revision d9ca08bb)
Functions
OTF2_MarkerReader.h File Reference

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...
 

Detailed Description

This file provides all routines that read marker records.

Function Documentation

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.

Parameters
readerReader Object.
recordsToReadHow many records have to be read next.
recordsReadHow many records where read?
Since
Version 1.2
Returns
OTF2_ErrorCode with !=OTF2_SUCCESS if there was an error.
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.

Parameters
readerThis given reader object will be set up with new callback functions.
callbacksStruct which holds a function pointer for each record type. OTF2_MarkerReaderCallbacks_New.
userDataData passed as argument userData to the record callbacks.
Since
Version 1.2
Returns
OTF2_SUCCESS if successful, an error code if an error occurs.