Giter Site home page Giter Site logo

Comments (6)

arobenko avatar arobenko commented on June 20, 2024 1

Reproduced and fixed on "hotfix_github_9" branch. Please use it for a while.
I'm planning to do the next official release within next couple of weeks.
Also just keep in mind the following current limitations:

  • Current v3.1.2 release of the COMMS library supports up to 48 variant field members.
  • The "develop" branch of the COMMS library (will become v3.1.3 release soon) supports up to 128 variant members.
  • The current "develop" branch of the "commsdsl" (uses "develop" branch of COMMS library) counts on limit of 128 variant members and generates member access functions itself (instead of counting on the COMMS library) in case number of used members exceeds 128.

The bottom line, if your number of variant members is below 48, use "v3.1.2" release of the COMMS library, otherwise use "develop" branch of commsdsl (also contains the recent fix from hotfix_github_9 branch) as well as "develop" branch of the COMMS library.

from commsdsl.

melg8 avatar melg8 commented on June 20, 2024

Ping @arobenko for help.

from commsdsl.

melg8 avatar melg8 commented on June 20, 2024

Additionally, if we add count to list, error reappears.

Schema

<?xml version="1.0" encoding="UTF-8"?>
<schema name="tutorial4" endian="big">
    <fields>
        <string name="Msg1Name" defaultValue="Message 1" />
        <string name="Msg2Name" defaultValue="Message 2" />
            
        <enum name="MsgId" type="uint8" semanticType="messageId">
            <validValue name="M1" val="1" displayName="^Msg1Name" />
            <validValue name="M2" val="2" displayName="^Msg2Name" />
        </enum>
        
        <enum name="PropKey" type="uint8">
            <validValue name="K1" val="0" />
            <validValue name="K2" val="2" />
            <validValue name="K3" val="5" />
            <validValue name="K4" val="10" />
            <validValue name="K5" val="15" />
            <validValue name="K6" val="25" />
        </enum>
        
        <int name="PropKeyCommon" type="uint8" failOnInvalid="true"/>
        
        <variant name="KeyValueProp">
            <bundle name="Prop1">
                <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K1" validValue="PropKey.K1" />
                <int name="Val" type="uint16" />
            </bundle>
            
            <bundle name="Prop2">
                <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K2" validValue="PropKey.K2" />
                <float name="Val" type="float" defaultValue="nan" />
            </bundle>            
            
            <bundle name="Prop3">
                <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K3" validValue="PropKey.K3" />
                <string name="Val">
                    <lengthPrefix>
                        <int name="Length" type="uint8" />
                    </lengthPrefix>
                </string>
            </bundle>    
        </variant>
        
        <variant name="TlvProp">
            <description>
                Type-Length-Value Property
            </description>
            <members>
                <bundle name="Prop4">
                    <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K4" validValue="PropKey.K4" />
                    <int name="Length" type="uint8" semanticType="length" />
                    <int name="Val" type="uint32" />
                </bundle>
                
                <bundle name="Prop5">
                    <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K5" validValue="PropKey.K5" />
                    <int name="Length" type="uint8" semanticType="length" />
                    <float name="Val" type="double" defaultValue="inf" />
                </bundle>            
                
                <bundle name="Prop6">
                    <int reuse="PropKeyCommon" name="Key" defaultValue="PropKey.K6" validValue="PropKey.K6" />
                    <int name="Length" type="uint8" semanticType="length" />
                    <string name="Val" />
                </bundle>   
                
                <bundle name="Any">
                    <int reuse="PropKeyCommon" name="Key" />
                    <int name="Length" type="uint8" semanticType="length" />
                    <data name="Val" />
                </bundle>  
            </members>
        </variant>
        
    </fields>
    
    <frame name="Frame">
        <size name="Size">
            <int name="SizeField" type="uint16" />
        </size>
        <id name="ID" field="MsgId" />
        <payload name="Data" />
    </frame>
    
    <message name="Msg1" id="MsgId.M1" displayName="^Msg1Name">
        <list name="F1" element="KeyValueProp">
            <countPrefix>
                <int name="Count" type="uint8" />
            </countPrefix>
        </list>
    </message>
    
    <message name="Msg2" id="MsgId.M2" displayName="^Msg2Name">
        <list name="F2" element="KeyValueProp" count="1"/>
    </message>      
</schema>


from commsdsl.

arobenko avatar arobenko commented on June 20, 2024

from commsdsl.

melg8 avatar melg8 commented on June 20, 2024

Thanks for fast response!

from commsdsl.

arobenko avatar arobenko commented on June 20, 2024

Master branch now points to official v3.6 release that has the issue fixed.

from commsdsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.