NewMadeleine

Documentation

« back to PM2 home.
nm_trace_gen.h
Go to the documentation of this file.
1/*
2 * NewMadeleine
3 * Copyright (C) 2014-2025 (see AUTHORS file)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef NM_TRACE_GEN_H
17#define NM_TRACE_GEN_H
18
24#include <stdint.h>
25#include "nm_trace.h"
26
27/* ********************************************************* */
28
30{
31 uint8_t r;
32 uint8_t g;
33 uint8_t b;
34};
35#define NM_TRACE_GEN_RGB(R, G, B) ((struct nm_trace_gen_rgb_s){ .r = R, .g = G, .b = B})
36#define NM_TRACE_GEN_BLACK NM_TRACE_GEN_RGB(0, 0, 0)
37#define NM_TRACE_GEN_GREY NM_TRACE_GEN_RGB(85, 85, 85)
38#define NM_TRACE_GEN_WHITE NM_TRACE_GEN_RGB(255, 255, 255)
39#define NM_TRACE_GEN_RED NM_TRACE_GEN_RGB(255, 0, 0)
40#define NM_TRACE_GEN_GREEN NM_TRACE_GEN_RGB(0, 255, 0)
41#define NM_TRACE_GEN_BLUE NM_TRACE_GEN_RGB(0, 0, 255)
42#define NM_TRACE_GEN_LIGHTBROWN NM_TRACE_GEN_RGB(170, 130, 130)
43#define NM_TRACE_GEN_PINK NM_TRACE_GEN_RGB(255, 0, 255)
44#define NM_TRACE_GEN_ORANGE NM_TRACE_GEN_RGB(255, 160, 0)
45#define NM_TRACE_GEN_YELLOW NM_TRACE_GEN_RGB(255, 255, 0)
46#define NM_TRACE_GEN_TEAL NM_TRACE_GEN_RGB(0, 255, 255)
47#define NM_TRACE_GEN_PURPLE NM_TRACE_GEN_RGB(153, 25, 230)
48
49/* ********************************************************* */
50
51__PUK_SYM_INTERNAL
52void nm_trace_gen_init(const char*trace_name);
53
54__PUK_SYM_INTERNAL
55void nm_trace_gen_end(double end_time);
56
57__PUK_SYM_INTERNAL
58void nm_trace_gen_comment(const char*p_text);
59
60__PUK_SYM_INTERNAL
61void nm_trace_gen_container_type(const char*p_name, const char*p_short_name, const char*p_parent_type);
62
63__PUK_SYM_INTERNAL
64void nm_trace_gen_container_add(double t, const char*p_name, const char*p_short_name, const char*p_type,
65 const char*p_parent, int leaf);
66
67__PUK_SYM_INTERNAL
68void nm_trace_gen_container_add_string(double t, padico_string_t name, padico_string_t short_name,
69 padico_string_t parent, const char*p_type, int leaf);
70
71__PUK_SYM_INTERNAL
72void nm_trace_gen_link_type(const char*p_name, const char*p_short_name,
73 const char*p_cont_type, const char*p_src_type, const char*p_dest_type);
74
75__PUK_SYM_INTERNAL
76void nm_trace_gen_link_start(double t, const char*p_link_type, const char*p_container,
77 const char*p_src, const char*p_dest, const char*p_value, padico_string_t p_key);
78
79__PUK_SYM_INTERNAL
80void nm_trace_gen_link_end(double t, const char*p_link_type, const char*p_container,
81 const char*p_src, const char*p_dest, const char*p_value, padico_string_t p_key);
82
83__PUK_SYM_INTERNAL
84void nm_trace_gen_state_type(const char*p_name, const char*p_short_name, const char*p_cont_type);
85
86__PUK_SYM_INTERNAL
87void nm_trace_gen_state_set(double t, const char*p_state_type, const char*p_cont_name, const char*p_state_name);
88
89__PUK_SYM_INTERNAL
90void nm_trace_gen_entity_declare(const char*p_name, const char*p_short_name, const char*p_cont_type, struct nm_trace_gen_rgb_s rgb);
91
92__PUK_SYM_INTERNAL
93void nm_trace_gen_var_type(const char*p_name, const char*p_short_name, const char*p_cont_type);
94
95__PUK_SYM_INTERNAL
96void nm_trace_gen_var_set(double t, const char*p_var_name, const char*p_cont_name, int value);
97
98
99#endif /* NM_TRACE_GEN_H */
Definitions for traces.
__PUK_SYM_INTERNAL void nm_trace_gen_var_set(double t, const char *p_var_name, const char *p_cont_name, int value)
__PUK_SYM_INTERNAL void nm_trace_gen_container_type(const char *p_name, const char *p_short_name, const char *p_parent_type)
__PUK_SYM_INTERNAL void nm_trace_gen_init(const char *trace_name)
__PUK_SYM_INTERNAL void nm_trace_gen_end(double end_time)
__PUK_SYM_INTERNAL void nm_trace_gen_container_add(double t, const char *p_name, const char *p_short_name, const char *p_type, const char *p_parent, int leaf)
__PUK_SYM_INTERNAL void nm_trace_gen_entity_declare(const char *p_name, const char *p_short_name, const char *p_cont_type, struct nm_trace_gen_rgb_s rgb)
__PUK_SYM_INTERNAL void nm_trace_gen_state_type(const char *p_name, const char *p_short_name, const char *p_cont_type)
__PUK_SYM_INTERNAL void nm_trace_gen_container_add_string(double t, padico_string_t name, padico_string_t short_name, padico_string_t parent, const char *p_type, int leaf)
__PUK_SYM_INTERNAL void nm_trace_gen_state_set(double t, const char *p_state_type, const char *p_cont_name, const char *p_state_name)
__PUK_SYM_INTERNAL void nm_trace_gen_comment(const char *p_text)
__PUK_SYM_INTERNAL void nm_trace_gen_link_start(double t, const char *p_link_type, const char *p_container, const char *p_src, const char *p_dest, const char *p_value, padico_string_t p_key)
__PUK_SYM_INTERNAL void nm_trace_gen_link_type(const char *p_name, const char *p_short_name, const char *p_cont_type, const char *p_src_type, const char *p_dest_type)
__PUK_SYM_INTERNAL void nm_trace_gen_link_end(double t, const char *p_link_type, const char *p_container, const char *p_src, const char *p_dest, const char *p_value, padico_string_t p_key)
__PUK_SYM_INTERNAL void nm_trace_gen_var_type(const char *p_name, const char *p_short_name, const char *p_cont_type)