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-2026, 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 AGPL VERSION 3 LICENSE OR
11 * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8.
12 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES
13 * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GNU AGPL
14 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
15 *
16 * The OpenModelica software and the OSMC (Open Source Modelica Consortium)
17 * Public License (OSMC-PL) are obtained from OSMC, either from the above
18 * address, from the URLs:
19 * http://www.openmodelica.org or
20 * https://github.com/OpenModelica/ or
21 * http://www.ida.liu.se/projects/OpenModelica,
22 * and in the OpenModelica distribution.
23 *
24 * GNU AGPL version 3 is obtained from:
25 * https://www.gnu.org/licenses/licenses.html#GPL
26 *
27 * This program is distributed WITHOUT ANY WARRANTY; without
28 * even the implied warranty of MERCHANTABILITY or FITNESS
29 * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
30 * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
31 *
32 * See the full OSMC Public License conditions for more details.
33 *
34 */
35
36#ifndef _OMS_MATVER4_H_
37#define _OMS_MATVER4_H_
38
39#include <stdio.h>
40#include <stddef.h>
41
42namespace oms
43{
44
52
53typedef struct MatVer4Header
54{
55 unsigned int type;
56 unsigned int mrows;
57 unsigned int ncols;
58 unsigned int imagf;
59 unsigned int namelen;
60} MatVer4Header;
61
62typedef struct MatVer4Matrix
63{
65 void *data;
66} MatVer4Matrix;
67
69
70void writeMatVer4Matrix(FILE* file, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
71void appendMatVer4Matrix(FILE* file, long position, const char* name, size_t rows, size_t cols, const void* matrixData, MatVer4Type_t type);
72
73MatVer4Matrix* readMatVer4Matrix(FILE* file);
74void freeMatVer4Matrix(MatVer4Matrix** matrix);
75
76void skipMatVer4Matrix(FILE* file);
77
78}
79
80#endif
Definition AlgLoop.h:49
size_t sizeofMatVer4Type(MatVer4Type_t type)
Definition MatVer4.cpp:55
void skipMatVer4Matrix(FILE *file)
Definition MatVer4.cpp:144
MatVer4Matrix * readMatVer4Matrix(FILE *file)
Definition MatVer4.cpp:112
void writeMatVer4Matrix(FILE *file, const char *name, size_t rows, size_t cols, const void *matrixData, MatVer4Type_t type)
Definition MatVer4.cpp:74
void appendMatVer4Matrix(FILE *file, long position, const char *name, size_t rows, size_t cols, const void *matrixData, MatVer4Type_t type)
Definition MatVer4.cpp:90
MatVer4Type_t
Definition MatVer4.h:46
@ MatVer4Type_DOUBLE
Definition MatVer4.h:47
@ MatVer4Type_CHAR
Definition MatVer4.h:50
@ MatVer4Type_INT32
Definition MatVer4.h:49
@ MatVer4Type_SINGLE
Definition MatVer4.h:48
void freeMatVer4Matrix(MatVer4Matrix **matrix)
Definition MatVer4.cpp:133
Definition MatVer4.h:54
unsigned int mrows
Definition MatVer4.h:56
unsigned int imagf
Definition MatVer4.h:58
unsigned int type
Definition MatVer4.h:55
unsigned int namelen
Definition MatVer4.h:59
unsigned int ncols
Definition MatVer4.h:57
Definition MatVer4.h:63
void * data
Definition MatVer4.h:65
MatVer4Header header
Definition MatVer4.h:64