reaktivity / nukleus-maven-plugin

Nukleus Maven Plugin
Apache License 2.0
0 stars 10 forks source link

Added support for using varint32 or varint64 field as size field fo an octets field. #46

Closed cmebarrow closed 7 years ago

cmebarrow commented 7 years ago

Example:

        struct FlatWithOctets
        {
            uint32 fixed1 = 11;
            octets[10] octets1;
            uint16 lengthOctets2;
            string string1;
            octets[lengthOctets2] octets2;
            varint32 lengthOctets3;
            octets[lengthOctets3] octets3 = null;
            octets extension;
        }

NOTE: user must set the size field explicitly before setting the octets field, and when setting the octets field an exception is thrown if the size does not match. Defaulting to null is supported (in this case size field value defaults to -1).