• No labels

3 Comments

  1. I'm currently trying to understand how to implement a new CCSP component and I have an issue with a "dynamicTable" as ObjectType in a component I'm using for learning.

    Hereafter an extract of my Data Model/XML file

    <objects>                                                                                                      
            <object>                                                                                                         
                 <name>Level01</name>                                                                                           
                 <objectType>dynamicTable</objectType>                                                                          
                 <maxInstance>128</maxInstance>
     <functions>                                                                                                      
    <func_GetEntryCount>Level01_GetEntryCount</func_GetEntryCount>                                                 
    <func_GetEntry>Level01_GetEntry</func_GetEntry>
     <func_IsUpdated>Level01_IsUpdated</func_IsUpdated>                                                             
    <func_Synchronize>Level01_Synchronize</func_Synchronize>                                                        <func_GetParamBoolValue>Level01_GetParamBoolValue</func_GetParamBoolValue>                                      <func_GetParamIntValue>Level01_GetParamIntValue</func_GetParamIntValue>                                         <func_GetParamUlongValue>Level01_GetParamUlongValue</func_GetParamUlongValue>                                  <func_GetParamStringValue>Level01_GetParamStringValue</func_GetParamStringValue>                                 
    </functions>                                                                                                       
    <parameters>
    <parameter>
    <name>value0101ULONG</name>                                                                                    
    <type>unsignedInt</type>                                                                                       
    <syntax>uint32</syntax>                                                                                      
    </parameter>                                                                                                 
    </parameters>                                                                                                
    </object>                                                                                           
    </objects>       


    When I executing the dmcli tools, I'm getting the following result for this object

    Parameter    3 name: Device.myEntry.Level01NumberOfEntries
                   type:       uint,    value: 2
    Parameter    4 name: Device.myEntry.Level01.0.value0101ULONG
                   type:       uint,    value: 1
    Parameter    5 name: Device.myEntry.Level01.0.value0101ULONG
                   type:       uint,    value: 2  


    As you can see, the 2 entries of the table are not returned correctly: 
       - index is starting at 0 (instead of 1)
       - Index is 0 for all the entries

    Can someone explain where my issue is coming from? Did I miss something in my implementation? How to fix it?

    Thanks,

  2. Hi Z-Gilles Printemps ,

    Level01_GetEntry() should return the instance number .

    There you have to give nIndex + 1 to the call by ref argument like below

     *pInsNumber  = nIndex + 1;

    You can refer to GetEntry functions of ccsp components.

    Please let us know whether this resolves your issue.

    Regards,
    Priyankaa KVB



    1. Hi Priyankaa K V B 

      This line was missing in my source code and resolves my issue - Thanks a lot

      Related to the XML file, I have some others questions:
        - What are the different types for the tag <objectType>?
        - For each type (i.e. dynamicTable...), what are the mandatory functions we have to define/implement?
        - Is there any document which describes the data Mode lInfo and how to write it (with the different tags, options...)?

      Regarding the <dynamicTable> tag,
        - When are the "GetEntryCount", "GetEntry" and "IsUpdated" functions called?
        - When "IsUpdated" function returns FALSE, a call to the "Synchronize" function is done and
           When "TRUE" is returned, Synchronize" function is not called. Is it a correct behavior?

      Regards,