-
Notifications
You must be signed in to change notification settings - Fork 123
Hex Support #1388
Comments
If we keep using CORBA I would argue we should also use them exactly as specified and not introduce one or two extras ;) @tom-wa usually does not see when he is mentioned, so you might need to send him an extra email. (He is subscribed to all changes.) Btw. did you already look into And if we use them, please make a pedantic review of the types if they really conform to what they claim to be. |
i'll update my email filters.. |
As already mentioned I would say we should take a deeper look into the CORBA spec. So Sharing configs is important, so we should really have precise specifications of ranges and serialization.
Do we really want binary stuff in a high-level API? I see that we should support it (crypto, compression,..) but it is not intended to be directly used by applications. Anyway, I am completely missing the discussion which is the absolute minimal API that supports lcdproc that we should start with. It is easy to extend the API, but it is impossible to get rid of mistakes (like sign of char). |
from what i get from the CORBA 3.3 spec paragraph 3.11.1.3 Char Type it's not defined if char should be signed or unsigned. since the signedness of char in c is also implementation defined and some implementations have issues when passing a signed char i'd say kdb_char_t should be unsigned.
not sure if there are many (any?) relevant usecases where reading/storing binary data is needed but i'd rather have it supported but hardly ever used than not support it at all.
lcdproc also uses tristate logic for some values, but i guess that belongs somewhere else |
I would argue that we should specify it for us anyway. Strange that they did not say it is "implementation defined". But the 0-255 is quite specific anyway.
Yes, fully agree.
It is supported via the lower-level API. Without any good usecase I am against having it supported it in the high-level API. For obscure cases, users can always fall back to the lower-level API (even if they use the higher-level API otherwise).
Do you mean strings encoded as hexadecimal chars, or a number encoded as hexadecimal string? In the first case, we have the In the second case, we need another (trivial) transformation plugin.
In the code generator it is straightforward: The user would get an enum. Otherwise the user needs to cast the long to the enum himself. And seems like we also need a plugin to transform enums to/from integers. |
the latter. |
Yes, unfortunately there is a catch. Doing so that would mean that
How does it work for lcdproc at the moment? Are hexvalues allowed at any place where numbers are allowed? |
lcdprocs config_get_int uses base 0 strtol and some configs use hexadecimal representation of values (eg ports) |
@domhof Can you make a proposal for a specification of how all data types are represented as string? Does CORBA already provide such a specification?
Thanks for looking it up! So we need to support hexadecimal at all places. (lcdproc can later decide to not allow it everywhere).
That would be a punch through the abstraction that Elektra should provide. There should not be information how to interpret values within the API, which is not already part of the configuration specification. I am open to allow What do you think? |
In view of the kdb-types defined in kdbtypes.h we can implement the following getters in KDBHL:
@tom-wa Is there anything else you would need or like to have?
The text was updated successfully, but these errors were encountered: