reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
trace.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "lf_core_version.h"

Go to the source code of this file.

Data Structures

struct  object_description_t
 
struct  trace_record_nodeps_t
 

Typedefs

typedef struct object_description_t object_description_t
 

Enumerations

enum  _lf_trace_object_t { trace_reactor , trace_trigger , trace_user }
 

Functions

version_t lf_version_tracing ()
 Return a description of the compile-time properties of the current plugin.
 
void lf_tracing_global_init (char *file_name_prefix, int process_id, int max_num_local_threads)
 Initialize the tracing module. Calling other API functions before calling this procedure is undefined behavior.
 
void lf_tracing_register_trace_event (object_description_t description)
 Register a kind of trace event. This should be called before tracepoints are reached.
 
void lf_tracing_set_start_time (int64_t start_time)
 Give the tracing module access to the start time. This may be invoked after many tracepoints have already been recorded but should be invoked early.
 
void lf_tracing_tracepoint (int worker, trace_record_nodeps_t *tr)
 Submit a tracepoint from the given worker to the tracing module.
 
void lf_tracing_global_shutdown ()
 Shut down the tracing module. Calling other API functions after calling this procedure is undefined behavior.
 

Typedef Documentation

◆ object_description_t

typedef struct object_description_t object_description_t

Struct for table of pointers to a description of the object.

Enumeration Type Documentation

◆ _lf_trace_object_t

Identifier for what is in the object table.

Enumerator
trace_reactor 
trace_trigger 
trace_user 

Function Documentation

◆ lf_tracing_global_init()

void lf_tracing_global_init ( char * file_name_prefix,
int process_id,
int max_num_local_threads )

Initialize the tracing module. Calling other API functions before calling this procedure is undefined behavior.

Parameters
file_name_prefixPrefix to attach to any files that may be produced by the tracing module.
process_idThe ID of the current federate, or -1 if this is the RTI. 0 if unfederated.
max_num_local_threadsAn upper bound on the number of threads created by this process.

◆ lf_tracing_global_shutdown()

void lf_tracing_global_shutdown ( )

Shut down the tracing module. Calling other API functions after calling this procedure is undefined behavior.

◆ lf_tracing_register_trace_event()

void lf_tracing_register_trace_event ( object_description_t description)

Register a kind of trace event. This should be called before tracepoints are reached.

Parameters
descriptionA description of some trace events which may be received in the future. This may be invoked after many tracepoints have already been recorded but should be invoked early.

◆ lf_tracing_set_start_time()

void lf_tracing_set_start_time ( int64_t start_time)

Give the tracing module access to the start time. This may be invoked after many tracepoints have already been recorded but should be invoked early.

◆ lf_tracing_tracepoint()

void lf_tracing_tracepoint ( int worker,
trace_record_nodeps_t * tr )

Submit a tracepoint from the given worker to the tracing module.

◆ lf_version_tracing()

version_t lf_version_tracing ( )

Return a description of the compile-time properties of the current plugin.