helics  3.0.1
api-data.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2021,
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* helics_core;
49 typedef void* HelicsCore;
50 
54 // typedef void* helics_broker;
55 typedef void* HelicsBroker;
59 // typedef void* helics_federate;
60 typedef void* HelicsFederate;
61 
65 // typedef void* helics_federate_info;
66 typedef void* HelicsFederateInfo;
67 
71 // typedef void* helics_query;
72 typedef void* HelicsQuery;
73 
77 // typedef void* helics_query_buffer;
78 typedef void* HelicsQueryBuffer;
79 
83 // typedef void* helics_message;
84 typedef void* HelicsMessage;
85 
89 // typedef double helics_time;
90 typedef double HelicsTime;
91 
94 const HelicsTime HELICS_TIME_INVALID = -1.785e39;
95 const HelicsTime HELICS_TIME_MAXTIME = HELICS_BIG_NUMBER;
101 // typedef int helics_bool;
102 typedef int HelicsBool;
103 
110 typedef enum {
115 
119 typedef enum {
125 
129 typedef enum {
135  /* the following states are for asynchronous operations */
143 
147 typedef struct HelicsComplex {
148  double real;
149  double imag;
150 } HelicsComplex;
151 
152 // typedef HelicsComplex helics_complex;
153 
160 typedef struct HelicsError {
161  int32_t error_code;
162  const char* message;
163 } HelicsError;
164 
165 // typedef helics_error HelicsError;
166 
167 #ifdef __cplusplus
168 } /* end of extern "C" { */
169 #endif
170 
171 #endif
HelicsTime
double HelicsTime
Definition: api-data.h:90
HELICS_STATE_PENDING_FINALIZE
@ HELICS_STATE_PENDING_FINALIZE
Definition: api-data.h:140
HELICS_FALSE
const HelicsBool HELICS_FALSE
Definition: api-data.h:105
HELICS_TRUE
const HelicsBool HELICS_TRUE
Definition: api-data.h:104
HELICS_STATE_FINALIZE
@ HELICS_STATE_FINALIZE
Definition: api-data.h:133
HelicsError::message
const char * message
Definition: api-data.h:162
HelicsFederate
void * HelicsFederate
Definition: api-data.h:60
HELICS_ITERATION_REQUEST_FORCE_ITERATION
@ HELICS_ITERATION_REQUEST_FORCE_ITERATION
Definition: api-data.h:112
HelicsQueryBuffer
void * HelicsQueryBuffer
Definition: api-data.h:78
HelicsInput
void * HelicsInput
Definition: api-data.h:26
HELICS_TIME_INVALID
const HelicsTime HELICS_TIME_INVALID
Definition: api-data.h:94
HELICS_STATE_PENDING_INIT
@ HELICS_STATE_PENDING_INIT
Definition: api-data.h:136
HELICS_STATE_PENDING_EXEC
@ HELICS_STATE_PENDING_EXEC
Definition: api-data.h:137
HELICS_STATE_STARTUP
@ HELICS_STATE_STARTUP
Definition: api-data.h:130
HelicsComplex
Definition: api-data.h:147
HelicsFederateInfo
void * HelicsFederateInfo
Definition: api-data.h:66
HELICS_STATE_EXECUTION
@ HELICS_STATE_EXECUTION
Definition: api-data.h:132
HelicsBroker
void * HelicsBroker
Definition: api-data.h:55
HelicsFilter
void * HelicsFilter
Definition: api-data.h:43
HELICS_TIME_EPSILON
const HelicsTime HELICS_TIME_EPSILON
Definition: api-data.h:93
HelicsEndpoint
void * HelicsEndpoint
Definition: api-data.h:37
HELICS_STATE_PENDING_ITERATIVE_TIME
@ HELICS_STATE_PENDING_ITERATIVE_TIME
Definition: api-data.h:139
HELICS_ITERATION_RESULT_ERROR
@ HELICS_ITERATION_RESULT_ERROR
Definition: api-data.h:121
HelicsMessage
void * HelicsMessage
Definition: api-data.h:84
HELICS_ITERATION_RESULT_ITERATING
@ HELICS_ITERATION_RESULT_ITERATING
Definition: api-data.h:123
HelicsFederateState
HelicsFederateState
Definition: api-data.h:129
HELICS_ITERATION_REQUEST_NO_ITERATION
@ HELICS_ITERATION_REQUEST_NO_ITERATION
Definition: api-data.h:111
HelicsError
Definition: api-data.h:160
HELICS_TIME_MAXTIME
const HelicsTime HELICS_TIME_MAXTIME
Definition: api-data.h:95
HelicsIterationResult
HelicsIterationResult
Definition: api-data.h:119
HelicsPublication
void * HelicsPublication
Definition: api-data.h:31
HelicsCore
void * HelicsCore
Definition: api-data.h:49
HELICS_STATE_ERROR
@ HELICS_STATE_ERROR
Definition: api-data.h:134
HELICS_STATE_FINISHED
@ HELICS_STATE_FINISHED
Definition: api-data.h:141
HELICS_STATE_PENDING_TIME
@ HELICS_STATE_PENDING_TIME
Definition: api-data.h:138
HELICS_ITERATION_RESULT_NEXT_STEP
@ HELICS_ITERATION_RESULT_NEXT_STEP
Definition: api-data.h:120
HelicsComplex
struct HelicsComplex HelicsComplex
HelicsQuery
void * HelicsQuery
Definition: api-data.h:72
HELICS_ITERATION_RESULT_HALTED
@ HELICS_ITERATION_RESULT_HALTED
Definition: api-data.h:122
HelicsError
struct HelicsError HelicsError
HelicsError::error_code
int32_t error_code
Definition: api-data.h:161
HELICS_TIME_ZERO
const HelicsTime HELICS_TIME_ZERO
Definition: api-data.h:92
HELICS_STATE_INITIALIZATION
@ HELICS_STATE_INITIALIZATION
Definition: api-data.h:131
HelicsBool
int HelicsBool
Definition: api-data.h:102
HelicsIterationRequest
HelicsIterationRequest
Definition: api-data.h:110
HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED
@ HELICS_ITERATION_REQUEST_ITERATE_IF_NEEDED
Definition: api-data.h:113