2.3 (revision 117c8d5b)
OTF2_EvtReader.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Score-P software (http://www.score-p.org)
3  *
4  * Copyright (c) 2009-2013,
5  * RWTH Aachen University, Germany
6  *
7  * Copyright (c) 2009-2013,
8  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
9  *
10  * Copyright (c) 2009-2013,
11  * Technische Universitaet Dresden, Germany
12  *
13  * Copyright (c) 2009-2013,
14  * University of Oregon, Eugene, USA
15  *
16  * Copyright (c) 2009-2013,
17  * Forschungszentrum Juelich GmbH, Germany
18  *
19  * Copyright (c) 2009-2013,
20  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
21  *
22  * Copyright (c) 2009-2013,
23  * Technische Universitaet Muenchen, Germany
24  *
25  * This software may be modified and distributed under the terms of
26  * a BSD-style license. See the COPYING file in the package base
27  * directory for details.
28  *
29  */
30 
31 
32 #ifndef OTF2_EVT_READER_H
33 #define OTF2_EVT_READER_H
34 
35 
44 #include <stdint.h>
45 
46 
47 #include <otf2/OTF2_ErrorCodes.h>
48 
49 
50 #include <otf2/OTF2_Events.h>
51 #include <otf2/OTF2_Definitions.h>
54 
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif /* __cplusplus */
59 
60 
71  OTF2_LocationRef* location );
72 
73 
85  uint64_t* position );
86 
87 
107  const OTF2_EvtReaderCallbacks* callbacks,
108  void* userData );
109 
110 
122  uint64_t position );
123 
124 
138  uint64_t recordsToRead,
139  uint64_t* recordsRead );
140 
141 
160  OTF2_TimeStamp time );
161 
162 
174  uint64_t recordsToRead,
175  uint64_t* recordsRead );
176 
177 
191  bool action );
192 
193 
208  bool action );
209 
210 
211 #ifdef __cplusplus
212 }
213 #endif /* __cplusplus */
214 
215 
216 #endif /* !OTF2_EVT_READER_H */
uint64_t OTF2_LocationRef
Type used to indicate a reference to a Location definition.
Definition: OTF2_GeneralDefinitions.h:139
OTF2_ErrorCode OTF2_EvtReader_ReadEvents(OTF2_EvtReader *reader, uint64_t recordsToRead, uint64_t *recordsRead)
After callback registration, the local events could be read with the following function. Reads at most recordsToRead records. The reader indicates that it reached the end of the trace by just reading less records than requested.
Enums and types used in event records.
This layer enables dynamic appending of arbitrary attributes to any type of event record...
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:54
OTF2_ErrorCode OTF2_EvtReader_Seek(OTF2_EvtReader *reader, uint64_t position)
Seek jumps to an event position.
Data types used in the definition records.
OTF2_ErrorCode OTF2_EvtReader_GetLocationID(const OTF2_EvtReader *reader, OTF2_LocationRef *location)
Return the location ID of the reading related location.
OTF2_ErrorCode OTF2_EvtReader_ApplyMappingTables(OTF2_EvtReader *reader, bool action)
Enable or disable applying of the mapping tables to events read from this event reader.
uint64_t OTF2_TimeStamp
OTF2 time stamp.
Definition: OTF2_GeneralDefinitions.h:103
OTF2_ErrorCode OTF2_EvtReader_ReadEventsBackward(OTF2_EvtReader *reader, uint64_t recordsToRead, uint64_t *recordsRead)
This functions reads recordsRead events backwards from the current position.
OTF2_ErrorCode OTF2_EvtReader_SetCallbacks(OTF2_EvtReader *reader, const OTF2_EvtReaderCallbacks *callbacks, void *userData)
Sets the callback functions for the given reader object. Every time when OTF2 reads a record...
OTF2_ErrorCode OTF2_EvtReader_GetPos(OTF2_EvtReader *reader, uint64_t *position)
The following function can be used to get the position (number of the event in the stream) of last re...
This defines the callbacks for the event reader.
OTF2_ErrorCode OTF2_EvtReader_TimeStampRewrite(OTF2_EvtReader *reader, OTF2_TimeStamp time)
The following function rewrites the timestamp from the event on the actual reading position if the bu...
Error codes and error handling.
struct OTF2_EvtReader_struct OTF2_EvtReader
OTF2 local event reader handle.
Definition: OTF2_GeneralDefinitions.h:244
struct OTF2_EvtReaderCallbacks_struct OTF2_EvtReaderCallbacks
Opaque struct which holds all event record callbacks.
Definition: OTF2_EvtReaderCallbacks.h:62
OTF2_ErrorCode OTF2_EvtReader_ApplyClockOffsets(OTF2_EvtReader *reader, bool action)
Enable or disable applying of the clock offset to event timestamps read from this event reader...