OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment that supports ordinary (i.e., non-delayed) and TLM connections.
MatVer4.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 _OMS_MATVER4_H_
33 #define _OMS_MATVER4_H_
34 
35 #include <stdio.h>
36 #include <stddef.h>
37 
38 namespace oms
39 {
40 
41 typedef enum MatVer4Type_t
42 {
48 
49 typedef struct MatVer4Header
50 {
51  unsigned int type;
52  unsigned int mrows;
53  unsigned int ncols;
54  unsigned int imagf;
55  unsigned int namelen;
57 
58 typedef struct MatVer4Matrix
59 {
61  void *data;
63 
65 
66 void writeMatVer4Matrix(FILE* file, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
67 void appendMatVer4Matrix(FILE* file, long position, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
68 
69 MatVer4Matrix* readMatVer4Matrix(FILE* file);
70 void freeMatVer4Matrix(MatVer4Matrix** matrix);
71 
72 void skipMatVer4Matrix(FILE* file);
73 
74 }
75 
76 #endif
Definition: MatVer4.h:44
Definition: MatVer4.h:45
Definition: MatVer4.h:58
MatVer4Matrix * readMatVer4Matrix(FILE *file)
Definition: MatVer4.cpp:108
size_t sizeofMatVer4Type(MatVer4Type_t type)
Definition: MatVer4.cpp:51
unsigned int imagf
Definition: MatVer4.h:54
unsigned int type
Definition: MatVer4.h:51
Definition: MatVer4.h:43
MatVer4Type_t
Definition: MatVer4.h:41
void * data
Definition: MatVer4.h:61
unsigned int namelen
Definition: MatVer4.h:55
unsigned int mrows
Definition: MatVer4.h:52
void freeMatVer4Matrix(MatVer4Matrix **matrix)
Definition: MatVer4.cpp:129
unsigned int ncols
Definition: MatVer4.h:53
Definition: AlgLoop.h:44
MatVer4Header header
Definition: MatVer4.h:60
Definition: MatVer4.h:46
struct oms::MatVer4Header MatVer4Header
void skipMatVer4Matrix(FILE *file)
Definition: MatVer4.cpp:140
struct oms::MatVer4Matrix MatVer4Matrix
Definition: MatVer4.h:49
void appendMatVer4Matrix(FILE *file, long position, const char *name, size_t rows, size_t cols, const void *matrixData, MatVer4Type_t type)
Definition: MatVer4.cpp:86
void writeMatVer4Matrix(FILE *file, const char *name, size_t rows, size_t cols, const void *matrixData, MatVer4Type_t type)
Definition: MatVer4.cpp:70