OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
Types.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenModelica.
3  *
4  * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
5  * c/o Linköpings universitet, Department of Computer and Information Science,
6  * SE-58183 Linköping, Sweden.
7  *
8  * All rights reserved.
9  *
10  * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
11  * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
12  * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
13  * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3,
14  * ACCORDING TO RECIPIENTS CHOICE.
15  *
16  * The OpenModelica software and the Open Source Modelica
17  * Consortium (OSMC) Public License (OSMC-PL) are obtained
18  * from OSMC, either from the above address,
19  * from the URLs: http://www.ida.liu.se/projects/OpenModelica or
20  * http://www.openmodelica.org, and in the OpenModelica distribution.
21  * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
22  *
23  * This program is distributed WITHOUT ANY WARRANTY; without
24  * even the implied warranty of MERCHANTABILITY or FITNESS
25  * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
26  * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
27  *
28  * See the full OSMC Public License conditions for more details.
29  *
30  */
31 
32 #ifndef _OMSIMULATOR_TYPES_H_
33 #define _OMSIMULATOR_TYPES_H_
34 
35 #include <stdbool.h>
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 
43 typedef enum {
51 
52 typedef enum {
60 
61 typedef enum {
68 
69 typedef enum {
74 
75 typedef enum {
83 
84 typedef enum {
95 
96 typedef enum {
100 
101 typedef enum {
107 
108 typedef enum {
114 
115 typedef enum {
123 
127 typedef enum {
132 
136 typedef enum {
143 
158 typedef struct {
159  /*
160  * Required attribute giving the x coordinate of the connector inside the
161  * special coordinate system.
162  */
163  double x;
164  /*
165  * Required attribute giving the y coordinate of the connector inside the
166  * special coordinate system.
167  */
168  double y;
170 
192 typedef struct {
197  double x1;
202  double y1;
207  double x2;
212  double y2;
218  double rotation;
225  char* iconSource;
230  double iconRotation;
235  bool iconFlip;
243 
257 typedef struct {
262  double* pointsX;
267  double* pointsY;
271  unsigned int n;
273 
290 typedef struct {
295  double x1;
300  double y1;
305  double x2;
310  double y2;
312 
333 typedef struct {
334  int dummy;
336 
340 typedef struct {
341  double delay;
342  double alpha;
346 
350 typedef struct {
351  oms_connection_type_enu_t type;
352  char* conA;
353  char* conB;
357 
361 typedef struct {
362  oms_causality_enu_t causality;
363  oms_signal_type_enu_t type;
364  char* name;
367 
371 typedef struct {
372  char* name;
373  char** connectors;
376 
380 typedef struct {
381  char* name;
383  oms_tlm_domain_t domain;
385  double delay;
386  oms_tlm_interpolation_t interpolation;
390 
394 typedef struct _oms_element_t{
395  oms_element_enu_t type;
396  char* name;
402 } oms_element_t;
403 
404 typedef enum {
410 
414 typedef struct {
418  char* author;
423  char* copyright;
427  char* description;
437  char* fmiVersion;
456  char* guid;
461  char* license;
466  char* modelName;
470  char* path;
474  char* version;
536 
537 #ifdef __cplusplus
538 }
539 #endif
540 
541 #endif
Definition: Types.h:85
oms_tlm_domain_t domain
Definition: Types.h:383
defined to be equal to (oms_fmi_kind_me|oms_fmi_kind_cs)
Definition: Types.h:408
oms_connection_type_enu_t type
Connection type, e.g. TLM.
Definition: Types.h:351
oms_solver_enu_t
Definition: Types.h:84
Definition: Types.h:81
oms_fmi_kind_enu_t fmiKind
Definition: Types.h:431
Strongly Coupled System.
Definition: Types.h:105
Definition: Types.h:44
Definition: Types.h:49
ssd_connector_geometry_t * geometry
Geometry information of the connector.
Definition: Types.h:365
Definition: Types.h:70
Definition: Types.h:55
char ** connectortypes
Definition: Types.h:388
double y1
Definition: Types.h:202
ssd_element_geometry_t * geometry
Geometry information of the element.
Definition: Types.h:401
bool providesDirectionalDerivative
Definition: Types.h:523
Definition: Types.h:87
char * generationTool
Definition: Types.h:449
Definition: Types.h:80
bool canGetAndSetFMUstate
Definition: Types.h:487
char * name
Definition: Types.h:372
Error; Potentially critical issues.
Definition: Types.h:139
char ** connectors
Definition: Types.h:373
double linearimpedance
Definition: Types.h:343
bool canNotUseMemoryManagementFunctions
Definition: Types.h:493
FMU specific attributes.
Definition: Types.h:414
Connection between two connectors.
Definition: Types.h:350
double rotation
Definition: Types.h:218
double x
Definition: Types.h:163
char * iconSource
Definition: Types.h:225
Definition: Types.h:58
oms_causality_enu_t
Definition: Types.h:61
oms_tlm_interpolation_t
Definition: Types.h:69
Definition: Types.h:78
external model
Definition: Types.h:112
Definition: Types.h:90
Debug message. (only in debug configuration)
Definition: Types.h:140
char * conB
Name of connector B.
Definition: Types.h:353
Definition: Types.h:405
double iconRotation
Definition: Types.h:230
oms_status_enu_t
Definition: Types.h:43
bool canInterpolateInputs
Definition: Types.h:528
Fixed stepsize (default)
Definition: Types.h:91
double x2
Definition: Types.h:207
Definition: Types.h:66
char * conA
Name of connector A.
Definition: Types.h:352
oms_connector_t ** connectors
List (null-terminated array) of all interface variables: inputs, outputs, and parameters.
Definition: Types.h:398
Adaptive stepsize.
Definition: Types.h:92
5.3.6 ssd:SimulationInformation
Definition: Types.h:333
double y2
Definition: Types.h:310
double angularimpedance
Definition: Types.h:344
struct _oms_element_t ** elements
List (null-terminated array) of all sub-elements.
Definition: Types.h:397
oms_modelState_enu_t
Definition: Types.h:52
Definition: Types.h:72
struct _oms_element_t oms_element_t
Element (aka ssd:Component)
5.3.4 ssd:SystemGeometry
Definition: Types.h:290
unsigned int maxOutputDerivativeOrder
Definition: Types.h:534
Definition: Types.h:102
Definition: Types.h:47
double y2
Definition: Types.h:212
Bus connector.
Definition: Types.h:371
Definition: Types.h:121
char * copyright
Definition: Types.h:423
Definition: Types.h:54
5.2.1.1 ssd:ConnectorGeometry
Definition: Types.h:158
Definition: Types.h:56
bool completedIntegratorStepNotNeeded
Definition: Types.h:508
Definition: Types.h:71
oms_tlm_interpolation_t interpolation
Definition: Types.h:386
char * name
Name of the connector.
Definition: Types.h:364
Definition: Types.h:97
oms_connection_type_enu_t
Connection type.
Definition: Types.h:127
Definition: Types.h:89
char * generationDateAndTime
Definition: Types.h:445
double delay
Definition: Types.h:385
bool canBeInstantiatedOnlyOncePerProcess
Definition: Types.h:481
Trace message for detailed debug logging. (only in debug configuration)
Definition: Types.h:141
oms_tlm_connection_parameters_t * tlmparameters
TLM parameters (only for TLM connections)
Definition: Types.h:355
oms_system_enu_t
Definition: Types.h:101
oms_element_enu_t type
Element type, i.e. system or component.
Definition: Types.h:395
Definition: Types.h:93
double y1
Definition: Types.h:300
char ** connectornames
Definition: Types.h:387
oms_component_enu_t
Definition: Types.h:108
lookup table
Definition: Types.h:111
Definition: Types.h:117
Definition: Types.h:77
int dimensions
Definition: Types.h:384
FMI conncection (directed & undelayed signal connection)
Definition: Types.h:128
5.3.2.1 ssd:ConnectionGeometry
Definition: Types.h:257
oms_element_enu_t
Definition: Types.h:96
oms_message_type_enu_t
Message types used by the logging mechanism.
Definition: Types.h:136
double delay
Definition: Types.h:341
Definition: Types.h:118
double x2
Definition: Types.h:305
Definition: Types.h:86
oms_signal_type_enu_t
Definition: Types.h:115
Definition: Types.h:120
default
Definition: Types.h:88
oms_busconnector_t ** busconnectors
List (null-terminated array) of all bus connectors.
Definition: Types.h:399
char * version
Definition: Types.h:474
Definition: Types.h:130
bool iconFixedAspectRatio
Definition: Types.h:241
Signal: input, output, and parameter.
Definition: Types.h:361
Definition: Types.h:79
Definition: Types.h:119
Parameters for TLM connection.
Definition: Types.h:340
oms_fmi_kind_enu_t
Definition: Types.h:404
double x1
Definition: Types.h:197
char * author
Definition: Types.h:418
oms_tlm_domain_t
Definition: Types.h:75
char * description
Definition: Types.h:427
char * path
Definition: Types.h:470
oms_causality_enu_t causality
input/output/parameter
Definition: Types.h:362
Definition: Types.h:109
Definition: Types.h:57
char * fmiVersion
Definition: Types.h:437
char * modelName
Definition: Types.h:466
Weakly Coupled System.
Definition: Types.h:104
Bus connection.
Definition: Types.h:129
char * name
Definition: Types.h:381
output
Definition: Types.h:63
bool iconFlip
Definition: Types.h:235
double x1
Definition: Types.h:295
ssd_connector_geometry_t * geometry
Definition: Types.h:382
double y
Definition: Types.h:168
input
Definition: Types.h:62
Definition: Types.h:53
Definition: Types.h:98
double * pointsY
Definition: Types.h:267
Definition: Types.h:76
TLM Bus connector.
Definition: Types.h:380
Definition: Types.h:116
Element (aka ssd:Component)
Definition: Types.h:394
FMI for Model Exchange.
Definition: Types.h:406
int dummy
just to make msvc happy
Definition: Types.h:334
ssd_connector_geometry_t * geometry
Definition: Types.h:374
double alpha
Definition: Types.h:342
FMU.
Definition: Types.h:110
char * license
Definition: Types.h:461
Definition: Types.h:46
Definition: Types.h:48
bool canSerializeFMUstate
Definition: Types.h:500
ssd_connection_geometry_t * geometry
Geometry information of the connection.
Definition: Types.h:354
bidirecitonal
Definition: Types.h:65
Informative message.
Definition: Types.h:137
FMI for Co-Simulation.
Definition: Types.h:407
5.2.2 ssd:ElementGeometry
Definition: Types.h:192
unsigned int n
Definition: Types.h:271
oms_signal_type_enu_t type
Type of the connector.
Definition: Types.h:363
Definition: Types.h:45
TLM System.
Definition: Types.h:103
oms_tlmbusconnector_t ** tlmbusconnectors
List (null-terminated array) of all TLM bus connectors.
Definition: Types.h:400
bool needsExecutionTool
Definition: Types.h:518
Warning; Non-critical issues.
Definition: Types.h:138
REMOVE ME.
Definition: Types.h:64
char * guid
Definition: Types.h:456
double * pointsX
Definition: Types.h:262
char * name
Name of the element.
Definition: Types.h:396