From 198ede02b7b997afa0c7eb257e74eb2097557c6c Mon Sep 17 00:00:00 2001 From: Torsten Sommer Date: Sat, 20 Jul 2019 17:28:08 +0200 Subject: [PATCH] Rename fmi3TypesPlatform.h to fmi3PlatformTypes.h (#594) to align with fmi3FunctionTypes.h --- docs/2_1_common_api.adoc | 20 +++++++++---------- docs/2_3_fmu_distribution.adoc | 6 +++--- headers/fmi3FunctionTypes.h | 2 +- headers/fmi3Functions.h | 2 +- ...mi3TypesPlatform.h => fmi3PlatformTypes.h} | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) rename headers/{fmi3TypesPlatform.h => fmi3PlatformTypes.h} (97%) diff --git a/docs/2_1_common_api.adoc b/docs/2_1_common_api.adoc index c0889610e..b60f769b8 100644 --- a/docs/2_1_common_api.adoc +++ b/docs/2_1_common_api.adoc @@ -23,7 +23,7 @@ An FMU might temporarily change the floating point control word and get notified Three header files are provided that define the interface of an FMU. In all header files the convention is used that all C function and type definitions start with the prefix "[underline]#fmi3#": -`fmi3TypesPlatform.h`:: +`fmi3PlatformTypes.h`:: contains the type definitions of the input and output arguments of the functions. This header file must be used both by the FMU and by the target simulator. @@ -44,7 +44,7 @@ _[Example for a definition in this header file: + contains the function prototypes of an FMU that can be accessed in simulation environments and that are defined in <>, <> and <>. -This header file includes `fmi3TypesPlatform.h` and `fmi3FunctionTypes.h`. +This header file includes `fmi3PlatformTypes.h` and `fmi3FunctionTypes.h`. The header file version number for which the model was compiled, can be inquired in the target simulator with `fmi3GetVersion` (see <>). + _[Example for a definition in this header file_ footnote:[For Microsoft and Cygwin compilers; `FMI3_Export` is defined as `pass:[__]declspec(dllexport)` and for Gnu-Compilers `FMI3_Export` is defined as `pass:[__]attribute__ ( ( visibility("default") ) )` in order to export the name for dynamic loading. Otherwise it is an empty definition.]: + @@ -97,16 +97,16 @@ Basically, this means that it should be short. For example, the Windows API only supports full path-names of a file up to 260 characters (see: http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx). -==== Platform Dependent Definitions (fmi3TypesPlatform.h) +==== Platform Dependent Definitions (fmi3PlatformTypes.h) To simplify porting, no C types are used in the function interfaces, but the alias types are defined in this section. -All definitions in this section are provided in the header file `fmi3TypesPlatform.h`. +All definitions in this section are provided in the header file `fmi3PlatformTypes.h`. It is required to use this definition for all binary FMUs. _[Only for source code FMUs, a change might be useful in some cases.]_: [source, C] ---- -include::../headers/fmi3TypesPlatform.h[tags=Component] +include::../headers/fmi3PlatformTypes.h[tags=Component] ---- This is a pointer to an FMU specific data structure that contains the information needed to process the model equations or to process the co-simulation of the respective slave. @@ -114,7 +114,7 @@ This data structure is implemented by the environment that provides the FMU; in [source, C] ---- -include::../headers/fmi3TypesPlatform.h[tags=ComponentEnvironment] +include::../headers/fmi3PlatformTypes.h[tags=ComponentEnvironment] ---- This is a pointer to a data structure in the simulation environment that calls the FMU. @@ -122,7 +122,7 @@ Using this pointer, data from the `modelDescription.xml` file _[for example, map [source, C] ---- -include::../headers/fmi3TypesPlatform.h[tags=FMUState] +include::../headers/fmi3PlatformTypes.h[tags=FMUState] ---- This is a pointer to a data structure in the FMU that saves the internal FMU state of the actual or a previous time instant. @@ -130,7 +130,7 @@ This allows to restart a simulation from a previous FMU state (see < sources // directory containing the C sources (optional) // all needed C sources and C header files to compile and link the FMU - // with exception of: fmi3TypesPlatform.h, fmi3FunctionTypes.h and fmi3Functions.h + // with exception of: fmi3PlatformTypes.h, fmi3FunctionTypes.h and fmi3Functions.h // The files to be compiled (but not the files included from these files) // have to be reported in the XML file under the structure // ... and @@ -212,9 +212,9 @@ The actual file names in the ZIP file to access the data files can either be har _[Note that the absolute file name of the resource directory is provided by the initialization functions]_. In the case of a co-simulation implementation of `needsExecutionTool = "true"` type, the `resources` directory can contain the model file in the tool specific file format. -_[Note that the header files `fmi3TypesPlatform.h` and `fmi3FunctionTypes.h/fmi3Functions.h` are not included in the FMU due to the following reasons:_ +_[Note that the header files `fmi3PlatformTypes.h` and `fmi3FunctionTypes.h/fmi3Functions.h` are not included in the FMU due to the following reasons:_ -_pass:[]`fmi3TypesPlatform.h` makes no sense in the `sources` directory, because if sources are provided, then the target simulator defines this header file and not the FMU. + +_pass:[]`fmi3PlatformTypes.h` makes no sense in the `sources` directory, because if sources are provided, then the target simulator defines this header file and not the FMU. + This header file is not included in the `binaries` directory, because it is implicitly defined by the platform directory (for example, i686-windows for a 32-bit machine or x86_64-linux for a 64-bit machine)._ _pass:[]`fmi3FunctionTypes.h` / `fmi3Functions.h` are not needed in the `sources` directory, because they are implicitly defined by attribute `fmiVersion` in file `modelDescription.xml`. diff --git a/headers/fmi3FunctionTypes.h b/headers/fmi3FunctionTypes.h index 1288a68a4..c07565a20 100644 --- a/headers/fmi3FunctionTypes.h +++ b/headers/fmi3FunctionTypes.h @@ -1,7 +1,7 @@ #ifndef fmi3FunctionTypes_h #define fmi3FunctionTypes_h -#include "fmi3TypesPlatform.h" +#include "fmi3PlatformTypes.h" /* This header file must be utilized when compiling an FMU or an FMI master. diff --git a/headers/fmi3Functions.h b/headers/fmi3Functions.h index b5f350fd4..c6ce33700 100644 --- a/headers/fmi3Functions.h +++ b/headers/fmi3Functions.h @@ -57,7 +57,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. extern "C" { #endif -#include "fmi3TypesPlatform.h" +#include "fmi3PlatformTypes.h" #include "fmi3FunctionTypes.h" #include diff --git a/headers/fmi3TypesPlatform.h b/headers/fmi3PlatformTypes.h similarity index 97% rename from headers/fmi3TypesPlatform.h rename to headers/fmi3PlatformTypes.h index 44ba51662..32c65f4e0 100644 --- a/headers/fmi3TypesPlatform.h +++ b/headers/fmi3PlatformTypes.h @@ -1,5 +1,5 @@ -#ifndef fmi3TypesPlatform_h -#define fmi3TypesPlatform_h +#ifndef fmi3PlatformTypes_h +#define fmi3PlatformTypes_h /* Standard header file to define the argument types of the @@ -84,4 +84,4 @@ typedef const fmi3Byte* fmi3Binary; /* Data type for binary data #define fmi3False 0 /* end::VariableTypes[] */ -#endif /* fmi3TypesPlatform_h */ +#endif /* fmi3PlatformTypes_h */