corrects array of strings serialised representation
Test And Build / Format (push) Has been cancelled
Test And Build / Lint (push) Has been cancelled

This commit is contained in:
2025-09-08 14:11:24 +02:00
parent bfae17547c
commit b40c8028b1
+4 -14
View File
@@ -30,18 +30,13 @@ typedef struct {
INT err_timeout; //!< error report interval in sec
} STRAYFIELD_SETTINGS;
// TODO seems like the ODB code is broken. It doesn't seem to correctly parse
// the strings in an array... Seem below where I even try extracting via their
// logic the string, and it matches this format, but doesn't work again when
// importing.
// So you need to still specify the input names manually in the odb
#define STRAYFIELD_SETTINGS_STR \
"\
Input Name = STRING[4] : \n\
[32] Cobra Current\n\
[32] Cobra Comp Coil\n\
[32] Comet 1\n\
[32] Comet 2\n\
[32][0] Cobra Current\n\
[32][1] Cobra Comp Coil\n\
[32][2] Comet 1\n\
[32][3] Comet 2\n\
Output Name = STRING : [32] Output\n\
MCAST_GROUP_COBRA = STRING : [32] 239.208.0.1\n\
MCAST_GROUP_COMET = STRING : [32] 239.208.0.2\n\
@@ -122,11 +117,6 @@ INT strayfield_in_init(HNDLE hKey, STRAYFIELD_INFO **pinfo,
info->hKey = hKey;
char bufferstr[10000];
size = sizeof(bufferstr);
db_copy(hDB, hKey, bufferstr, &size, "DD");
printf(bufferstr);
// create settings record
status = db_create_record(hDB, hKey, "DD", STRAYFIELD_SETTINGS_STR);
if (status != DB_SUCCESS) {