helics  3.5.2
api-data.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2024,
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_info;
71 typedef void* HelicsFederateInfo;
72 
76 // typedef void* helics_query;
77 typedef void* HelicsQuery;
78 
82 typedef void* HelicsDataBuffer;
83 
87 // typedef void* helics_query_buffer;
88 typedef void* HelicsQueryBuffer;
89 
93 // typedef void* helics_message;
94 typedef void* HelicsMessage;
95 
99 // typedef double helics_time;
100 typedef double HelicsTime;
101 
104 const HelicsTime HELICS_TIME_INVALID = -1.785e39;
105 const HelicsTime HELICS_TIME_MAXTIME = HELICS_BIG_NUMBER;
111 // typedef int helics_bool;
112 typedef int HelicsBool;
113 
120 typedef enum {
127 
131 typedef enum {
137 
141 typedef enum {
142  HELICS_STATE_UNKNOWN = -1,
148  /* the following states are for asynchronous operations */
156 
160 typedef struct HelicsComplex {
161  double real;
162  double imag;
164 
171 typedef struct HelicsError {
172  int32_t error_code;
173  const char* message;
175 
176 // typedef helics_error HelicsError;
177 
178 #ifdef __cplusplus
179 } /* end of extern "C" { */
180 #endif
181 
182 #endif
void * HelicsDataBuffer
Definition: api-data.h:82
void * HelicsFederateInfo
Definition: api-data.h:71
void * HelicsInput
Definition: api-data.h:26
void * HelicsCore
Definition: api-data.h:54
const HelicsTime HELICS_TIME_EPSILON
Definition: api-data.h:103
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:100
HelicsIterationResult
Definition: api-data.h:131
@ HELICS_ITERATION_RESULT_ITERATING
Definition: api-data.h:135
@ HELICS_ITERATION_RESULT_HALTED
Definition: api-data.h:134
@ HELICS_ITERATION_RESULT_NEXT_STEP
Definition: api-data.h:132
@ HELICS_ITERATION_RESULT_ERROR
Definition: api-data.h:133
void * HelicsTranslator
Definition: api-data.h:48
void * HelicsMessage
Definition: api-data.h:94
int HelicsBool
Definition: api-data.h:112
void * HelicsQuery
Definition: api-data.h:77
HelicsFederateState
Definition: api-data.h:141
@ HELICS_STATE_PENDING_INIT
Definition: api-data.h:149
@ HELICS_STATE_PENDING_ITERATIVE_TIME
Definition: api-data.h:152
@ HELICS_STATE_EXECUTION
Definition: api-data.h:145
@ HELICS_STATE_INITIALIZATION
Definition: api-data.h:144
@ HELICS_STATE_FINALIZE
Definition: api-data.h:146
@ HELICS_STATE_ERROR
Definition: api-data.h:147
@ HELICS_STATE_PENDING_FINALIZE
Definition: api-data.h:153
@ HELICS_STATE_PENDING_TIME
Definition: api-data.h:151
@ HELICS_STATE_STARTUP
Definition: api-data.h:143
@ HELICS_STATE_PENDING_EXEC
Definition: api-data.h:150
@ HELICS_STATE_FINISHED
Definition: api-data.h:154
HelicsIterationRequest
Definition: api-data.h:120
@ HELICS_ITERATION_REQUEST_FORCE_ITERATION
Definition: api-data.h:122
@ HELICS_ITERATION_REQUEST_ERROR
Definition: api-data.h:125
@ HELICS_ITERATION_REQUEST_HALT_OPERATIONS
Definition: api-data.h:124
@ HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED
Definition: api-data.h:123
@ HELICS_ITERATION_REQUEST_NO_ITERATION
Definition: api-data.h:121
void * HelicsFederate
Definition: api-data.h:65
const HelicsBool HELICS_FALSE
Definition: api-data.h:115
struct HelicsComplex HelicsComplex
const HelicsTime HELICS_TIME_MAXTIME
Definition: api-data.h:105
void * HelicsQueryBuffer
Definition: api-data.h:88
const HelicsTime HELICS_TIME_INVALID
Definition: api-data.h:104
const HelicsBool HELICS_TRUE
Definition: api-data.h:114
const HelicsTime HELICS_TIME_ZERO
Definition: api-data.h:102
void * HelicsBroker
Definition: api-data.h:60
Definition: api-data.h:160
Definition: api-data.h:171
const char * message
Definition: api-data.h:173
int32_t error_code
Definition: api-data.h:172