helics  3.6.1
api-data.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2025,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See the top-level NOTICE for
4 additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 
8 #ifndef HELICS_API_DATA_H_
9 #define HELICS_API_DATA_H_
10 
16 #include "../helics_enums.h"
17 
18 #include <stdint.h>
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
26 typedef void* HelicsInput;
27 // typedef void* helics_input;
31 typedef void* HelicsPublication;
32 // typedef void* helics_publication;
36 // typedef void* helics_endpoint;
37 typedef void* HelicsEndpoint;
38 
42 // typedef void* helics_filter;
43 typedef void* HelicsFilter;
44 
48 typedef void* HelicsTranslator;
49 
53 // typedef void* helics_core;
54 typedef void* HelicsCore;
55 
59 // typedef void* helics_broker;
60 typedef void* HelicsBroker;
64 // typedef void* helics_federate;
65 typedef void* HelicsFederate;
66 
70 // typedef void* helics_federate;
71 typedef void* HelicsApp;
72 
76 // typedef void* helics_federate_info;
77 typedef void* HelicsFederateInfo;
78 
82 // typedef void* helics_query;
83 typedef void* HelicsQuery;
84 
88 typedef void* HelicsDataBuffer;
89 
93 // typedef void* helics_query_buffer;
94 typedef void* HelicsQueryBuffer;
95 
99 // typedef void* helics_message;
100 typedef void* HelicsMessage;
101 
105 // typedef double helics_time;
106 typedef double HelicsTime;
107 
110 const HelicsTime HELICS_TIME_INVALID = -1.785e39;
111 const HelicsTime HELICS_TIME_MAXTIME = HELICS_BIG_NUMBER;
117 // typedef int helics_bool;
118 typedef int HelicsBool;
119 
126 typedef enum {
133 
137 typedef enum {
143 
147 typedef enum {
148  HELICS_STATE_UNKNOWN = -1,
154  /* the following states are for asynchronous operations */
162 
166 typedef struct HelicsComplex {
167  double real;
168  double imag;
170 
177 typedef struct HelicsError {
178  int32_t error_code;
179  const char* message;
181 
182 // typedef helics_error HelicsError;
183 
184 #ifdef __cplusplus
185 } /* end of extern "C" { */
186 #endif
187 
188 #endif
void * HelicsDataBuffer
Definition: api-data.h:88
void * HelicsFederateInfo
Definition: api-data.h:77
void * HelicsInput
Definition: api-data.h:26
void * HelicsCore
Definition: api-data.h:54
const HelicsTime HELICS_TIME_EPSILON
Definition: api-data.h:109
void * HelicsPublication
Definition: api-data.h:31
struct HelicsError HelicsError
void * HelicsEndpoint
Definition: api-data.h:37
void * HelicsFilter
Definition: api-data.h:43
double HelicsTime
Definition: api-data.h:106
void * HelicsApp
Definition: api-data.h:71
HelicsIterationResult
Definition: api-data.h:137
@ HELICS_ITERATION_RESULT_ITERATING
Definition: api-data.h:141
@ HELICS_ITERATION_RESULT_HALTED
Definition: api-data.h:140
@ HELICS_ITERATION_RESULT_NEXT_STEP
Definition: api-data.h:138
@ HELICS_ITERATION_RESULT_ERROR
Definition: api-data.h:139
void * HelicsTranslator
Definition: api-data.h:48
void * HelicsMessage
Definition: api-data.h:100
int HelicsBool
Definition: api-data.h:118
void * HelicsQuery
Definition: api-data.h:83
HelicsFederateState
Definition: api-data.h:147
@ HELICS_STATE_PENDING_INIT
Definition: api-data.h:155
@ HELICS_STATE_PENDING_ITERATIVE_TIME
Definition: api-data.h:158
@ HELICS_STATE_EXECUTION
Definition: api-data.h:151
@ HELICS_STATE_INITIALIZATION
Definition: api-data.h:150
@ HELICS_STATE_FINALIZE
Definition: api-data.h:152
@ HELICS_STATE_ERROR
Definition: api-data.h:153
@ HELICS_STATE_PENDING_FINALIZE
Definition: api-data.h:159
@ HELICS_STATE_PENDING_TIME
Definition: api-data.h:157
@ HELICS_STATE_STARTUP
Definition: api-data.h:149
@ HELICS_STATE_PENDING_EXEC
Definition: api-data.h:156
@ HELICS_STATE_FINISHED
Definition: api-data.h:160
HelicsIterationRequest
Definition: api-data.h:126
@ HELICS_ITERATION_REQUEST_FORCE_ITERATION
Definition: api-data.h:128
@ HELICS_ITERATION_REQUEST_ERROR
Definition: api-data.h:131
@ HELICS_ITERATION_REQUEST_HALT_OPERATIONS
Definition: api-data.h:130
@ HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED
Definition: api-data.h:129
@ HELICS_ITERATION_REQUEST_NO_ITERATION
Definition: api-data.h:127
void * HelicsFederate
Definition: api-data.h:65
const HelicsBool HELICS_FALSE
Definition: api-data.h:121
struct HelicsComplex HelicsComplex
const HelicsTime HELICS_TIME_MAXTIME
Definition: api-data.h:111
void * HelicsQueryBuffer
Definition: api-data.h:94
const HelicsTime HELICS_TIME_INVALID
Definition: api-data.h:110
const HelicsBool HELICS_TRUE
Definition: api-data.h:120
const HelicsTime HELICS_TIME_ZERO
Definition: api-data.h:108
void * HelicsBroker
Definition: api-data.h:60
Definition: api-data.h:166
Definition: api-data.h:177
const char * message
Definition: api-data.h:179
int32_t error_code
Definition: api-data.h:178