Creating a Model Header File
- Updated2025-10-27
- 1 minute(s) read
Create a model.h header file that contains the type definitions for model properties and all user-visible parameters in your model.
- Create a header file and name it model.h.
-
Create code in the file similar to the following code.
#ifndef MODEL_h # define MODEL_h typedef struct { double a[2][2]; double b11; double c12; double idleRPM; double redlineRPM; double temperature_timeConstant; double temperature_roomTemp; double temperature_operatingTempDelta; double temperature_redlineTempDelta; } Parameters; #endifThe example code contains definitions for both scalar and vector double parameters.
For information about defining parameters whose data type is something other than double, refer to the TO DO comments in the template.c file installed by the VeriStand Model Framework.
- Save the file.
Related Information
- Model Framework Components
The model framework includes files that define properties, identify functions for export, implement an interface, and create interdependent structures.
- Adapting the C Template to Model Code
Use the template.c file that the VeriStand Model Framework installs as a starting point for your model code.