NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_FMIDescription.h
1 /* The NANDRAD data model library.
2 
3  Copyright (c) 2012-today, Institut für Bauklimatik, TU Dresden, Germany
4 
5  Primary authors:
6  Andreas Nicolai <andreas.nicolai -[at]- tu-dresden.de>
7  Anne Paepcke <anne.paepcke -[at]- tu-dresden.de>
8 
9  This library is part of SIM-VICUS (https://github.com/ghorwin/SIM-VICUS)
10 
11  This library is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 */
21 
22 #ifndef NANDRAD_FMIDescriptionH
23 #define NANDRAD_FMIDescriptionH
24 
25 #include <vector>
26 
27 #include <IBK_Path.h>
28 
29 #include "NANDRAD_FMIVariableDefinition.h"
30 
31 namespace NANDRAD {
32 
33 
34 /*! Contains all data to generate a modelDescription.xml and configure the NANDRAD FMI Slave.
35 
36 */
38 public:
39 
40  // *** PUBLIC MEMBER FUNCTIONS ***
41 
42  NANDRAD_READWRITE
43 
44  /*! Checks all input and output variables. */
45  void checkParameters();
46 
47  /*! Tests if an input variable for this model quantity exists already in the variable list.
48  Only the NANDRAD model variable properties (name, objectID, vector index/id) are compared.
49  */
50  bool hasInputVariable(const FMIVariableDefinition & var) const;
51 
52  /*! Tests if an output variable for this model quantity exists already in the variable list.
53  Only the NANDRAD model variable properties (name, objectID, vector index/id) are compared.
54  */
55  bool hasOutputVariable(const FMIVariableDefinition & var) const;
56 
57  // *** PUBLIC MEMBER VARIABLES ***
58 
59  /*! The FMI model name. */
60  std::string m_modelName; // XML:E
61 
62  /*! Holds all input variable definitions.
63  Note: There may be several input variables with same valueRef and name, yet different
64  NANDRAD variable names. In this case, only one FMI input variable is mapped to
65  all NANDRAD variables.
66  */
67  std::vector<FMIVariableDefinition> m_inputVariables; // XML:E
68  /*! Holds all output variable definitions. */
69  std::vector<FMIVariableDefinition> m_outputVariables; // XML:E
70 };
71 
72 } // namespace NANDRAD
73 
74 #endif // NANDRAD_FMIDescriptionH
std::vector< FMIVariableDefinition > m_outputVariables
Holds all output variable definitions.
bool hasInputVariable(const FMIVariableDefinition &var) const
Tests if an input variable for this model quantity exists already in the variable list...
bool hasOutputVariable(const FMIVariableDefinition &var) const
Tests if an output variable for this model quantity exists already in the variable list...
Definition of an FMI input/output variable and the corresponding value reference info for NANDRAD...
std::vector< FMIVariableDefinition > m_inputVariables
Holds all input variable definitions.
NANDRAD_READWRITE void checkParameters()
Checks all input and output variables.
Contains all data to generate a modelDescription.xml and configure the NANDRAD FMI Slave...
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
std::string m_modelName
The FMI model name.