Changeset 12173


Ignore:
Timestamp:
Dec 18, 2018 9:44:23 AM (12 months ago)
Author:
Christian Andersson
Message:

Added another callback function, related to ticket:5720

Location:
branches/dev-cw-ii
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-cw-ii/Compiler/ModelicaCBackEnd/templates/FMIBase/base.c

    r11759 r12173  
    9898
    9999$C_enum_strings$
     100
     101int model_ode_update_old(jmi_t *jmi) {
     102$C_ode_update_old$
     103    return 0;
     104}
    100105
    101106int model_ode_guards(jmi_t* jmi) {
     
    173178                   *model_init_eval_independent,
    174179                   *model_init_eval_dependent,
    175                    *model_ode_next_time_event);
     180                   model_ode_next_time_event,
     181                   *model_ode_update_old);
    176182   
    177183    /* Initialize the delay interface */
  • branches/dev-cw-ii/RuntimeLibrary/src/jmi/jmi.c

    r11759 r12173  
    4747                    jmi_generic_func_t model_init_eval_independent,
    4848                    jmi_generic_func_t model_init_eval_dependent,
    49                     jmi_next_time_event_func_t model_ode_next_time_event) {
     49                    jmi_next_time_event_func_t model_ode_next_time_event,
     50                    jmi_generic_func_t model_ode_update_old) {
    5051   
    5152    /* Create jmi_model_t struct */
     
    6061    jmi->model->init_eval_independent = model_init_eval_independent;
    6162    jmi->model->init_eval_dependent   = model_init_eval_dependent;
     63    jmi->model->ode_update_old = model_ode_update_old;
    6264}
    6365
     
    472474}
    473475
     476int jmi_ode_update_old(jmi_t* jmi) {
     477    int return_status;
     478    jmi->block_level = 0; /* to recover from errors */
     479   
     480    return_status = jmi_generic_func(jmi, jmi->model->ode_update_old);
     481
     482    return return_status;
     483}
    474484
    475485int jmi_ode_initialize(jmi_t* jmi) {
  • branches/dev-cw-ii/RuntimeLibrary/src/jmi/jmi_me.c

    r11759 r12173  
    466466    /* Chattering completed step */
    467467    jmi_chattering_completed_integrator_step(jmi);
     468    /* Updates of 'old' values */
     469    jmi_ode_update_old(jmi);
    468470   
    469471    /* Verify the choice of dynamic states */
Note: See TracChangeset for help on using the changeset viewer.