Opened 8 years ago

Last modified 8 years ago

#4165 closed defect

C runtime simulation_data.h out of date — at Version 2

Reported by: Henning Kiel Owned by: somebody
Priority: low Milestone: 1.11.0
Component: Run-time Version: v1.11.0
Keywords: Cc: Adrian Pop

Description (last modified by Henning Kiel)

The file OMCompiler/SimulationRuntime/c/simulation_data.h has inconsistent dummy values. At least the macro dummyRealAttribute causes lots of warnings (which are suppressed, if no error occurs).

#define omc_dummyVarInfo {-1,-1,"","",omc_dummyFileInfo}
#define omc_dummyEquationInfo {-1,0,"",-1,NULL}
#define omc_dummyFunctionInfo {-1,"",omc_dummyFileInfo}
#define omc_dummyRealAttribute {NULL,NULL,DBL_MAX,-DBL_MAX,0,0,1.0,0,0.0}

[...]

/* Model info structures */
typedef struct VAR_INFO
{
  int id;
  int inputIndex; /* -1 means not an input */
  const char *name;
  const char *comment;
  FILE_INFO info;
} VAR_INFO;

typedef struct EQUATION_INFO
{
  int id;
  int profileBlockIndex;
  int parent;
  int numVar;
  const char **vars;
}EQUATION_INFO;

typedef struct FUNCTION_INFO
{
  int id;
  const char* name;
  FILE_INFO info;
}FUNCTION_INFO;

[...]

typedef struct REAL_ATTRIBUTE
{
  modelica_string unit;                /* = "" */
  modelica_string displayUnit;         /* = "" */
  modelica_real min;                   /* = -Inf */
  modelica_real max;                   /* = +Inf */
  modelica_boolean fixed;              /* depends on the type */
  modelica_boolean useNominal;         /* = false */
  modelica_real nominal;               /* = 1.0 */
  modelica_real start;                 /* = 0.0 */
}REAL_ATTRIBUTE;

Change History (2)

comment:1 by Henning Kiel, 8 years ago

Cc: Adrian Pop added

comment:2 by Henning Kiel, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.