Developer Guide - XML Editor / Binary Viewer

Editor

The XML Editor extends the Eclipse editing environment, the functions include:

  • enables the user to edit the LLRP XML files loaded from the Repository
  • dynamically transfers the XML-format LLRP message to Java Objects through LTK-Java API and passes to Graphical Editor and Binary Viewer

    The whole Editor framework is generated by Eclipse Plug-In Assistant. Here is the short description of generated files:

    Class ColorManager.java maintains the color table used in XML-based editors to hihight different tags.

    Class ConfigrationModel.java keeps the information of whole list of reserved words (tags). The model are passed to LLRPContentAssistant.java.

    Class LLRPContentAssistant.java provides Auto-Completion functions.

    Class IXMLColotConstants.java includes constant color values used for sections in LLRP XML files.

    Class MessageElement.java represents tree node in the XML file.

    Class TagRule.java recognizes the Tags part in the XML file.

    Class XMLPartitionScanner.java separates Partitions in the XML file.

    Class XMLTagScanner.java recognizes the Token part in the XML file.

    Class XMLWhitespaceDetector.java recognizes the White space in the XML file.

    Class XMLScanner.java implements one XML Parser.

Binary

The Binary Viewer is a read-only view embeded in the Eclipse's editing area. It only receives the updated LLRP message and reflects its binary format, but user cannot modify its value.

When user switchs from XML Editor or Graphiccal Editor to Binary Viewer, the LLRPEditor module firstly generates the LLRPMessage instance, if there is any critical (Exception caught), switching to the Binary Viewer is disabled. This validation work guarantees that the user always see a valid binary interpretation of the message.

In memory the binary message stores as a BinaryMessage instance, which is transformed by BinaryMessageHelper.java. The BinaryMessage holds attributes of binary strings (BinarySingleValue class), which assembles the whole binary message.