Hi all,

after many weeks of hard work Sebastian and I have finially finished the 
MSPEC-NG initiative. (Many thanks for Ben and Lukasz for helping to fix issues 
that came up in their particular modules)

Here a short summary of what has changes:

General:

  *   We have started moving the IO classes back into the pojos ... so-far the 
serialize method is now part of the POJO types ... so you can now call 
"myMessageInstance.serialize(writeBuffer)" (The parser part will be moved after 
this)
  *   We have moved the Enum types into the same package as the pojos.

MSPEC:

  *   With the type names and variables we no longer need the "ticks" ... so 
these can now be omitted everywhere.
  *   We now have a simple type "string" which uses a fixed number of bits (the 
same way the other fields do) and a "vstring" type which uses an expression (in 
single ticks) for variable length strings.
  *   Types and Fields now have so-called "attributes". They are added at the 
end of the declaration in the format "{attribute-name}='{attribute-value}'" and 
there can be more than one .. they just need to be separated by spaces.
     *   Currently we have "encoding" and "byteOrder" as supported arguments.
  *   Things like "encoding" are no longer only bound to "string" fields, but 
can be applied to all fiels as "attributes"
     *   Floats now are considered IEE standard floating points which we 
support with 16, 32 and 64 bit, if a different encoding should be used, use the 
"encoding='"SomeEncoding"'".
  *   As floats now provide the encoding, the format of the bit length is now 
simply the total number of bits. So we no-longer need these strange 
"exponent.mantissa" notation.
  *   We changed the type arguments from using square brackets to round 
brackets to separate them from the field notation and make it more similar to 
the notation of normal programming languages.
  *   The arguments used in fields used to pass to complex types are now moved 
from the end to directly after the type name
  *   In case of discriminated types, the arguments passed to sub-types include 
all of the parents arguments automatically (no need to re-declare them)
  *   When using the "byteOrder" attribute we can set the byte order of a type 
(all fields oft hat type) or on a per field basis.
  *   We migrated the use of "int 8" or "uint 8" to byte wherever it made sense 
as "byte" gives the programming language to use it's native "byte" format (Java 
uses signed byte and all others unsigned)
  *   We introduced a new "field-container" called "batchSet". Here all 
attributes set on the batch-set will automatically be set on all fields it 
contains.
  *   When using a string value as condition in a type-switch, you now need to 
correctly escape it as String by using double quotes. When using enum constants 
this is not required.
  *   STATIC_CALLs no longer have a package name ... each driver will 
automatically assume a StaticHelper class in the driver package.
  *   Enum fields without a "fieldname" are no longer possible, we have 
migrated all instances of enum fields without a fieldname to simple fields.
  *   The condition-expression of an optional field is now optional
  *   We have a new field-type called "assert" which is like a simple field 
with a mathing reserved-espression. If the value parsed does not match a given 
value, it will fire an assert exception and the optional field referencing that 
type will resett he ReadBuffer to the position it had before trying to parse 
the type.
  *   We've removed the special "lastItem" variable as it was only used in the 
S7 protocol and made everything a lot more complex, just to save one zero byte 
in case of odd-payload of the last data item of a request.

Java:

  *   Arrays are now Lists in the pojos as this allows better use of generics. 
However if it's a byte typed array, this will remain a byte-array to make 
processing it simpler

Ok ... so I am extremely relieved that this is finally done. The generated code 
is now a LOT simpler and mspec is a lot more expressive and simpler.

Looking forward to testing all of our drivers against real devices next week.

When merging git told me that 857 were updated in 263 commits ... this was a 
mamuth refactoring, but now I think we're safe to continue evolving a lot 
better.

Chris

Reply via email to