diff --git a/Makefile b/Makefile index e0e1086..f4250d8 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,12 @@ ############### ## DSE C Library -export DSE_CLIB_VERSION ?= 1.0.17 +export DSE_CLIB_VERSION ?= 1.0.18 ############### ## DSE Model C Library -export DSE_MODELC_VERSION ?= 2.0.23 +export DSE_MODELC_VERSION ?= 2.1.1 ############### diff --git a/dse/network/model.c b/dse/network/model.c index 03d43e8..69bd976 100644 --- a/dse/network/model.c +++ b/dse/network/model.c @@ -69,7 +69,7 @@ ModelDesc* model_create(ModelDesc* model) const char* network_signal = NULL; for (uint32_t i = 0; i < m->sv_network->count; i++) { const char* name = - m->sv_network->annotation(m->sv_network, i, "network"); + signal_annotation(m->sv_network, i, "network", NULL); if (name == NULL) continue; if (strcmp(name, m->network.name) == 0) { network_signal = m->sv_network->signal[i]; @@ -93,7 +93,7 @@ ModelDesc* model_create(ModelDesc* model) " signal mimetype: %s", m->sv_network->mime_type[m->sv_network_index]); /* Locate the Network Codec. */ - m->network_codec = m->sv_network->codec(m->sv_network, m->sv_network_index); + m->network_codec = signal_codec(m->sv_network, m->sv_network_index); if (m->network_codec == NULL) log_fatal("Unable to locate NCodec object!"); /* Print the parsed network. */ @@ -174,7 +174,7 @@ int model_step(ModelDesc* model, double* model_time, double stop_time) network_function_apply_decode(&m->network); network_marshal_messages_to_signals( &m->network, m->network.marshal_list, false); - m->sv_network->release(m->sv_network, m->sv_network_index); + signal_release(m->sv_network, m->sv_network_index); /* The network tasks are organised on a 1 ms schedule and need to be diff --git a/tests/cmocka/mstep/test_mstep.c b/tests/cmocka/mstep/test_mstep.c index e884080..72f46cb 100644 --- a/tests/cmocka/mstep/test_mstep.c +++ b/tests/cmocka/mstep/test_mstep.c @@ -89,7 +89,7 @@ void test_mstep(void** state) assert_null(model->sv_network->binary[0]); assert_int_equal(model->sv_network->length[0], 0); assert_int_equal(model->sv_network->buffer_size[0], 0); - model->sv_network->reset(model->sv_network, 0); + signal_reset(model->sv_network, 0); /* Step the model - set signals and check for can_tx. */ model->sv_signal->scalar[0] = 2; @@ -115,7 +115,7 @@ void test_mstep(void** state) uint8_t C_buf[0x62]; memcpy(C_buf, model->sv_network->binary[0], C_len); C_buf[53] = 0x42; - model->sv_network->reset(model->sv_network, 0); + signal_reset(model->sv_network, 0); /* Step the model - set can_rx and check for signals. */ model->sv_signal->scalar[0] = 1; @@ -126,10 +126,10 @@ void test_mstep(void** state) assert_double_equal(model->sv_signal->scalar[0], 1.0, 0.0); assert_double_equal(model->sv_signal->scalar[1], 0.0, 0.0); assert_double_equal(model->sv_signal->scalar[2], 265.0, 0.0); - model->sv_network->reset(model->sv_network, 0); + signal_reset(model->sv_network, 0); /* Step the model - inject previous CAN packet. */ - model->sv_network->append(model->sv_network, 0, C_buf, C_len); + signal_append(model->sv_network, 0, C_buf, C_len); rc = modelc_step(model->mi, mock->step_size); assert_int_equal(rc, 0); assert_double_equal(model->sv_signal->scalar[0], 2.0, 0.0); @@ -138,7 +138,7 @@ void test_mstep(void** state) assert_null(model->sv_network->binary[0]); assert_int_equal(model->sv_network->length[0], 0); assert_int_equal(model->sv_network->buffer_size[0], 0); - model->sv_network->reset(model->sv_network, 0); + signal_reset(model->sv_network, 0); }