There are no LE_CFG_TYPE_BINARY defined in le_cfg_interface.h. When using le_cfg_SetBinary() the type is set as STRING instead and the message read back is garbage. Is there a workaround?
I haven’t dug deep into the code to verify if this is true, but I believe that there is no actual type flag in the on-disk format for config tree that says this is binary. Instead, the config tree’s binary writing functions just create a string that base64 encodes the binary data. Then if you read back that string using one of the binary functions, it will base64 decode back into binary data.
If you run
config --help on the target, you will notice that the section of the help that talks about type doesn’t list binary as one of the types.
thank you. The problem is the NodeType function returns the type as a String. This makes it difficult to differentiate the correct cfg_get function to use. A workaround we have is to add a “b” to the name so we can use cfg_getBinary correctly.