Virtual BUG UI
From BUG Wiki
Contents |
Overview
The Virtual BUG is a software application written in Java that aims to emulate the BUG Runtime environment from the JVM up. Java applications and OSGi bundles that run on the Virtual BUG should work without modification on the real BUGbase unit.
While the Virtual BUG is a good way to get familiar with how a real hardware unit works, it is by no means identical to a physical BUG. All the APIs that are used for modules are identical, but how the software modules behave is different than how a real module will behave.
For example, our Camera Module in the Virtual BUG is configured to send you images stored on the hard drive. However, it does not take pictures.
Some tips:
When to use the Virtual BUG
- Prototyping BUG OSGi applications
- Experimenting with hardware modules
- Testing out BUG applications from other users
- Running and testing Java code
- Test driving a new module before purchasing
When the Virtual BUG is not going to be of help
- Prototyping Linux drivers for BUG
- Compiling Linux C programs for use on the BUG
- Experimenting with the low-level configuration of a BUG
Virtual BUG Interface
The Virtual BUG is a window application that attempts to resemble a physical BUG unit. The images we have used are not from production units so there will most likely be differences between how the current Virtual BUG looks and how the final production product will look.
The window shows the BUG from the side which contains four hot keys, a small LCD screen, and navigation buttons. On the top and bottom of the window are BUGmodule connectors.
Clicking on a Virtual BUG navigation button will trigger the action as if on a real BUG. Click on a non-active part of the BUG to drag it around the screen.
To quit the Virtual BUG, press Esc.
Hot Key Buttons
The buttons to the left of the LCD display are configurable hot key buttons. Applications can listen to these buttons to start an action, such as taking a picture or scanning a product code.
LCD
The Base Unit LCD screen is used to display status information as well as let users view and modify configuration information.
When the BUG is at rest, the Status Bar is toggled and displays information provided by the base unit as well as by each connected module, if applicable. For example, a connected GPS module will add basic location data to the Status Bar.
By default, the LCD screen displays the simulated system battery and the current time.
User applications can also contribute information to the LCD screen. See LCD Helloworld for an example of this.
Navigation Buttons
The navigation buttons provide a way of using a simple menu on the BUG.
The BUG menu is divided into sections, and is similar to a standard desktop menu, which is to say that it is composed of lists of lists. An element can be a container, containing another list, or an action that when selected causes some behavior change on the BUG.
Pressing a navigation button will cause the Status Bar to stop and the top level of menus to be displayed.
Users can add lists and actions to the navigation menu. See Menu Extender to see an example of how this is done.
Modules
On the Virtual BUG, modules can be added/removed by clicking on the Virtual BUG image near the module connectors or by pressing 1-4 while the Virtual BUG is the active window.
A dialog box gives the user a choice of available modules to connect to the base unit, as well as EMPTY for no module. Selecting a module will change the rendering of the Virtual BUG, showing hardware attached to the module connector that was selected.
Menu
The Menu system is essentially a tree that is navigated with the directional buttons on the BUG. Upon selection, container nodes yield their children, and leaf nodes 'execute'. User programs are able to extend the Menu for their own purposes.
Default Structure
- (root) Status Bar
- Applications
- (list of all applications running on BUG)
- Modules
- (list of all modules connected to BUG)
- Services
- (list of all services on BUG)
- Applications

