OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment.
Loading...
Searching...
No Matches
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
38namespace oms
39{
40
48
49typedef struct MatVer4Header
50{
51 unsigned int type;
52 unsigned int mrows;
53 unsigned int ncols;
54 unsigned int imagf;
55 unsigned int namelen;
56} MatVer4Header;
57
58typedef struct MatVer4Matrix
59{
61 void *data;
62} MatVer4Matrix;
63
65
66void writeMatVer4Matrix(FILE* file, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
67void appendMatVer4Matrix(FILE* file, long position, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
68
69MatVer4Matrix* readMatVer4Matrix(FILE* file);
70void freeMatVer4Matrix(MatVer4Matrix** matrix);
71
72void skipMatVer4Matrix(FILE* file);
73
74}
75
76#endif
Definition AlgLoop.h:45
size_t sizeofMatVer4Type(MatVer4Type_t type)
Definition MatVer4.cpp:51
void skipMatVer4Matrix(FILE *file)
Definition MatVer4.cpp:140
MatVer4Matrix * readMatVer4Matrix(FILE *file)
Definition MatVer4.cpp:108
void writeMatVer4Matrix(FILE *file, const char *name, size_t rows, size_t cols, const void *matrixData, MatVer4Type_t type)
Definition MatVer4.cpp:70
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
MatVer4Type_t
Definition MatVer4.h:42
@ MatVer4Type_DOUBLE
Definition MatVer4.h:43
@ MatVer4Type_CHAR
Definition MatVer4.h:46
@ MatVer4Type_INT32
Definition MatVer4.h:45
@ MatVer4Type_SINGLE
Definition MatVer4.h:44
void freeMatVer4Matrix(MatVer4Matrix **matrix)
Definition MatVer4.cpp:129
Definition MatVer4.h:50
unsigned int mrows
Definition MatVer4.h:52
unsigned int imagf
Definition MatVer4.h:54
unsigned int type
Definition MatVer4.h:51
unsigned int namelen
Definition MatVer4.h:55
unsigned int ncols
Definition MatVer4.h:53
Definition MatVer4.h:59
void * data
Definition MatVer4.h:61
MatVer4Header header
Definition MatVer4.h:60