Table Of Contents

Creating a Model Header File

Last Modified: June 10, 2021

Create a model.h header file that contains the type definitions for model properties and all user-visible parameters in your model.

  1. Create a header file and name it model.h.
  2. 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;
    #endif

    The 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.

  3. Save the file.
After creating a model header file, adapt the template to your model code.

Recently Viewed Topics