Yeah sounds good to me - Sebastian
On 2025/09/17 14:03:11 Christofer Dutz wrote: > No, > > I just want them to use the same syntax … on type level attributes seem to be > implicitly treated as string constants, however on field level you need to > add the additional „““. > My proposal is to treat them the same way … Treating them as expressions > (Like on field level) is 2 chars more per attribute, but gives us the power > to use expressions … could Imagine something like this in the future: > > [type AmsTCPPacket byteOrder='context.legacyDevcice ? „LITTLE_ENDIAN“ > :“BIG_ENDIAN" ' > > Does that help? > > Chris > > Von: Sebastian Rühl <[email protected]> > Datum: Mittwoch, 17. September 2025 um 15:56 > An: [email protected] <[email protected]> > Betreff: Re: [DISCUSS] Streamline the usage of attributes in mspec > > Not sure if I understand correctly what that means. Do you want to remove the > byteOrder attribute on type level? > > - Sebastian > > On 2025/09/17 13:40:54 Christofer Dutz wrote: > > Hi all, > > > > I just stumbled over another inconsistency in our mspecs. > > > > When using attributes on type-level, we do it this way: > > > > [type AmsTCPPacket byteOrder='LITTLE_ENDIAN' > > > > When using them on field-level, we do it this way: > > > > [simple vstring 'stringLength * 8 * 2' value encoding='"UTF-16LE"' ] > > > > The way we’re doing it on field level is potentially a lot more powerful. > > Especially considering that we’re also planning on defining some context > > types in the future. This way we could make these refer to variables in the > > context and not just contain constants. > > > > Considering most of my other DISCUSS threads received almost no responses, > > I’ll do it this way: If I don’t hear any objections, I’ll do the change in > > the next few days. This however doesn’t mean that not responding, even if > > you agree is good. It’s my fallback and comes close to implementing a > > protocol based on timeouts … if you agree, please let me know because as > > soon as I see general consensus I can proceed quicker. > > > > Chris > > > > >
