How does the decode of optional parameters work?
>From the diagrams, it looks like an optional
parameter is instantiated and the decode(bits)
called. Even if decode() recognizes that the
optional parameter is omitted, what happens
to the instance?
Consider abstracting encode/decode. Think about
translating between objects and DOM trees, or
maybe a pretty-printer instead of an XML printer.
How are enumerated values printed as symbols
in the XML?
How would custom parameters be done?
I like the way y'all approached choice parameters.
Would this "interface" trick work if a
parameter is a member of multiple choices?
If I understand what you're doing, it's slick
and I wish C++ could do it.
Regards,
-gww
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Matthias Lampe
Sent: Wed 8/8/2007 4:07 PM
To: LLRP Toolkit Development List
Cc: Basil Gasser; floerkem
Subject: [ltk-d] Proposal for Java Impl based on llrpdef.xml
Hi all,
Please find attached three UML class diagrams that illustrate our proposal
for a Java implementation that is based on llrpdef.xml. We are sending this
to the mailing list because we would like to get some feedback on the design
before we begin work on the code generator.
The class structure shown in the diagrams only features the ADD_ROSPEC
method and associated parameters.
Just a few comments on the design:
- The design features a base set of classes that won't be generated. This
includes
basic LLRP types, the classes that manage the connection to an LLRP
device/to a client (depending on usage), and abstract classes such as
LLRPMessage or LLRPParameter from which generated classes inherit (see
general_structure.gif).
- The names of the classes (especially of the types) are according to the
LLRP specification. We propose to not adopt Java naming conventions but
stick to the LLRP names, e.g. ADD_ROSPEC instead of addRospec.
- All other classes will be generated using the information in llrpdef.xml
and should not be manually modified after generation (marked in grey in the
diagrams).
- Choice parameters (i.e. list of parameters of different types) in the
specification (e.g. ListOfSpecs in ROSpec 10.2.1) will be represented by
generated Java interfaces (marked with the stereotype <<choice>> in the
diagrams) to enhance static type correctness in the lists. We don't
implement special lists but use parameterized java.util.List (see
parameters_messages.gif).
- Parameters that only allow certain values (e.g. ROSpecStopTriggerType
10.2.1.1.2) are subtypes of LLRPInteger that offer constants of the allowed
values and perform runtime check of allowed values (see types.gif)
- Encoding and decoding are performed recursively in the different
LLRPParameter
classes (and their LLRPParameter classes and so on) of a message.
- Please note that the package structure will be changed to org.llrp.* and
that minor inconsistencies in the diagrams exist since we are still in the
process of implementing.
We welcome any comments and suggestions! Are there any changes you would
like to see to facilitate migration from the existing JAVA impl to the one
proposed here that will use llrpdef.xml?
Best
Matthias (Auto-ID Lab ETH Zurich)
Basil Gasser (Auto-ID Lab ETH Zurich)
Christian (Auto-ID Lab MIT)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel