R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BUcesbDecl.h
Go to the documentation of this file.
1#pragma once
2/******************************************************************************
3 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
4 * Copyright (C) 2019-2025 Members of R3B Collaboration *
5 * *
6 * This software is distributed under the terms of the *
7 * GNU General Public Licence (GPL) version 3, *
8 * copied verbatim in the file "LICENSE". *
9 * *
10 * In applying this license GSI does not waive the privileges and immunities *
11 * granted to it by virtue of its status as an Intergovernmental Organization *
12 * or submit itself to any jurisdiction. *
13 ******************************************************************************/
14
15// This header file can totally be avoided if, for some reasons, Ucesb client code base didn't hide these declarations
16// in SOURCE file.
17
18#include <cstddef>
19#include <cstdint>
20
21constexpr auto EXT_DATA_STATE_INIT = 0;
22constexpr auto EXT_DATA_STATE_OPEN = 1;
23constexpr auto EXT_DATA_STATE_OPEN_OUT = 2;
25constexpr auto EXT_DATA_STATE_SETUP_READ = 4;
26constexpr auto EXT_DATA_STATE_SETUP_WRITE = 5;
27
29{
30 uint32_t _offset; /* Not used within STRUCT_WRITER itself. */
31 uint32_t _length; /* not needed, info only */
32 const char* _block; /* not needed, info only */
33
34 const char* _var_name;
36 const char* _var_ctrl_name;
37 uint32_t _var_type;
38 uint32_t _limit_min;
39 uint32_t _limit_max;
40
41 uint32_t _map_success;
42
43#if STRUCT_WRITER
44 uint32_t _ctrl_offset;
45#endif
46 /* Used for remapping. */
49 /* Temporary used while creating remap list. */
52};
53
55{
57
58 /* Used while returning items for ext_data_struct_info_map_success(). */
61
63
64 uint32_t _map_success;
65
66 const char* _last_error;
67};
68
70{
71 const char* _id;
72
73 /* Todo: the following controls _raw_ptr in ext_data_client. With
74 * several structures...?
75 */
77
80 void* _orig_array; /* for mapping */
81
84
85 uint32_t* _orig_pack_list;
87
89
92
93 uint32_t* _dest_pack_list;
95
97
98 uint32_t* _map_list;
99 uint32_t* _map_list_end;
100
102};
103
105{
106 int _fd;
107 int _fd_close; /* If using STDIN, we are not to close it, so -1. */
108
109 char* _buf;
111 size_t _buf_used;
113
114 uint32_t* _raw_ptr; /* This is not allocated; just used. */
115 uint32_t _raw_words;
116 uint32_t* _raw_swapped;
117
120
122
123 const char* _last_error;
124
126
128};
129
130/* Layout of the structure information generated.
131 */
132
134{
135 uint32_t _offset;
136 uint32_t _size;
137 uint32_t _xor;
138 const char* _name;
139};
140
142{
143 uint32_t _magic;
144 uint32_t _size_info;
145 uint32_t _size_struct;
148
149 uint32_t _num_items;
150 // NOLINTNEXTLINE
151 struct ext_data_structure_layout_item _items[1]; /* more than 1 for parts */
152};
constexpr auto EXT_DATA_STATE_INIT
constexpr auto EXT_DATA_STATE_OPEN
constexpr auto EXT_DATA_STATE_SETUP_WRITE
constexpr auto EXT_DATA_STATE_SETUP_READ
constexpr auto EXT_DATA_STATE_PARSED_HEADERS
constexpr auto EXT_DATA_STATE_OPEN_OUT
uint32_t * _dest_pack_list_end
uint32_t * _orig_pack_list_end
uint32_t _dest_static_pack_items
uint32_t * _dest_reverse_pack
uint32_t _orig_static_pack_items
struct ext_data_structure_info * _struct_info_msg
const char * _last_error
uint32_t _sort_u32_words
uint32_t _raw_words
uint32_t * _raw_swapped
uint32_t * _raw_ptr
struct ext_data_client_struct * _structures
struct ext_data_structure_item * _ret_item
struct ext_data_structure_info * _server_struct_info
struct ext_data_structure_item * _items
const char * _var_ctrl_name
struct ext_data_structure_item * _child_item
struct ext_data_structure_item * _match_item
struct ext_data_structure_item * _next_off_item
struct ext_data_structure_item * _ctrl_item
struct ext_data_structure_layout_item _items[1]