2.3 (revision 117c8d5b)
OTF2_MarkerReaderCallbacks.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) 2013,
5  * Technische Universitaet Dresden, Germany
6  *
7  * This software may be modified and distributed under the terms of
8  * a BSD-style license. See the COPYING file in the package base
9  * directory for details.
10  */
11 
12 
13 #ifndef OTF2_MARKER_READER_CALLBACKS_H
14 #define OTF2_MARKER_READER_CALLBACKS_H
15 
16 
24 #include <stdint.h>
25 
26 
27 #include <otf2/OTF2_ErrorCodes.h>
28 
29 
31 #include <otf2/OTF2_Definitions.h>
32 #include <otf2/OTF2_IdMap.h>
33 
34 
35 #include <otf2/OTF2_Marker.h>
36 
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41 
42 
45 typedef struct OTF2_MarkerReaderCallbacks_struct OTF2_MarkerReaderCallbacks;
46 
47 
56 
57 
65 void
67 
68 
76 void
78 
79 
91 typedef OTF2_CallbackCode
92 ( *OTF2_MarkerReaderCallback_Unknown )( void* userData );
93 
94 
111  OTF2_MarkerReaderCallbacks* markerReaderCallbacks,
112  OTF2_MarkerReaderCallback_Unknown unknownCallback );
113 
114 
133 typedef OTF2_CallbackCode
135  OTF2_MarkerRef self,
136  const char* markerGroup,
137  const char* markerCategory,
138  OTF2_MarkerSeverity severity );
139 
140 
156  OTF2_MarkerReaderCallbacks* markerReaderCallbacks,
157  OTF2_MarkerReaderCallback_DefMarker defMarkerCallback );
158 
159 
179 typedef OTF2_CallbackCode
180 ( *OTF2_MarkerReaderCallback_Marker )( void* userData,
181  OTF2_TimeStamp timestamp,
182  OTF2_TimeStamp duration,
183  OTF2_MarkerRef marker,
184  OTF2_MarkerScope scope,
185  uint64_t scopeRef,
186  const char* text );
187 
188 
204  OTF2_MarkerReaderCallbacks* markerReaderCallbacks,
205  OTF2_MarkerReaderCallback_Marker markerCallback );
206 
207 
208 #ifdef __cplusplus
209 }
210 #endif /* __cplusplus */
211 
212 
213 #endif /* !OTF2_MARKER_READER_CALLBACKS_H */
OTF2_CallbackCode(* OTF2_MarkerReaderCallback_Marker)(void *userData, OTF2_TimeStamp timestamp, OTF2_TimeStamp duration, OTF2_MarkerRef marker, OTF2_MarkerScope scope, uint64_t scopeRef, const char *text)
Function pointer definition for the callback which is triggered by a Marker record.
Definition: OTF2_MarkerReaderCallbacks.h:180
OTF2_CallbackCode(* OTF2_MarkerReaderCallback_Unknown)(void *userData)
Function pointer definition for the callback which is triggered for an unknown marker.
Definition: OTF2_MarkerReaderCallbacks.h:92
void OTF2_MarkerReaderCallbacks_Clear(OTF2_MarkerReaderCallbacks *markerReaderCallbacks)
Clears a struct for the marker callbacks.
void OTF2_MarkerReaderCallbacks_Delete(OTF2_MarkerReaderCallbacks *markerReaderCallbacks)
Deallocates a struct for the marker callbacks.
OTF2_ErrorCode
Definition: OTF2_ErrorCodes.h:54
OTF2_ErrorCode OTF2_MarkerReaderCallbacks_SetDefMarkerCallback(OTF2_MarkerReaderCallbacks *markerReaderCallbacks, OTF2_MarkerReaderCallback_DefMarker defMarkerCallback)
Registers the callback for the DefMarker definition.
Data types used in the definition records.
OTF2_ErrorCode OTF2_MarkerReaderCallbacks_SetMarkerCallback(OTF2_MarkerReaderCallbacks *markerReaderCallbacks, OTF2_MarkerReaderCallback_Marker markerCallback)
Registers the callback for the Marker record.
This header file provides general definitions which should be accessible in all internal and external...
OTF2_ErrorCode OTF2_MarkerReaderCallbacks_SetUnknownCallback(OTF2_MarkerReaderCallbacks *markerReaderCallbacks, OTF2_MarkerReaderCallback_Unknown unknownCallback)
Registers the callback for an unknown marker.
uint8_t OTF2_MarkerSeverity
Wrapper for enum OTF2_MarkerSeverity_enum.
Definition: OTF2_Marker.h:45
uint64_t OTF2_TimeStamp
OTF2 time stamp.
Definition: OTF2_GeneralDefinitions.h:103
uint32_t OTF2_MarkerRef
Type used to indicate a reference to a DefMarker definition.
Definition: OTF2_Marker.h:39
OTF2_CallbackCode
Return value to indicate that the record reading should be interrupted.
Definition: OTF2_GeneralDefinitions.h:344
This file provides types and enums for markers.
OTF2_MarkerReaderCallbacks * OTF2_MarkerReaderCallbacks_New(void)
Allocates a new struct for the marker callbacks.
Identifier mapping data structure, based on Scalasca's epk_idmap.h.
OTF2_CallbackCode(* OTF2_MarkerReaderCallback_DefMarker)(void *userData, OTF2_MarkerRef self, const char *markerGroup, const char *markerCategory, OTF2_MarkerSeverity severity)
Function pointer definition for the callback which is triggered by a DefMarker definition record...
Definition: OTF2_MarkerReaderCallbacks.h:134
struct OTF2_MarkerReaderCallbacks_struct OTF2_MarkerReaderCallbacks
Opaque struct which holds all definition record callbacks.
Definition: OTF2_MarkerReaderCallbacks.h:45
uint8_t OTF2_MarkerScope
Wrapper for enum OTF2_MarkerScope_enum.
Definition: OTF2_Marker.h:62
Error codes and error handling.