Changeset 13870


Ignore:
Timestamp:
Oct 28, 2019 2:17:08 PM (3 weeks ago)
Author:
Jonathan Kämpe
Message:

#5844 Replaced guid variable with function to facilitate debugging

Location:
branches/dev-jk-2621
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jk-2621/Compiler/ModelicaCBackEnd/templates/FMIBase/base.c

    r12878 r13870  
    8282static const int Homotopy_block = $C_DAE_INIT_homotopy_block$;
    8383
    84 const char *C_GUID = $C_guid$;
     84const char *model_guid() {
     85    return $C_guid$;
     86}
    8587
    8688$C_DAE_output_vrefs$
  • branches/dev-jk-2621/RuntimeLibrary/src/fmi2/fmi2_me.h

    r8979 r13870  
    465465                                                  fmi2Real x_nominal[],
    466466                                                  size_t nx);
    467 
    468  /* @} */
    469 
    470 /**
    471  * The Global Unique IDentifier is used to check that the XML file is compatible with the C functions.
    472  */
    473 extern const char *C_GUID;
    474467
    475468/**
  • branches/dev-jk-2621/RuntimeLibrary/src/jmi/jmi.h

    r11759 r13870  
    507507
    508508/**
     509 * \brief Get the guid of the model.
     510 *
     511 * Typically this function is defined in the generated code.
     512 *
     513 * @return The guid of the model.
     514 */
     515const char *model_guid();
     516
     517/**
    509518 * Clean up after a completed simulation.
    510519 *
  • branches/dev-jk-2621/RuntimeLibrary/src/jmi/jmi_me.c

    r12953 r13870  
    4949
    5050    /* Check if the GUID is correct.*/
    51     if (strcmp(GUID, C_GUID) != 0) {
     51    if (strcmp(GUID, model_guid()) != 0) {
    5252        jmi_log_node(jmi_->log, logError, "ModelDescriptionFileInconsistency","The model and the description file are not consistent to each other.");
    5353        jmi_delete(jmi_);
  • branches/dev-jk-2621/RuntimeLibrary/src/jmi/jmi_me.h

    r12953 r13870  
    3939    jmi_real_t  next_event_time;
    4040};
    41 
    42 /**
    43  * The Global Unique IDentifier is used to check that the XML file is compatible with the C functions.
    44  */
    45 extern const char *C_GUID;
    4641
    4742/**
Note: See TracChangeset for help on using the changeset viewer.