![]() |
1.2.1 (revision 3238)
|
This is the local definition reader, which reads location dependend definitions, and can also be used to get the mapping information from the local definition file. Local definitions are always assigned to a location. More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_Definitions.h>
#include <otf2/OTF2_DefReaderCallbacks.h>
Go to the source code of this file.
Functions | |
OTF2_ErrorCode | OTF2_DefReader_GetLocationID (const OTF2_DefReader *reader, OTF2_LocationRef *location) |
Get the location ID of this reader object. | |
OTF2_ErrorCode | OTF2_DefReader_ReadDefinitions (OTF2_DefReader *reader, uint64_t recordsToRead, uint64_t *recordsRead) |
Reads the given number of records from the definition reader. | |
OTF2_ErrorCode | OTF2_DefReader_SetCallbacks (OTF2_DefReader *reader, const OTF2_DefReaderCallbacks *callbacks, void *userData) |
Sets the callback functions for the given reader object. Everytime 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. |
This is the local definition reader, which reads location dependend definitions, and can also be used to get the mapping information from the local definition file. Local definitions are always assigned to a location.
OTF2_ErrorCode OTF2_DefReader_GetLocationID | ( | const OTF2_DefReader * | reader, |
OTF2_LocationRef * | location | ||
) |
Get the location ID of this reader object.
reader | This given reader object will be deleted. |
location | Pointer to the variable where the location ID is returned in. |
OTF2_ErrorCode OTF2_DefReader_ReadDefinitions | ( | OTF2_DefReader * | reader, |
uint64_t | recordsToRead, | ||
uint64_t * | recordsRead | ||
) |
Reads the given number of records from the definition reader.
reader | The records of this reader will be read when the function is issued. | |
recordsToRead | This variable tells the reader how much records it has to read. | |
[out] | recordsRead | This is a pointer to variable where the amount of actually read records is returned. This may differ to the given recordsToRead if there are no more records left in the trace. In this case the programmer can easily check that the reader has finnished his job by checking recordsRead < recordsToRead. |
if successful
if an user supplied callback returned OTF2_CALLBACK_INTERRUPT
if an duplicate mapping table definition was read
the error code
OTF2_ErrorCode OTF2_DefReader_SetCallbacks | ( | OTF2_DefReader * | reader, |
const OTF2_DefReaderCallbacks * | callbacks, | ||
void * | userData | ||
) |
Sets the callback functions for the given reader object. Everytime 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 setted up with new callback functions. |
callbacks | Struct which holds a function pointer for each record type. OTF2_DefReaderCallbacks_New. |
userData | Data passed as argument userData to the record callbacks. |