BShell 1.0

 

BShell is a Java GUI client for the Behavior Server. It is possible to upload classes, create instances and save this state into a script file. So the user can use this script file to reload the same classes and instances after restart the server.

Project management

The user must use a project to store all instances into a script file.

If the user creates a project, he must enter the location of the behavior server,

the directory and the name of the script file (this directory is the working directory - see Upload a class).

It is possible to save, save as and load a script file.

To auto load a script file from the operating system shell use:

java bshell.bshell script.bss

Upload a class

The user can only upload sub classes from behavior.behavior. In the Upload a Class dialog are only *.class files of the current working directory (the directory of the script file) and the extended java CLASSPATH (extended by the user). Other files are not uploadable!

In this dialog the user can select one or more classes and upload it with the Upload button. If the user want to upload a class outside the working directory, he must check the With Classpath checkbox and refresh the contents of the list with the Update button. The uploaded classes appears in the list Classes (Information: All super classes of the uploaded class will also be viewed in the list Classes!).

If the identical class is on the behavior server the old version will not be replaced. This action has no effect to the instances.
But, if the new class is different to the old class, all instances of this class and all instances of the subclasses will be removed. The new class replace the old and all removed instances will be regenerated with the old parameters if the restart flag was set (from state to state: stop to stop, running to running and error to running).

This dialog is not modal, so it is not neccessary to close the dialog.

Set class parameter

To set a parameter for a class the user can use the Classes - Parameter ... entry of the menu.

(In the Casino project, the user must enter the name and the port of the NetIV server for the iv.ivBehavior class!)

Remove a class

To remove a class from the server, the user must select the class in the list Classes and use the menu entry or the delete key. The class and all instances of the class will be removed from the behavior server.

It is also possible to remove a class with all sub classes from it and all instances from the classes.

Create an instance

To create an instance of a class the user must select the class from the list Classes and use the menu entry Classes - New Instance ... (a double click with the mouse on the class is also possible). After this a dialog to enter the instance parameter appears.

The new instance has the state stopped and appears in the list Instances.

Start an instance

To start an instance the user must select the instance from the list Instances and use the menu entry (or make a mouse double click on the Instance list item).

Stop an instance

To stop a running instance, select the instance and use the menu entry from the menu Instances.

Remove an instance

To remove an instance from the server, the user must select the instance in the list Instances and use the menu entry or the delete key.

Script format

Tokens

Following tokens Server, Class and Instance are possible in a script file (it is not possible to change this order).

	#BSS V1.0 ascii
	Server { <ServerFields>+ }
	Class { <ClassFields>+ }
	Instance { <InstanceFields>+ }

	ServerFields = host <string> | port <integer>
	
	ClassFields = name <string> | parameter <string>+

	InstanceFields = class <string> | 
			 start [ Yes | No ] |
			 <InstanceParameter>* |
			 restart [ Yes | No ]

	InstanceParameter = parameter <string>

Server Fields

Class Fields

Instance Fields

Comments

Comments starts with a # character.

Example

	#BSS V1.0 ascii
	Server {
		host zwirn
		port 2000
	}
	Class {
		name iv.ivBehavior
		parameter knieriem 3000
	}
	Class {
		name Common
	}
	Class {
		name Planet
	}
	Class {
		name Earth
	}
	Instance {
		class Earth
		start Yes	# Yes is default => command is not neccessary
		parameter 1	# x-position
		parameter 1 	# y-position
		parameter 1 	# z-position
		restart Yes 	# Yes is default => command is not necceassary
	}