From 7287e4e2bf7bda60caf7296a2c70e70703e733d6 Mon Sep 17 00:00:00 2001 From: fengzero Date: Tue, 9 Dec 2025 06:57:40 +0000 Subject: [PATCH] Revert "cid: find first sdo" This reverts commit ffbd9b336a1cc2904a803b7ed3b6ae925d602e66. --- include/neuron/utils/cid.h | 2 -- src/utils/cid.c | 21 --------------------- 2 files changed, 23 deletions(-) diff --git a/include/neuron/utils/cid.h b/include/neuron/utils/cid.h index 0c6e3a05..be8cc465 100644 --- a/include/neuron/utils/cid.h +++ b/include/neuron/utils/cid.h @@ -114,8 +114,6 @@ inline static cid_basictype_e decode_basictype(const char *btype) ret = VisString64; } else if (strcmp(btype, "VisString255") == 0) { ret = VisString255; - } else if (strcmp(btype, "VisString65") == 0) { - ret = Unicode255; } else if (strcmp(btype, "Octet64") == 0) { ret = Octet64; } else if (strcmp(btype, "Struct") == 0) { diff --git a/src/utils/cid.c b/src/utils/cid.c index e77e8f76..50945e2c 100644 --- a/src/utils/cid.c +++ b/src/utils/cid.c @@ -265,16 +265,6 @@ static cid_tm_do_type_t *find_do_type(cid_template_t *template, } } - if (dotype->n_das == 0 && dotype->n_sdos > 0) { - for (int i = 0; i < template->n_dotypes; i++) { - if (strcmp(template->dotypes[i].id, dotype->sdos[0].ref_type) == - 0) { - dotype = &template->dotypes[i]; - break; - } - } - } - return dotype; } @@ -329,11 +319,7 @@ static int find_basic_type(cid_template_t *template, const char *type_id, return 0; } - nlog_notice("Found do type %s for %s, %d", dotype->id, do_name, - dotype->n_das); for (int i = 0; i < dotype->n_das; i++) { - nlog_notice("Check da %s %d %s", dotype->das[i].name, dotype->das[i].fc, - do_name); if (fc != dotype->das[i].fc) { continue; } @@ -342,8 +328,6 @@ static int find_basic_type(cid_template_t *template, const char *type_id, index += 1; *btypes = realloc(*btypes, index * sizeof(cid_basictype_e)); (*btypes)[index - 1] = dotype->das[i].btype; - nlog_notice("Found basic type %s %d, %s %s", dotype->das[i].name, - dotype->das[i].btype, do_name, da_name); continue; } @@ -382,11 +366,6 @@ static void update_dataset(cid_dataset_t *dataset, cid_ldevice_t *ldev, int ret = find_basic_type( template, type_id, dataset->fcdas[i].do_name, dataset->fcdas[i].da_name, dataset->fcdas[i].fc, &bs); - nlog_notice("Found %d basic types for %s %s %s %s %s %d %s", ret, - dataset->fcdas[i].da_name, dataset->fcdas[i].do_name, - dataset->fcdas[i].lnclass, dataset->fcdas[i].lninst, - dataset->fcdas[i].prefix, dataset->fcdas[i].fc, - type_id); if (ret > 0) { if (ret <= 16) { memcpy(dataset->fcdas[i].btypes, bs,