I think if we are going to introduce a new symbols, then we name the
variable in the symbol, so that we can add multiple directives there and
not have to add another symbol every time

%DB120.DBX234:STRING(10){enc:ASCII}

unless you want to treat the {XXX} as {BIT_FLAGS}

So you can have {ENC_ASCII, FOO_BAR, VAS_DAS}





From: Christofer Dutz <[email protected]>
<[email protected]>
Reply: [email protected] <[email protected]> <[email protected]>
Date: February 18, 2023 at 17:39:47
To: [email protected] <[email protected]> <[email protected]>
Subject:  [DISCUSS] Change the general tag-format to include "Encoding"?

Hi all,

As you know, I recently created a PR from the changes another github uses
did based on our work. He also changed the syntax of the String tags in
some drivers to include an encoding.

I didn’t like the format he chose (separating the encoding from the the
rest with a pipe symbol). But in general I think it would be good, if we
allowed specifying an encoding, if we want to use a non-default encoding.

So my proposal would be to add the encoding to all tags (not only strings)
as I could also imagine that it might be beneficial to provide different
types of integer, floating point, date and time encodings.

My proposal would be to have an additional encoding wrapped in curly braces
at the end of the tag address:

Example:

%DB120.DBX234:STRING(10){ASCII}

Espeically for protocols like Modbus, I think this could be pretty good to
have.

What do you think?

Chris

Reply via email to