This is the local snap reader, which reads snapshot events from one location.
More...
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_Events.h>
#include <otf2/OTF2_Definitions.h>
#include <otf2/OTF2_AttributeList.h>
#include <otf2/OTF2_SnapReaderCallbacks.h>
Go to the source code of this file.
Detailed Description
This is the local snap reader, which reads snapshot events from one location.
Function Documentation
Return the location ID of the reading related location.
- Parameters:
-
| reader | Reader object which reads the snapshot events from its buffer. |
[out] | location | ID of the location. |
- Since:
- Version 1.2
- Returns:
- OTF2_SUCCESS if successful, an error code if an error occurs.
After callback registration, the local events could be read with the following function. Readn reads recordsToRead records. The reader indicates that it reached the end of the trace by just reading less records than requested.
- Parameters:
-
| reader | Reader object which reads the events from its buffer. |
| recordsToRead | How many records can be read next. |
[out] | recordsRead | Return how many records where really read. |
- Since:
- Version 1.2
- Returns:
- OTF2_SUCCESS if successful, an error code if an error occurs.
Seek jumps to start of latest snaphot that was made before a given time 'req_time'.
- Parameters:
-
reader | Reader object which reads the events from its buffer. |
req_time | Requested time (see above) |
found | returns if a matching snapshot was found |
- Since:
- Version 1.2
- Returns:
- OTF2_Error_Code with !=OTF2_SUCCESS if there was an error.
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.
These callbacks are ignored, if the events are read by an global event reader.
- Parameters:
-
reader | Reader object which reads the events from its buffer. |
callbacks | Struct which holds a function pointer for each record type. OTF2_SnapReaderCallbacks_New. |
userData | Data passed as argument userData to the record callbacks. |
- Since:
- Version 1.2
- Returns:
- OTF2_SUCCESS if successful, an error code if an error occurs.