Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  21 Oct 2019, Vinzenz Bildstein, Forum, Data for key truncated 
    Reply  23 Oct 2019, Konstantin Olchanski, Forum, Data for key truncated 
Message ID: 1729     Entry time: 23 Oct 2019     In reply to: 1728
Author: Konstantin Olchanski 
Topic: Forum 
Subject: Data for key truncated 
> I keep on getting messages like this:
> 16:25:35 [fecaen,ERROR] [odb.c:4567:db_get_data,ERROR] data for key
> "/DAQ/params/VX1730/custom/Board 0/Channel 0/Input range" truncated
>  [  bool fInputRange... ]
>          size = sizeof(fInputRange);
>          db_get_data(hDb, hSubKey, &fInputRange, &size, TID_BOOL);

The error is correct. size of TID_BOOL is 4 byte (uint32_t) and you give is sizeof(bool) instead which is probably not 4.

Note that sizeof(bool) is not well defined, sometimes it is 1 (you need 4), sometimes something else, see

A good fix would be to change fInputRange from bool to uint32_t (which is always 4 byte size).

#include <stdint.h>
uint32_t fInputRange;

ELOG V3.1.4-2e1708b5