Generic Test Application for Xholon
What is it
This simple application demonstrates and tests some core internal functions of the Xholon runtime framework. To see the code that calls these functions, look at toString() in XhGeneric.java.
This application also shows how to add new nodes to the composite structure tree. See the act() function in XhGeneric.java.
How to use it
- Run the Java application (org.primordion.xholon.app.Xhn.java), and select File --> Open --> Generic --> Generic_xhn.xml.
- Expand the Model node in the tree, and then the CompositeStructureHierarchy node.
- You will now see a hierarchy of nodes called node_0, node_1, ..., node_11.
- Click on any node to see information about that node at the bottom of the Xholon window.
- The information will vary depending on the value of TestNumber in the Generic_xhn.xml file.
- Expand the Controller node in the tree.
- Press the Start node.
- The application will now add additional nodes to the tree.
- Press the Refresh node to update the view.
- Re-expand the Model and CompositeStructureHierarchy nodes.
- You will see a number of new nodes, shown as children of node_0.
- Click on any of these nodes to see information about it at the bottom of the window.
Specify which test to run:
- Open the configuration file Generic_xhn.xml.
- Edit the TestNumber param, chaning the value field to a number between 1 and 13.
- Save the file.
- Exit from the Xholon application.
- Rerun the Generic Test Application as described above.
Things to notice
The simple GUI does not automatically update the view. You must click on the Restart node to do this.
Dynamically added new nodes have IDs starting with the next unassigned ID. The various unnumbered nodes (such as Application, Model, etc.) are given IDs, but these are not shown in the GUI.
The Reset node under Controller does not currently work. It is intended to restart the current application.
The GUI can only run one application. You must exit and re-run it to load another application.
In Generic_xhn.xml, the UseDraw parameter is set to true. This causes a simple text-based tree to be drawn in the console window. Only the first letter of each node name is shown.
Things to try
Try all 13 cases.
One new node is added each time the act() function is called for node_0. The number of new nodes can be controlled by varying the MaxProcessLoops parameter in Generic_xhn.xml.
Extending the model
You can test different Xholon functions by adding additional cases to toString().
See above for various Xholon features.
Credits and references
This application only tests internal features of Xholon.