Menu

#58 Custom parameter is not decoded in ROSpec.decodeXML

LTK-Java
closed-fixed
None
5
2009-08-02
2009-07-21
No

Bug reported by Rob Buck on ltk mailing list on 7/20/2009:

the decodeXML method in org.llrp.ltk.generated.parameters.ROSpec does not handle a custom extension in the SpecParameter list. The LLRP definition files appear to be correct (see excerpts below). My guess is that the CodeGenerator is not handling Custom parameters in a choiceDefintion properly. This is the only place in the LLRP definition where a Custom parameter exists in a choiceDefinition.

From llrp-1x0.xsd ...

<xs:complexType name="ROSpec">
<xs:sequence>
<xs:element name="ROSpecID" type="xs:unsignedInt" />
<xs:element name="Priority" type="xs:unsignedByte" />
<xs:element name="CurrentState" type="llrp:ROSpecState" />
<xs:element name="ROBoundarySpec" type="llrp:ROBoundarySpec" />
<xs:choice maxOccurs="unbounded" >
<xs:element name="AISpec" type="llrp:AISpec"/>
<xs:element name="RFSurveySpec" type="llrp:RFSurveySpec"/>
<xs:element name="Custom" type="llrp:Custom" minOccurs="0" maxOccurs="unbounded" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:element name="ROReportSpec" type="llrp:ROReportSpec" minOccurs="0" />
</xs:sequence>
<xs:attributeGroup ref="llrp:paramAttrs"/>
</xs:complexType>

From llrp-1x0-def.xml ...

<parameterDefinition name="ROSpec" typeNum="177" required="true">
<annotation>
<documentation>
<h:a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=55&amp;view=fit">LLRP Specification Section 10.2.1</h:a>
<h:a href="http://www.epcglobalinc.org/standards/llrp/llrp_1_0_1-standard-20070813.pdf#page=135&amp;view=fit">LLRP Specification Section 16.2.4.1</h:a>
</documentation>
<description copyright="Copyright 2006, 2007, EPCglobal Inc.">
<h:p>This parameter carries the information of the Reader inventory and survey operation.</h:p>
</description>
</annotation>
<field type="u32" name="ROSpecID"/>
<field type="u8" name="Priority"/>
<field type="u8" name="CurrentState"
enumeration="ROSpecState"/>
<parameter repeat="1" type="ROBoundarySpec"/>
<choice repeat="1-N" type="SpecParameter"/>
<parameter repeat="0-1" type="ROReportSpec"/>
</parameterDefinition>

<choiceDefinition name="SpecParameter">
<parameter type="AISpec"/>
<parameter type="RFSurveySpec"/>
<parameter type="Custom"/>
</choiceDefinition>

Comment CF: The problem seems to be due to the $utility.allowedCustom($parameter.getName) method call in the javaParameterTemplate returning an empty list.

Discussion

  • Basil Gasser

    Basil Gasser - 2009-07-25

    Problem was that only parameters referenced with the allowedIn tag were considered. However, Custom is a valid parameter, hence we added correct decoding of custom parameters.

     
  • Basil Gasser

    Basil Gasser - 2009-07-25
    • status: open --> closed
     
  • Christian Floerkemeier

    • status: closed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB