summaryrefslogtreecommitdiff
path: root/examples/Simulator
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Simulator')
-rw-r--r--examples/Simulator/DOVEBrowser/AnswerEvent.java4
-rw-r--r--examples/Simulator/DOVEBrowser/AnswerListener.java2
-rw-r--r--examples/Simulator/DOVEBrowser/DOVEBrowser.java36
-rw-r--r--examples/Simulator/DOVEBrowser/DOVEBrowserApplet.java14
-rw-r--r--examples/Simulator/DOVEBrowser/DataHandler.java12
-rw-r--r--examples/Simulator/DOVEBrowser/DemoCore.java84
-rw-r--r--examples/Simulator/DOVEBrowser/DemoObservable.java2
-rw-r--r--examples/Simulator/DOVEBrowser/DoubleVisComp.java50
-rw-r--r--examples/Simulator/DOVEBrowser/MTDataHandlerAdapter.java8
-rw-r--r--examples/Simulator/DOVEBrowser/MTQueue.java20
-rw-r--r--examples/Simulator/DOVEBrowser/MultiDoubleVisComp.java48
-rw-r--r--examples/Simulator/DOVEBrowser/NS_Resolve.java34
-rw-r--r--examples/Simulator/DOVEBrowser/NavWeapDataHandler.java110
-rw-r--r--examples/Simulator/DOVEBrowser/NavigationVisComp.java80
-rw-r--r--examples/Simulator/DOVEBrowser/ObservablesDialog.java16
-rw-r--r--examples/Simulator/DOVEBrowser/PersianVisComp.java14
-rw-r--r--examples/Simulator/DOVEBrowser/Properties.java4
-rw-r--r--examples/Simulator/DOVEBrowser/PushConsumer.java2
-rw-r--r--examples/Simulator/DOVEBrowser/PushConsumerFactory.java132
-rw-r--r--examples/Simulator/DOVEBrowser/Queue.java30
-rw-r--r--examples/Simulator/DOVEBrowser/VisComp.java2
-rw-r--r--examples/Simulator/DOVEBrowser/VisCompFactory.java10
-rw-r--r--examples/Simulator/DOVEBrowser/WeaponsVisComp.java26
-rw-r--r--examples/Simulator/Event_Supplier/DOVE_Supplier.cpp34
-rw-r--r--examples/Simulator/Event_Supplier/DOVE_Supplier.h61
-rw-r--r--examples/Simulator/Event_Supplier/DualEC_Sup.cpp42
-rw-r--r--examples/Simulator/Event_Supplier/DualEC_Sup.h88
-rw-r--r--examples/Simulator/Event_Supplier/Event_Con.cpp44
-rw-r--r--examples/Simulator/Event_Supplier/Event_Con.h62
-rw-r--r--examples/Simulator/Event_Supplier/Event_Sup.cpp39
-rw-r--r--examples/Simulator/Event_Supplier/Event_Sup.h56
-rw-r--r--examples/Simulator/Event_Supplier/Logging_Sup.cpp44
-rw-r--r--examples/Simulator/Event_Supplier/Logging_Sup.h61
-rw-r--r--examples/Simulator/Event_Supplier/Makefile.am225
-rw-r--r--examples/Simulator/Makefile.am13
-rw-r--r--examples/Simulator/Persian.idl4
36 files changed, 619 insertions, 894 deletions
diff --git a/examples/Simulator/DOVEBrowser/AnswerEvent.java b/examples/Simulator/DOVEBrowser/AnswerEvent.java
index c10ae7d766a..2db9a3bfd43 100644
--- a/examples/Simulator/DOVEBrowser/AnswerEvent.java
+++ b/examples/Simulator/DOVEBrowser/AnswerEvent.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// AnswerEvent.java
//
@@ -20,4 +20,4 @@ public class AnswerEvent extends java.util.EventObject {
this.selected_ = selected;
}
}
-
+
diff --git a/examples/Simulator/DOVEBrowser/AnswerListener.java b/examples/Simulator/DOVEBrowser/AnswerListener.java
index 77d43646729..f66077c915e 100644
--- a/examples/Simulator/DOVEBrowser/AnswerListener.java
+++ b/examples/Simulator/DOVEBrowser/AnswerListener.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// AnswerListener.java
//
diff --git a/examples/Simulator/DOVEBrowser/DOVEBrowser.java b/examples/Simulator/DOVEBrowser/DOVEBrowser.java
index 647fd613bff..510c9f73714 100644
--- a/examples/Simulator/DOVEBrowser/DOVEBrowser.java
+++ b/examples/Simulator/DOVEBrowser/DOVEBrowser.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DOVEBrowser.java
//
@@ -17,31 +17,31 @@ import java.awt.*;
public class DOVEBrowser {
DemoCore demoCore_;
-
+
public DOVEBrowser () {
- super ();
+ super ();
}
-
+
public void init (String nameServiceIOR, String nameServicePort,
String[] args, boolean use_queueing) {
- demoCore_ = new DemoCore (nameServiceIOR,
- nameServicePort,
- args,
- use_queueing,
- null);
+ demoCore_ = new DemoCore (nameServiceIOR,
+ nameServicePort,
+ args,
+ use_queueing,
+ null);
demoCore_.show ();
demoCore_.run ();
}
-
- public static void main (String[] args) {
+
+ public static void main (String[] args) {
String nameServiceIOR = null;
String nameServicePort = null;
boolean use_queueing = false;
int arg_index = 0;
// Loop through command line arguments, acting on relevant options
- while (args.length > arg_index)
+ while (args.length > arg_index)
{
System.out.println ("args.length [" + args.length + "] arg_index [" +
arg_index + "]");
@@ -51,8 +51,8 @@ public class DOVEBrowser {
++arg_index;
use_queueing = true;
}
- else if ((args[arg_index].equals ("-nameserviceior")) &&
- (args.length > arg_index + 1))
+ else if ((args[arg_index].equals ("-nameserviceior")) &&
+ (args.length > arg_index + 1))
{
System.out.println ("switch [" + args[arg_index] + "]");
System.out.println ("value [" + args[arg_index + 1] + "]");
@@ -77,11 +77,11 @@ public class DOVEBrowser {
arg_index ++;
}
}
-
+
DOVEBrowser doveBrowser = new DOVEBrowser();
doveBrowser.init (nameServiceIOR, nameServicePort, args, use_queueing);
- }
+ }
}
-
-
+
+
diff --git a/examples/Simulator/DOVEBrowser/DOVEBrowserApplet.java b/examples/Simulator/DOVEBrowser/DOVEBrowserApplet.java
index 160eb3a363b..1d77509c3d6 100644
--- a/examples/Simulator/DOVEBrowser/DOVEBrowserApplet.java
+++ b/examples/Simulator/DOVEBrowser/DOVEBrowserApplet.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DOVEBrowserApplet.java
//
@@ -18,15 +18,15 @@ public class DOVEBrowserApplet extends java.applet.Applet {
DemoCore demoCore_;
static String nameServiceIOR_ = null;
-
+
public DOVEBrowserApplet () {
- super ();
+ super ();
}
-
+
public void init () {
// in case of an applet use the following line, else not!
nameServiceIOR_ = this.getParameter ("NSIOR");
-
+
if (nameServiceIOR_ == null) {
System.out.println ("The DOVE Browser cannot run, because no Naming Service IOR was found!");
return;
@@ -41,8 +41,8 @@ public class DOVEBrowserApplet extends java.applet.Applet {
demoCore_.run ();
}
}
-
-
+
+
diff --git a/examples/Simulator/DOVEBrowser/DataHandler.java b/examples/Simulator/DOVEBrowser/DataHandler.java
index 090cccf089d..c7b336a69e2 100644
--- a/examples/Simulator/DOVEBrowser/DataHandler.java
+++ b/examples/Simulator/DOVEBrowser/DataHandler.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DataHandler.java
//
@@ -15,13 +15,13 @@
import org.omg.CORBA.*;
public interface DataHandler {
-
+
// entry point for an consumer to put data event into the data handler
public void update (RtecEventComm.Event event);
-
+
// get a list of the Observables names to allow selection
public java.util.Enumeration getObservablesList ();
-
+
// get a specific Observable
public DemoObservable getObservable(String name);
@@ -30,5 +30,5 @@ public interface DataHandler {
}
-
-
+
+
diff --git a/examples/Simulator/DOVEBrowser/DemoCore.java b/examples/Simulator/DOVEBrowser/DemoCore.java
index 272e84f7c84..4fcb542a5ef 100644
--- a/examples/Simulator/DOVEBrowser/DemoCore.java
+++ b/examples/Simulator/DOVEBrowser/DemoCore.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DemoCore.java
//
@@ -8,7 +8,7 @@
//
// = DESCRIPTION
// This class servers as the core class of the simulation demo.
-// It connects the push consumer of the event service with
+// It connects the push consumer of the event service with
// one or several Java Beans.
//
// ============================================================================
@@ -31,19 +31,19 @@ public class DemoCore extends Frame {
private boolean use_queueing_ = false;
private boolean connections_established_ = false;
- DemoCore (String nameServiceIOR,
+ DemoCore (String nameServiceIOR,
String nameServicePort,
- String[] args,
+ String[] args,
boolean use_queueing,
java.applet.Applet applet) {
super ();
-
+
use_queueing = use_queueing;
setSize (600,400);
setBounds (new Rectangle (50,50,800,500));
setVisible (true);
-
+
gridbag_ = new GridBagLayout();
constraints_ = new GridBagConstraints();
constraints_.fill = GridBagConstraints.BOTH;
@@ -53,8 +53,8 @@ public class DemoCore extends Frame {
// Instantiate the DataHandler and the PushConsumer
dataHandler_ = new NavWeapDataHandler ();
- pushConsumerFactory_ = new PushConsumerFactory (dataHandler_,
- nameServiceIOR,
+ pushConsumerFactory_ = new PushConsumerFactory (dataHandler_,
+ nameServiceIOR,
nameServicePort,
args,
use_queueing_,
@@ -72,20 +72,20 @@ public class DemoCore extends Frame {
menu_.add (menu_add_item_);
menu_.add (menu_quit_item_);
menubar_.add (menu_);
-
+
setMenuBar (menubar_);
-
- menu_quit_item_.addActionListener (new ActionListener ()
+
+ menu_quit_item_.addActionListener (new ActionListener ()
{
public void actionPerformed (ActionEvent e) {
System.exit (0);
}
- });
-
- menu_add_item_.addActionListener (new ActionListener ()
+ });
+
+ menu_add_item_.addActionListener (new ActionListener ()
{
public void actionPerformed (ActionEvent e) {
- ObservablesDialog obsDialog_ =
+ ObservablesDialog obsDialog_ =
new ObservablesDialog (DemoCore.this,
dataHandler_.getObservablesList());
obsDialog_.addAnswerListener (new AnswerListener ()
@@ -97,18 +97,18 @@ public class DemoCore extends Frame {
});
obsDialog_.setVisible (true);
}
- });
-
+ });
+
// instantiate the Factory for Visualization Components
visCompFactory_ = new VisCompFactory ();
// Traverse the args looking for switches that determine connections.
int arg_index = 0;
- while (args.length > arg_index)
+ while (args.length > arg_index)
{
if (args[arg_index].equals ("-dualECdemo") ||
args[arg_index].equals ("-dualECdemo1") ||
- args[arg_index].equals ("-dualECdemo2"))
+ args[arg_index].equals ("-dualECdemo2"))
{
// Use monotonic scales in the double precision data windows
DoubleVisComp.monotonic_scale (true);
@@ -128,7 +128,7 @@ public class DemoCore extends Frame {
}
if (args[arg_index].equals ("-dualECdemo") ||
args[arg_index].equals ("-dualECdemo1") ||
- args[arg_index].equals ("-dualECdemo2"))
+ args[arg_index].equals ("-dualECdemo2"))
{
// Use monotonic scales in the double precision data windows
DoubleVisComp.monotonic_scale (true);
@@ -168,7 +168,7 @@ public class DemoCore extends Frame {
}
}
-
+
// If connections have not been established, set up defaults
if (! connections_established_)
{
@@ -181,39 +181,39 @@ public class DemoCore extends Frame {
}
- public boolean addConnection (String selected, int max_in_a_row) {
+ public boolean addConnection (String selected, int max_in_a_row) {
// to not fill too many into it
if (countVisComp_ < MAX_VIS_COMPS) {
-
+
// get a reference to the Observable
DemoObservable observable_ = dataHandler_.getObservable (selected);
-
+
if (observable_ != null) {
-
+
VisComp visComp_ = visCompFactory_.getNewVisComp (observable_.getProperty (), selected);
if (visComp_ != null) {
- vis_comp_list_.addElement (visComp_);
-
+ vis_comp_list_.addElement (visComp_);
+
// connect the Observer with the Observable
observable_.addObserver (visComp_);
-
+
countVisComp_++;
-
+
// not more than three in a row
if (countVisComp_ == max_in_a_row){
constraints_.gridwidth = GridBagConstraints.REMAINDER;
}
if (countVisComp_ > max_in_a_row) {
constraints_.gridwidth = 1;
- }
-
+ }
+
gridbag_.setConstraints ((java.awt.Component) visComp_, constraints_);
-
+
// add the Visualization Component to the Frame
DemoCore.this.add ((java.awt.Component) visComp_);
DemoCore.this.show ();
-
+
return true;
}
}
@@ -224,20 +224,20 @@ public class DemoCore extends Frame {
public boolean addConnection (String selected) {
return addConnection (selected, 3);
}
-
- public void init ()
+
+ public void init ()
{
}
-
- public void paint (Graphics g)
+
+ public void paint (Graphics g)
{
}
-
- public void run ()
+
+ public void run ()
{
// Wait passive until events come in
pushConsumerFactory_.run ();
- }
+ }
}
-
-
+
+
diff --git a/examples/Simulator/DOVEBrowser/DemoObservable.java b/examples/Simulator/DOVEBrowser/DemoObservable.java
index 81c85b961f8..d89217eddc3 100644
--- a/examples/Simulator/DOVEBrowser/DemoObservable.java
+++ b/examples/Simulator/DOVEBrowser/DemoObservable.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DemoObservable.java
//
diff --git a/examples/Simulator/DOVEBrowser/DoubleVisComp.java b/examples/Simulator/DOVEBrowser/DoubleVisComp.java
index 228d9931fc7..4347fcc2993 100644
--- a/examples/Simulator/DOVEBrowser/DoubleVisComp.java
+++ b/examples/Simulator/DOVEBrowser/DoubleVisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// DoubleVisComp.java
//
@@ -23,7 +23,7 @@ public class DoubleVisComp extends Canvas implements VisComp
private static final int MIN_SPACING = 2;
private static final int POINT_HISTORY = 200;
private static final Font FONT = new Font ("Dialog", Font.PLAIN, 10);
-
+
private Queue plot_;
private String title_;
private Graphics offgraphics_;
@@ -52,19 +52,19 @@ public class DoubleVisComp extends Canvas implements VisComp
title_ = "";
max_value_ = 1;
old_max_value_ = max_value_;
-
+
java.util.Random rand = new java.util.Random (System.currentTimeMillis());
float hue_ = rand.nextFloat();
float brightness = rand.nextFloat();
hue_ += .075;
-
+
if (hue_ > 1.0)
hue_ -= 1.0;
-
+
if (brightness > 0.75)
brightness -= 0.25;
-
+
Color new_color = Color.getHSBColor(hue_, 1, brightness);
this.setBackground(new_color);
@@ -82,7 +82,7 @@ public class DoubleVisComp extends Canvas implements VisComp
public void setName (String title) {
title_ = title;
}
-
+
public int getProperty () {
return Properties.DOUBLE;
}
@@ -94,7 +94,7 @@ public class DoubleVisComp extends Canvas implements VisComp
public Dimension getPreferredSize () {
return new Dimension (175, 175);
}
-
+
public String getName() {
return title_;
}
@@ -107,24 +107,24 @@ public class DoubleVisComp extends Canvas implements VisComp
{
Double double_temp_;
try {
- double_temp_ = (Double) obj;
+ double_temp_ = (Double) obj;
}
catch (Exception excp) {
double_temp_ = new Double (0.0);
System.out.println (excp);
System.out.println ("Visualization Component received wrong data type!");
}
-
+
float new_point = double_temp_.floatValue();
Float temp = (Float)plot_.dequeue_tail();
plot_.enqueue_head(new Float(new_point));
-
+
if (new_point > local_max_)
{
local_max_ = new_point;
local_max_values_ [local_max_value_index_] = local_max_;
}
-
+
if (monotonic_scale_)
{
float global_max = 0;
@@ -132,7 +132,7 @@ public class DoubleVisComp extends Canvas implements VisComp
while (global_max > max_value_)
max_value_ *= 2;
-
+
while ((global_max < max_value_/2) && (max_value_ > old_max_value_))
max_value_ /= 2;
}
@@ -140,7 +140,7 @@ public class DoubleVisComp extends Canvas implements VisComp
{
while (local_max_ > max_value_)
max_value_ *= 2;
-
+
while ((local_max_ < max_value_/2) && (max_value_ > old_max_value_))
max_value_ /= 2;
}
@@ -156,7 +156,7 @@ public class DoubleVisComp extends Canvas implements VisComp
Enumeration queue_iter = plot_.forward_iterator();
int x1 = d.width - 8, y1, x2, y2, fheight = fm.getHeight (), i;
String value = "Value (of " + max_value_ + "): " + String.valueOf(plot_.head());
-
+
if ((offscreen_ == null) ||
(offscreensize_.width != d.width - 8) ||
(offscreensize_.height != d.height - 8))
@@ -171,12 +171,12 @@ public class DoubleVisComp extends Canvas implements VisComp
g.draw3DRect (0, 0, d.width - 1, d.height - 1, true);
g.draw3DRect (1, 1, d.width - 3, d.height - 3, true);
g.draw3DRect (2, 2, d.width - 5, d.height - 5, true);
-
+
local_max_ = 0;
offgraphics_.setColor (getBackground());
offgraphics_.fillRect (0, 0, offscreensize_.width, offscreensize_.height);
- offgraphics_.setColor (getForeground());
+ offgraphics_.setColor (getForeground());
offgraphics_.drawString(title_, 5, fheight);
offgraphics_.drawString(value, 5, offscreensize_.height - 5);
@@ -184,13 +184,13 @@ public class DoubleVisComp extends Canvas implements VisComp
while (queue_iter.hasMoreElements())
{
value_2 = ((Float)queue_iter.nextElement()).floatValue();
-
+
if (value_1 > local_max_)
local_max_ = value_1;
-
+
y1 = normalize(offscreensize_.height - fheight, value_1);
y2 = normalize(offscreensize_.height - fheight, value_2);
-
+
tmp = value_2;
value_2 = value_1;
value_1 = tmp;
@@ -206,13 +206,13 @@ public class DoubleVisComp extends Canvas implements VisComp
g.drawImage(offscreen_, 3, 3, null);
}
-
+
public void paint(Graphics g)
{
Dimension d = getSize ();
int plot_length = plot_.length();
int num_points = d.width / spacing_;
-
+
if (plot_.length() < num_points)
{
for (int i = 0; i < num_points - plot_length; i++)
@@ -223,7 +223,7 @@ public class DoubleVisComp extends Canvas implements VisComp
for (int i = 0; i < plot_length - num_points; i++)
plot_.dequeue_tail();
}
-
+
update(g);
}
@@ -244,7 +244,7 @@ public class DoubleVisComp extends Canvas implements VisComp
private synchronized void local_max_init () {
// Create a new, larger, array to hold the local maxima
- float new_max_values [] =
+ float new_max_values [] =
new float [local_max_value_count_ + 1];
// Copy the previously stored maxima (if any) into the new array.
@@ -267,7 +267,7 @@ public class DoubleVisComp extends Canvas implements VisComp
float ratio = (float)coord/max_value_;
float pixels = (float)height*ratio;
float location = (float)height - pixels;
-
+
return Math.round(location);
}
}
diff --git a/examples/Simulator/DOVEBrowser/MTDataHandlerAdapter.java b/examples/Simulator/DOVEBrowser/MTDataHandlerAdapter.java
index 6b1c1ddb9dd..3f226234bfd 100644
--- a/examples/Simulator/DOVEBrowser/MTDataHandlerAdapter.java
+++ b/examples/Simulator/DOVEBrowser/MTDataHandlerAdapter.java
@@ -1,6 +1,6 @@
// $Id$
-// This is an adapter class for a data handler to be used in a separate
+// This is an adapter class for a data handler to be used in a separate
// thread. The adapter provides a push method that places an event
// set into its synchronized internal MTQueue. It runs a separate thread
// which blocks until there is an event in the queue, then dequeues the
@@ -38,7 +38,7 @@ public class MTDataHandlerAdapter extends Thread
{
for (int i = 0; i < events.length; ++i)
{
- if(events[i].header.type ==
+ if(events[i].header.type ==
PushConsumer.ACE_ES_EVENT_NOTIFICATION)
{
// System.out.println ("MTDataHandlerAdapter.push updating data handler");
@@ -57,12 +57,12 @@ public class MTDataHandlerAdapter extends Thread
try
{
// Pull an event set from the head of the queue
- RtecEventComm.Event[] events =
+ RtecEventComm.Event[] events =
(RtecEventComm.Event[]) queue_.dequeue_head ();
for (int i = 0; i < events.length; ++i)
{
- if(events[i].header.type ==
+ if(events[i].header.type ==
PushConsumer.ACE_ES_EVENT_NOTIFICATION)
{
dataHandler_.update (events[i]);
diff --git a/examples/Simulator/DOVEBrowser/MTQueue.java b/examples/Simulator/DOVEBrowser/MTQueue.java
index 357c872c4dc..d53bf55408f 100644
--- a/examples/Simulator/DOVEBrowser/MTQueue.java
+++ b/examples/Simulator/DOVEBrowser/MTQueue.java
@@ -10,10 +10,10 @@ public class MTQueue
// Initially, the head and tail of the queue are null
MTQueue_Node head_ = null;
MTQueue_Node tail_ = null;
-
+
// Constructor - does nothing.
public MTQueue ()
- {
+ {
}
// Places a passed Object at the end of the queue.
@@ -44,7 +44,7 @@ public class MTQueue
{
// Create a new node to hold the object.
MTQueue_Node new_node = new MTQueue_Node(new_data);
-
+
// Insert the node into the queue.
if (head_ == null)
{
@@ -61,7 +61,7 @@ public class MTQueue
// Wake up any waiting threads
notifyAll ();
}
-
+
// Try to remove an object from the head of the queue - nonblocking.
public synchronized Object try_dequeue_head()
{
@@ -84,7 +84,7 @@ public class MTQueue
// Start with a null reference.
Object return_value = null;
- // Wait until there's something to dequeue.
+ // Wait until there's something to dequeue.
while (head_ == null)
{
try
@@ -116,13 +116,13 @@ public class MTQueue
head_.prev_.next_ = null;
head_.prev_.prev_ = null;
head_.prev_.data_ = null;
- head_.prev_ = null;
+ head_.prev_ = null;
}
// Return the object we dequeued.
return return_value;
}
-
+
// Try to remove an object from the tail of the queue - nonblocking.
public synchronized Object try_dequeue_tail ()
{
@@ -145,7 +145,7 @@ public class MTQueue
// Start with a null reference.
Object return_value = null;
- // Wait until there's something to dequeue.
+ // Wait until there's something to dequeue.
while (tail_ == null)
{
try
@@ -171,13 +171,13 @@ public class MTQueue
head_ = null;
}
else
- {
+ {
return_value = tail_.data_;
tail_ = tail_.prev_;
tail_.next_.data_ = null;
tail_.next_.next_ = null;
tail_.next_.prev_ = null;
- tail_.next_ = null;
+ tail_.next_ = null;
}
// Return the object we dequeued.
diff --git a/examples/Simulator/DOVEBrowser/MultiDoubleVisComp.java b/examples/Simulator/DOVEBrowser/MultiDoubleVisComp.java
index 1685f25c69a..4961e2aa437 100644
--- a/examples/Simulator/DOVEBrowser/MultiDoubleVisComp.java
+++ b/examples/Simulator/DOVEBrowser/MultiDoubleVisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// MultiDoubleVisComp.java
//
@@ -25,7 +25,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
private static final int MIN_SPACING = 2;
private static final int POINT_HISTORY = 200;
private static final Font FONT = new Font ("Dialog", Font.PLAIN, 10);
-
+
private Queue plots_ [];
private int plot_count_ = 0;
private String title_;
@@ -62,19 +62,19 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
title_ = "";
max_value_ = 1;
old_max_value_ = max_value_;
-
+
java.util.Random rand = new java.util.Random (System.currentTimeMillis ());
float hue_ = rand.nextFloat ();
float brightness = rand.nextFloat ();
hue_ += .075;
-
+
if (hue_ > 1.0)
hue_ -= 1.0;
-
+
if (brightness > 0.75)
brightness -= 0.25;
-
+
Color new_color = Color.getHSBColor (hue_, 1, brightness);
this.setBackground (new_color);
@@ -129,7 +129,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
public void setName (String title) {
title_ = title;
}
-
+
public int getProperty () {
return Properties.MULTIDOUBLE;
}
@@ -141,7 +141,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
public Dimension getPreferredSize () {
return new Dimension (175, 175);
}
-
+
public String getName () {
return title_;
}
@@ -154,14 +154,14 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
{
Double double_array[];
try {
- double_array = (Double[]) obj;
+ double_array = (Double[]) obj;
}
catch (Exception excp) {
double_array = new Double [plot_count_];
for (int j = 0; j < plot_count_; ++j)
{
double_array [j] = new Double (0.0);
- }
+ }
System.out.println (excp);
System.out.println ("Multi Double Visualization Component received wrong data type!");
}
@@ -171,13 +171,13 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
float new_point = double_array [i].floatValue ();
Float temp = (Float) plots_ [i].dequeue_tail ();
plots_ [i].enqueue_head (new Float (new_point));
-
+
if (new_point > local_max_ [i])
{
local_max_ [i] = new_point;
local_max_values_ [local_max_value_index_ [i]] = local_max_ [i];
}
-
+
if (monotonic_scale_)
{
float global_max = 0;
@@ -185,7 +185,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
while (global_max > max_value_)
max_value_ *= 2;
-
+
while ((global_max < max_value_/2) && (max_value_ > old_max_value_))
max_value_ /= 2;
}
@@ -193,7 +193,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
{
while (local_max_ [i] > max_value_)
max_value_ *= 2;
-
+
while ((local_max_ [i] < max_value_/2) && (max_value_ > old_max_value_))
max_value_ /= 2;
}
@@ -211,7 +211,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
FontMetrics fm = g.getFontMetrics ();
int fheight = fm.getHeight ();
String value = "Scale: " + max_value_ ;
-
+
if ((offscreen_ == null) ||
(offscreensize_.width != d.width - 8) ||
(offscreensize_.height != d.height - 8))
@@ -226,10 +226,10 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
g.draw3DRect (0, 0, d.width - 1, d.height - 1, true);
g.draw3DRect (1, 1, d.width - 3, d.height - 3, true);
g.draw3DRect (2, 2, d.width - 5, d.height - 5, true);
-
+
offgraphics_.setColor (getBackground ());
offgraphics_.fillRect (0, 0, offscreensize_.width, offscreensize_.height);
- offgraphics_.setColor (getForeground ());
+ offgraphics_.setColor (getForeground ());
offgraphics_.drawString (title_, 5, fheight);
offgraphics_.drawString (value, 5, offscreensize_.height - 5);
@@ -242,13 +242,13 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
while (queue_iter.hasMoreElements ())
{
value_2 = ((Float) queue_iter.nextElement ()).floatValue ();
-
+
if (value_1 > local_max_ [i])
local_max_ [i] = value_1;
-
+
y1 = normalize (offscreensize_.height - fheight, value_1, i);
y2 = normalize (offscreensize_.height - fheight, value_2, i);
-
+
tmp = value_2;
value_2 = value_1;
value_1 = tmp;
@@ -265,7 +265,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
g.drawImage (offscreen_, 3, 3, null);
}
-
+
public void paint (Graphics g)
{
Dimension d = getSize ();
@@ -274,7 +274,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
{
int plot_length = plots_ [i].length ();
int num_points = d.width / spacing_;
-
+
if (plots_[i].length () < num_points)
{
for (int j = 0; j < num_points - plot_length; j++)
@@ -309,7 +309,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
if (new_count > plot_count_)
{
// New larger static global array of all local maxima values
- float local_max_values_temp [] =
+ float local_max_values_temp [] =
new float [local_max_value_count_ + new_count - plot_count_];
// Copy the previously stored maxima (if any) into the new array.
@@ -365,7 +365,7 @@ public class MultiDoubleVisComp extends Canvas implements VisComp
// Then, subtract the pixel location
float location = (float) height - pixels;
-
+
return Math.round (location);
}
}
diff --git a/examples/Simulator/DOVEBrowser/NS_Resolve.java b/examples/Simulator/DOVEBrowser/NS_Resolve.java
index 7ef862e3aea..9a675d22333 100644
--- a/examples/Simulator/DOVEBrowser/NS_Resolve.java
+++ b/examples/Simulator/DOVEBrowser/NS_Resolve.java
@@ -1,8 +1,8 @@
-// $Id$
+// $Id$
// ============================================================================
//
-//
+//
// = FILENAME
// NS_Resolve.java
//
@@ -14,7 +14,7 @@
// = DESCRIPTION
// Resolves the initial reference to the Naming service,
// the orb has to be given as a parameter to the
-// resolve_name_service call.
+// resolve_name_service call.
//
// ============================================================================
@@ -79,7 +79,7 @@ public class NS_Resolve
// Wait 3 seconds for the Naming Service to connect
listenSocket.setSoTimeout(3000);
replySocket = listenSocket.accept();
-
+
// @@ The restriction right now is that the length of the IOR cannot be longer than 4096
char[] reply = new char[4096];
@@ -91,14 +91,14 @@ public class NS_Resolve
{
int c = in.read();
- if (c == -1)
+ if (c == -1)
{
throw new IOException("Unexpected EOF.");
}
reply[ length ] = (char) c;
-
- if (c == 0)
+
+ if (c == 0)
{
break;
}
@@ -114,36 +114,36 @@ public class NS_Resolve
catch (java.io.InterruptedIOException e)
{
System.err.println ("NS_Resolve: The receive lasted too long");
- }
- catch(org.omg.CORBA.SystemException e)
+ }
+ catch(org.omg.CORBA.SystemException e)
{
System.err.println(e);
- }
+ }
catch (java.io.IOException e)
{
System.err.println (e);
}
- finally
+ finally
{
// Close the sockets.
- if (sendSocket != null)
+ if (sendSocket != null)
{
sendSocket.close();
}
- if (listenSocket != null)
+ if (listenSocket != null)
{
- try
+ try
{
listenSocket.close();
}
catch (IOException e) {}
}
- if (replySocket != null)
+ if (replySocket != null)
{
- try
+ try
{
replySocket.close();
}
@@ -152,5 +152,5 @@ public class NS_Resolve
}
return null;
- }
+ }
}
diff --git a/examples/Simulator/DOVEBrowser/NavWeapDataHandler.java b/examples/Simulator/DOVEBrowser/NavWeapDataHandler.java
index 0e323279598..922ae739cd1 100644
--- a/examples/Simulator/DOVEBrowser/NavWeapDataHandler.java
+++ b/examples/Simulator/DOVEBrowser/NavWeapDataHandler.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// NavWeapDataHandler.java
//
@@ -8,7 +8,7 @@
//
// = DESCRIPTION
// This is an implementation of the interface Data Handler,
-// it handles Navigation and Weapons data, where statistic data is
+// it handles Navigation and Weapons data, where statistic data is
// part of it. Several Observables are declared, they can be accessed by
// any number of Observers, which could reside in a Java Bean for example.
//
@@ -18,18 +18,18 @@ import org.omg.CORBA.*;
public class NavWeapDataHandler implements DataHandler {
- java.util.Hashtable ObservablesTable;
+ java.util.Hashtable ObservablesTable;
int received_events_;
// Observable for Persian Recursion data
class PersianObservable extends DemoObservable {
-
+
// to ask which kind of viewer is needed to display data
public int getProperty () {
return Properties.PERSIAN;
}
-
+
public void updatePersianData (PersianRecursion.Data data) {
// System.out.println ("in PersianObservable.updatePersianData");
@@ -42,20 +42,20 @@ public class NavWeapDataHandler implements DataHandler {
// Observable for Navigation data
class NavigationObservable extends DemoObservable {
-
+
// to ask which kind of viewer is needed to display data
public int getProperty () {
return Properties.NAVIGATION;
- }
-
+ }
+
public void updateNavigation (Navigation navigation) {
setChanged ();
notifyObservers (navigation);
- }
+ }
}
class WeaponsObservable extends DemoObservable {
-
+
// to ask which kind of viewer is needed to display data
public int getProperty () {
return Properties.WEAPONS;
@@ -66,13 +66,13 @@ public class NavWeapDataHandler implements DataHandler {
notifyObservers (weapons);
}
}
-
+
class Cpu_UsageObservable extends DemoObservable {
-
+
public int getProperty () {
return Properties.DOUBLE;
}
-
+
public void updateCpu_Usage (double utilization) {
setChanged ();
Double temp_ = new Double (utilization);
@@ -81,7 +81,7 @@ public class NavWeapDataHandler implements DataHandler {
}
class OverheadObservable extends DemoObservable {
-
+
public int getProperty () {
return Properties.DOUBLE;
}
@@ -97,11 +97,11 @@ public class NavWeapDataHandler implements DataHandler {
double latency = 0.0;
double avg_latency = 0.0;
double sample_count = 0.0;
-
+
public int getProperty () {
return Properties.DOUBLE;
}
-
+
public void updateJitter (long completion_time,
long computation_time,
long arrival_time) {
@@ -112,10 +112,10 @@ public class NavWeapDataHandler implements DataHandler {
latency = latency > 0 ? latency : 0;
sample_count = sample_count + 1.0;
- avg_latency = (avg_latency * (sample_count - 1.0) + latency) /
- (sample_count);
+ avg_latency = (avg_latency * (sample_count - 1.0) + latency) /
+ (sample_count);
- double jitter_ = (double)Math.abs(latency - avg_latency);
+ double jitter_ = (double)Math.abs(latency - avg_latency);
setChanged ();
Double temp_ = new Double (jitter_);
@@ -124,28 +124,28 @@ public class NavWeapDataHandler implements DataHandler {
}
class DeadlinesObservable extends DemoObservable {
-
+
public int getProperty () {
return Properties.DOUBLE;
}
-
- public void updateDeadlines (long deadline_time,
+
+ public void updateDeadlines (long deadline_time,
long completion_time) {
double missed_ = (deadline_time < completion_time) ? 1.0 : 0.0;
Double temp_ = new Double (missed_);
setChanged ();
- notifyObservers (temp_);
+ notifyObservers (temp_);
}
}
class CriticalDeadlinesObservable extends DeadlinesObservable {
-
+
public int getProperty () {
return Properties.DOUBLE;
}
-
- public void updateDeadlines (long deadline_time,
+
+ public void updateDeadlines (long deadline_time,
long completion_time,
long criticality) {
@@ -153,14 +153,14 @@ public class NavWeapDataHandler implements DataHandler {
(deadline_time < completion_time)) ? 1.0 : 0.0;
Double temp_ = new Double (missed_);
setChanged ();
- notifyObservers (temp_);
+ notifyObservers (temp_);
}
}
class LatencyObservable extends DemoObservable {
double latency = 0.0;
double last_latency = 0.0;
-
+
public int getProperty () {
return Properties.DOUBLE;
}
@@ -169,12 +169,12 @@ public class NavWeapDataHandler implements DataHandler {
last_latency = latency;
latency = (double)(computation_time);
latency = latency > 0 ? latency : 0;
-
+
setChanged ();
Double temp_ = new Double(latency);
- notifyObservers (temp_);
+ notifyObservers (temp_);
}
-
+
public void updateLatency (long completion_time,
long computation_time,
long arrival_time) {
@@ -183,14 +183,14 @@ public class NavWeapDataHandler implements DataHandler {
(double)(computation_time) -
(double)(arrival_time);
latency = latency > 0 ? latency : 0;
-
+
setChanged ();
Double temp_ = new Double(latency);
- notifyObservers (temp_);
+ notifyObservers (temp_);
}
}
-
-
+
+
public synchronized void update (RtecEventComm.Event event) {
// System.out.println ("in NavWeapDataHandler.update");
@@ -206,7 +206,7 @@ public class NavWeapDataHandler implements DataHandler {
try
{
- persian_recursion_data =
+ persian_recursion_data =
PersianRecursion.DataHelper.extract (any_value);
}
catch (Exception e)
@@ -231,7 +231,7 @@ public class NavWeapDataHandler implements DataHandler {
pobs_hi.updatePersianData (persian_recursion_data);
- // LatencyObservable lobs_hi =
+ // LatencyObservable lobs_hi =
// (LatencyObservable) ObservablesTable.get ("High Consumer Execution Time (100 ns)");
// lobs_hi.updateLatency (persian_recursion_data.computation_time);
@@ -249,7 +249,7 @@ public class NavWeapDataHandler implements DataHandler {
// System.out.println ("updated low priority persian recursion observable");
- // LatencyObservable lobs_lo =
+ // LatencyObservable lobs_lo =
// (LatencyObservable) ObservablesTable.get ("Low Consumer Execution Time (100 ns)");
// lobs_lo.updateLatency (persian_recursion_data.computation_time);
@@ -291,7 +291,7 @@ public class NavWeapDataHandler implements DataHandler {
DeadlinesObservable dobs = (DeadlinesObservable)ObservablesTable.get ("Missed Deadlines");
dobs.updateDeadlines (navigation_.deadline_time,
navigation_.completion_time);
- CriticalDeadlinesObservable cdobs =
+ CriticalDeadlinesObservable cdobs =
(CriticalDeadlinesObservable)ObservablesTable.get ("Missed Critical Deadlines");
cdobs.updateDeadlines (navigation_.deadline_time,
navigation_.completion_time,
@@ -310,7 +310,7 @@ public class NavWeapDataHandler implements DataHandler {
{
Weapons weapons_ = WeaponsHelper.extract (any_value);
- // if the weapons structure's update data flag is set, update
+ // if the weapons structure's update data flag is set, update
// itss scheduling data with actual values from the EC
if (weapons_.update_data > 0)
{
@@ -350,13 +350,13 @@ public class NavWeapDataHandler implements DataHandler {
weapons_.arrival_time);
received_events_++;
}
- else
+ else
{
System.out.println ("Received wrong type information");
-
+
System.out.println ("Received any_value.type (): [" +
any_value.type() + "]");
-
+
System.out.println ("Expected NavigationHelper.type (): [" +
NavigationHelper.type() + "]");
@@ -367,7 +367,7 @@ public class NavWeapDataHandler implements DataHandler {
PersianRecursion.DataHelper.type() + "]");
}
}
-
+
NavWeapDataHandler () {
ObservablesTable = new java.util.Hashtable();
@@ -381,27 +381,27 @@ public class NavWeapDataHandler implements DataHandler {
ObservablesTable.put ("Missed Deadlines", new DeadlinesObservable());
ObservablesTable.put ("Missed Critical Deadlines", new CriticalDeadlinesObservable());
ObservablesTable.put ("Latency (100 ns)", new LatencyObservable());
- ObservablesTable.put ("Weapons Latency (100 ns)", new LatencyObservable());
- ObservablesTable.put ("Navigation Latency (100 ns)", new LatencyObservable());
- ObservablesTable.put ("High Consumer Persian Recursion", new PersianObservable());
- ObservablesTable.put ("Low Consumer Persian Recursion", new PersianObservable());
- ObservablesTable.put ("High Consumer Execution Time (100 ns)", new LatencyObservable());
- ObservablesTable.put ("Low Consumer Execution Time (100 ns)", new LatencyObservable());
+ ObservablesTable.put ("Weapons Latency (100 ns)", new LatencyObservable());
+ ObservablesTable.put ("Navigation Latency (100 ns)", new LatencyObservable());
+ ObservablesTable.put ("High Consumer Persian Recursion", new PersianObservable());
+ ObservablesTable.put ("Low Consumer Persian Recursion", new PersianObservable());
+ ObservablesTable.put ("High Consumer Execution Time (100 ns)", new LatencyObservable());
+ ObservablesTable.put ("Low Consumer Execution Time (100 ns)", new LatencyObservable());
}
-
+
public java.util.Enumeration getObservablesList () {
return ObservablesTable.keys ();
}
-
+
public DemoObservable getObservable(String name) {
return (DemoObservable)ObservablesTable.get (name);
}
-
+
public int getObservableProperty (String name) {
DemoObservable obs = (DemoObservable)ObservablesTable.get (name);
return obs.getProperty ();
}
}
-
-
+
+
diff --git a/examples/Simulator/DOVEBrowser/NavigationVisComp.java b/examples/Simulator/DOVEBrowser/NavigationVisComp.java
index 3d7a217389b..a602945b50b 100644
--- a/examples/Simulator/DOVEBrowser/NavigationVisComp.java
+++ b/examples/Simulator/DOVEBrowser/NavigationVisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// NavigationVisComp.java
//
@@ -35,40 +35,40 @@ public class NavigationVisComp extends Panel implements VisComp
public int getProperty () {
return Properties.NAVIGATION;
}
-
+
public void update (java.util.Observable observable, java.lang.Object obj) {
Navigation navigation_ = null;
try {
- navigation_ = (Navigation) obj;
+ navigation_ = (Navigation) obj;
}
catch (Exception excp) {
System.out.println (excp);
System.out.println ("Visualization Component received wrong data type!");
}
- if (navigation_ != null) {
+ if (navigation_ != null) {
// make sure all the values are in the proper range.
- navigation_.roll = (navigation_.roll > 180 || navigation_.roll < -180) ?
+ navigation_.roll = (navigation_.roll > 180 || navigation_.roll < -180) ?
0 : navigation_.roll;
- navigation_.pitch = (navigation_.pitch > 90 || navigation_.pitch < -90) ?
+ navigation_.pitch = (navigation_.pitch > 90 || navigation_.pitch < -90) ?
0 : navigation_.pitch;
// update the artificial horizon
alt_hor_.update_display (navigation_.roll, navigation_.pitch);
- navigation_.pitch = (navigation_.position_latitude > 90 || navigation_.position_latitude < -90) ?
+ navigation_.pitch = (navigation_.position_latitude > 90 || navigation_.position_latitude < -90) ?
0 : navigation_.position_latitude;
- navigation_.pitch = (navigation_.position_longitude > 100 || navigation_.position_longitude < 00) ?
+ navigation_.pitch = (navigation_.position_longitude > 100 || navigation_.position_longitude < 00) ?
0 : navigation_.position_longitude;
- navigation_.pitch = (navigation_.altitude > 90 || navigation_.altitude < -90) ?
+ navigation_.pitch = (navigation_.altitude > 90 || navigation_.altitude < -90) ?
0 : navigation_.altitude;
- navigation_.pitch = (navigation_.heading > 180 || navigation_.heading < -180) ?
+ navigation_.pitch = (navigation_.heading > 180 || navigation_.heading < -180) ?
0 : navigation_.heading;
// update the position display
- pos_.update_display (navigation_.position_latitude,
- navigation_.position_longitude,
- navigation_.altitude,
- navigation_.heading);
+ pos_.update_display (navigation_.position_latitude,
+ navigation_.position_longitude,
+ navigation_.altitude,
+ navigation_.heading);
}
}
}
@@ -78,13 +78,13 @@ extends Canvas
{
private final static Color GREEN = new Color (0, 100, 0),
BLUE = new Color (30, 144, 255);
-
+
private Graphics offgraphics_;
private Image offscreen_;
private Dimension offscreensize_;
private int roll_ = 0, pitch_ = 0;
-
+
public void update_display (int roll, int pitch)
{
roll_ = roll;
@@ -92,7 +92,7 @@ extends Canvas
repaint ();
}
-
+
public Dimension getPreferredSize ()
{
return new Dimension (180, 180);
@@ -102,18 +102,18 @@ extends Canvas
{
return new Dimension (80, 80);
}
-
+
public void paint (Graphics g)
{
update (g);
}
-
+
public void update (Graphics g)
{
Dimension d = getSize ();
int rad, angles[] = { 180, 0 };
Point center;
-
+
if ((offscreen_ == null) || (d.width != offscreensize_.width) ||
(d.height != offscreensize_.height))
{
@@ -121,17 +121,17 @@ extends Canvas
offscreensize_ = new Dimension (d.width, d.height);
offgraphics_ = offscreen_.getGraphics ();
offgraphics_.setFont (getFont());
-
+
// g.setColor (Color.lightGray);
// g.draw3DRect (0, 0, d.width - 1, d.height - 1, true);
// g.draw3DRect (1, 1, d.width - 3, d.height - 3, true);
// g.draw3DRect (2, 2, d.width - 5, d.height - 5, true);
}
-
+
offgraphics_.setColor (getBackground());
offgraphics_.fillRect (0, 0, d.width, d.height);
offgraphics_.setColor (BLUE);
-
+
// Calculate from the dimensions, the largest square.
center = new Point (d.width / 2, d.height / 2);
rad = ((center.x < center.y) ? center.x : center.y);
@@ -151,7 +151,7 @@ extends Canvas
// Draw the resulting terrain
draw_horizon (rad, center, angles);
- // Draw the plotted Image.
+ // Draw the plotted Image.
g.drawImage (offscreen_, 0, 0, null);
}
@@ -162,7 +162,7 @@ extends Canvas
((angles[0] > angles[1]) ?
(360 - angles[0]) + angles[1] :
(angles[1] - angles[0]));
-
+
Polygon remainder = new Polygon ();
offgraphics_.setColor (GREEN);
@@ -181,9 +181,9 @@ extends Canvas
// System.out.println (points[0] + " " + points[1]);
// System.out.println (accepted_point);
-
+
remainder.addPoint (center.x + polar_to_rect_x (rad, cover_angle),
- center.y - polar_to_rect_y (rad, cover_angle));
+ center.y - polar_to_rect_y (rad, cover_angle));
remainder.addPoint (center.x + polar_to_rect_x (rad, angles[0]),
center.y - polar_to_rect_y (rad, angles[0]));
remainder.addPoint (center.x + polar_to_rect_x (rad, angles[1]),
@@ -191,9 +191,9 @@ extends Canvas
offgraphics_.fillPolygon (remainder);
//offgraphics_.setColor (getBackground ());
//offgraphics_.drawPolygon (remainder);
- }
+ }
}
-
+
private void pitch_horizon (int rad, int[] angles)
{
boolean upside_down = Math.abs (roll_) >= 90;
@@ -203,10 +203,10 @@ extends Canvas
angles[0] += angle_shift;
angles[1] -= angle_shift;
-
+
}
-
+
private void roll_horizon (int rad, int[] angles)
{
// Roll the left and right points of the terrain.
@@ -217,7 +217,7 @@ extends Canvas
angles[0] += 360;
if (angles[1] < 0)
- angles[1] += 360;
+ angles[1] += 360;
}
private int polar_to_rect_x (int rad, int angle)
@@ -239,7 +239,7 @@ extends Canvas
return ((double) (y2 - y1)) / ((double) (x2 - x1));
}
-
+
private Point[] line_circle_intesect (int rad, double y_intercept, double slope)
{
double r_2 = (double)(rad * rad),
@@ -257,7 +257,7 @@ extends Canvas
return points;
}
-
+
private int calculate_angle (int rad, int x, int y)
{
/*
@@ -293,7 +293,7 @@ extends Canvas
{
int[] roots = new int [2];
double body = Math.sqrt (b*b - 4.0*a*c);
-
+
roots[0] = (int) Math.round ((-b + body) / (2.0 * a));
roots[1] = (int) Math.round ((-b - body) / (2.0 * a));
@@ -312,17 +312,17 @@ extends Canvas
class Position extends Panel
{
private final static Font FONT = new Font ("Dialog", Font.BOLD, 12);
- private final static char DEGREE = '\u00B0';
-
+ private final static char DEGREE = '\u00B0';
+
private Label lat_ = new Label ("0" + DEGREE + " N", Label.RIGHT),
long_ = new Label ("0" + DEGREE + " S", Label.RIGHT),
alt_ = new Label ("0 Kft", Label.RIGHT),
heading_ = new Label ("0" + DEGREE + " ", Label.RIGHT);
-
+
public Position ()
{
Panel grid_panel = new Panel ();
-
+
lat_.setFont (FONT);
long_.setFont (FONT);
alt_.setFont (FONT);
@@ -332,7 +332,7 @@ class Position extends Panel
add (lat_);
add (long_);
add (heading_);
- add (alt_);
+ add (alt_);
}
public void update_display (int lat, int lon, int alt, int heading)
diff --git a/examples/Simulator/DOVEBrowser/ObservablesDialog.java b/examples/Simulator/DOVEBrowser/ObservablesDialog.java
index 2ea856c24e2..b00b798c497 100644
--- a/examples/Simulator/DOVEBrowser/ObservablesDialog.java
+++ b/examples/Simulator/DOVEBrowser/ObservablesDialog.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// ObservablesDialog.java
//
@@ -21,7 +21,7 @@ public class ObservablesDialog extends Dialog {
AnswerListener listener_;
ObservablesDialog (DemoCore parent,java.util.Enumeration enumeration) {
-
+
super ((Frame)parent, "Select Observables", true);
parent_ = parent;
this.setSize(400, 300);
@@ -32,7 +32,7 @@ public class ObservablesDialog extends Dialog {
list_.setSize (200,200);
for (; enumeration.hasMoreElements();) {
- list_.add ((String)enumeration.nextElement());
+ list_.add ((String)enumeration.nextElement());
}
@@ -46,17 +46,17 @@ public class ObservablesDialog extends Dialog {
constraints_.fill = GridBagConstraints.BOTH;
this.setLayout (gridbag_);
-
+
constraints_.weightx = 1.0;
constraints_.weighty = 1.0;
constraints_.gridwidth = GridBagConstraints.REMAINDER;
gridbag_.setConstraints (list_, constraints_);
this.add (list_);
-
+
constraints_.weightx = 1.0;
constraints_.weighty = 1.0;
constraints_.gridwidth = GridBagConstraints.RELATIVE;
- constraints_.fill = GridBagConstraints.NONE;
+ constraints_.fill = GridBagConstraints.NONE;
gridbag_.setConstraints (ok_button_, constraints_);
gridbag_.setConstraints (cancel_button_, constraints_);
this.add (ok_button_);
@@ -68,7 +68,7 @@ public class ObservablesDialog extends Dialog {
String selected_ = ObservablesDialog.this.list_.getSelectedItem ();
if (selected_ != null) {
System.out.println (">>>>> " + selected_);
- if (listener_ != null) {
+ if (listener_ != null) {
AnswerEvent ev = new AnswerEvent (ObservablesDialog.this, selected_);
listener_.ok (ev);
}
@@ -76,7 +76,7 @@ public class ObservablesDialog extends Dialog {
}
}
});
-
+
cancel_button_.addActionListener (new ActionListener () {
public void actionPerformed (ActionEvent e) {
ObservablesDialog.this.setVisible (false);
diff --git a/examples/Simulator/DOVEBrowser/PersianVisComp.java b/examples/Simulator/DOVEBrowser/PersianVisComp.java
index bf29e9aaf19..e0ab6661507 100644
--- a/examples/Simulator/DOVEBrowser/PersianVisComp.java
+++ b/examples/Simulator/DOVEBrowser/PersianVisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// PersianVisComp.java
//
@@ -113,7 +113,7 @@ public class PersianVisComp extends Canvas implements VisComp
return new Dimension (PIXELS_WIDE + 2 * DRAW_OFFSET,
PIXELS_WIDE + 2 * DRAW_OFFSET);
}
-
+
public String getName () {
return title_;
}
@@ -122,7 +122,7 @@ public class PersianVisComp extends Canvas implements VisComp
{
PersianRecursion.Data data_temp_;
try {
- data_temp_ = (PersianRecursion.Data) obj;
+ data_temp_ = (PersianRecursion.Data) obj;
}
catch (Exception excp) {
data_temp_ = null;
@@ -170,7 +170,7 @@ public class PersianVisComp extends Canvas implements VisComp
FontMetrics fm = g.getFontMetrics ();
int x1 = d.width - 8, y1, x2, y2, fheight = fm.getHeight (), i;
PersianRecursion.Data data_temp_;
-
+
if ((offscreen_ == null) ||
(offscreensize_.width != d.width - 8) ||
(offscreensize_.height != d.height - 8))
@@ -185,10 +185,10 @@ public class PersianVisComp extends Canvas implements VisComp
g.draw3DRect (0, 0, d.width - 1, d.height - 1, true);
g.draw3DRect (1, 1, d.width - 3, d.height - 3, true);
g.draw3DRect (2, 2, d.width - 5, d.height - 5, true);
-
+
offgraphics_.setColor (getBackground ());
offgraphics_.fillRect (0, 0, offscreensize_.width, offscreensize_.height);
- offgraphics_.setColor (getForeground ());
+ offgraphics_.setColor (getForeground ());
offgraphics_.drawString (title_, 5, fheight);
Image img = createImage (image_source_);
@@ -198,7 +198,7 @@ public class PersianVisComp extends Canvas implements VisComp
// System.out.println ("updated.");
}
-
+
public void paint (Graphics g)
{
update (g);
diff --git a/examples/Simulator/DOVEBrowser/Properties.java b/examples/Simulator/DOVEBrowser/Properties.java
index 7f537b85e06..d954339e58d 100644
--- a/examples/Simulator/DOVEBrowser/Properties.java
+++ b/examples/Simulator/DOVEBrowser/Properties.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// Properties.java
//
@@ -19,4 +19,4 @@ public class Properties {
public static final int PERSIAN = 3;
public static final int MULTIDOUBLE = 4;
}
-
+
diff --git a/examples/Simulator/DOVEBrowser/PushConsumer.java b/examples/Simulator/DOVEBrowser/PushConsumer.java
index a69f20038bb..6f2ccee6707 100644
--- a/examples/Simulator/DOVEBrowser/PushConsumer.java
+++ b/examples/Simulator/DOVEBrowser/PushConsumer.java
@@ -143,7 +143,7 @@ public class PushConsumer extends RtecEventComm.PushConsumerPOA
suppliers_ = consumer_admin_.obtain_push_supplier ();
org.omg.CORBA.Object objref = poa_.servant_to_reference (this);
- RtecEventComm.PushConsumer consumer_ref =
+ RtecEventComm.PushConsumer consumer_ref =
RtecEventComm.PushConsumerHelper.narrow (objref);
suppliers_.connect_push_consumer (consumer_ref, qos);
diff --git a/examples/Simulator/DOVEBrowser/PushConsumerFactory.java b/examples/Simulator/DOVEBrowser/PushConsumerFactory.java
index 5c1ce0d3894..34512f08b7a 100644
--- a/examples/Simulator/DOVEBrowser/PushConsumerFactory.java
+++ b/examples/Simulator/DOVEBrowser/PushConsumerFactory.java
@@ -1,7 +1,7 @@
// $Id$
//
// ============================================================================
-//
+//
// = FILENAME
// PushConsumerFactory.java
//
@@ -34,18 +34,18 @@ public class PushConsumerFactory {
private boolean use_queueing_ = false;
- public PushConsumerFactory (DataHandler dataHandler,
- String nameServiceIOR,
- String nameServicePort,
+ public PushConsumerFactory (DataHandler dataHandler,
+ String nameServiceIOR,
+ String nameServicePort,
String[] args,
boolean use_queueing,
java.applet.Applet applet)
{
- try
+ try
{
use_queueing_ = use_queueing;
dataHandler_ = dataHandler;
-
+
// if the DOVE Browser is running as an Applet
if (applet != null) {
orb_ = org.omg.CORBA.ORB.init (applet, null);
@@ -53,27 +53,27 @@ public class PushConsumerFactory {
else { // not running as an Applet, but as an normal Application
orb_ = org.omg.CORBA.ORB.init (args, null);
}
-
+
System.out.println ("Initialized ORB");
-
+
org.omg.CORBA.Object obj =
orb_.resolve_initial_references ("RootPOA");
System.out.println ("Obtained RootPOA");
poa_ = org.omg.PortableServer.POAHelper.narrow (obj);
-
+
System.out.println ("Narrowed RootPOA");
// Get the Naming Service initial reference
-
+
// Name Service Lookup cannot be used when running as an Applet
if (nameServiceIOR == null && applet != null) {
System.out.println (" Name Service Lookup cannot be used when running as an Applet! Quit!");
System.exit (1);
}
-
- if (nameServiceIOR == null) { // only used when running via "java" or "vbj"
+
+ if (nameServiceIOR == null) { // only used when running via "java" or "vbj"
System.out.println ("Using the lookup protocol!");
NS_Resolve ns_resolve_ = new NS_Resolve (nameServicePort);
naming_service_object_ = ns_resolve_.resolve_name_service (orb_);
@@ -85,11 +85,11 @@ public class PushConsumerFactory {
// Walk through args and count EC and Scheduling Service names.
int arg_index = 0;
- while (args.length > arg_index)
+ while (args.length > arg_index)
{
// Count an event service name
- if ((args[arg_index].equals ("-eventservicename")) &&
- (args.length > arg_index + 1))
+ if ((args[arg_index].equals ("-eventservicename")) &&
+ (args.length > arg_index + 1))
{
System.out.println ("switch [" + args[arg_index] + "]");
System.out.println ("value [" + args[arg_index + 1] + "]");
@@ -97,23 +97,23 @@ public class PushConsumerFactory {
++ec_names_count_;
}
// Count a scheduling service name
- else if ((args[arg_index].equals ("-scheduleservicename")) &&
- (args.length > arg_index + 1))
+ else if ((args[arg_index].equals ("-scheduleservicename")) &&
+ (args.length > arg_index + 1))
{
System.out.println ("switch [" + args[arg_index] + "]");
System.out.println ("value [" + args[arg_index + 1] + "]");
arg_index += 2;
++ss_names_count_;
}
- else if (args[arg_index].equals ("-dualECdemo"))
+ else if (args[arg_index].equals ("-dualECdemo"))
{
System.out.println ("switch [" + args[arg_index] + "]");
++arg_index;
ec_names_count_ += 2;
ss_names_count_ += 2;
}
- else if ((args[arg_index].equals ("-dualECdemo1")) ||
- (args[arg_index].equals ("-dualECdemo2")))
+ else if ((args[arg_index].equals ("-dualECdemo1")) ||
+ (args[arg_index].equals ("-dualECdemo2")))
{
System.out.println ("switch [" + args[arg_index] + "]");
++arg_index;
@@ -137,30 +137,30 @@ public class PushConsumerFactory {
ss_names_ = new String [ss_names_count_];
}
- // Then traverse the args again to allocate and fill in a list
+ // Then traverse the args again to allocate and fill in a list
// of EC and Scheduling Service names.
arg_index = 0;
- ec_names_count_ = 0;
- ss_names_count_ = 0;
- while (args.length > arg_index)
+ ec_names_count_ = 0;
+ ss_names_count_ = 0;
+ while (args.length > arg_index)
{
// Set an event service name.
- if ((args[arg_index].equals ("-eventservicename")) &&
- (args.length > arg_index + 1))
+ if ((args[arg_index].equals ("-eventservicename")) &&
+ (args.length > arg_index + 1))
{
ec_names_[ec_names_count_] = args[arg_index + 1];
- ++ec_names_count_;
+ ++ec_names_count_;
arg_index += 2;
}
// Set a schedule service name.
- else if ((args[arg_index].equals ("-scheduleservicename")) &&
- (args.length > arg_index + 1))
+ else if ((args[arg_index].equals ("-scheduleservicename")) &&
+ (args.length > arg_index + 1))
{
ss_names_[ss_names_count_] = args[arg_index + 1];
- ++ss_names_count_;
+ ++ss_names_count_;
arg_index += 2;
}
- else if (args[arg_index].equals ("-dualECdemo"))
+ else if (args[arg_index].equals ("-dualECdemo"))
{
ss_names_[ss_names_count_] = "DUAL_SCHED_HI";
ss_names_[ss_names_count_ + 1] = "DUAL_SCHED_LO";
@@ -170,7 +170,7 @@ public class PushConsumerFactory {
ec_names_count_ += 2;
ss_names_count_ += 2;
}
- else if (args[arg_index].equals ("-dualECdemo1"))
+ else if (args[arg_index].equals ("-dualECdemo1"))
{
ss_names_[ss_names_count_] = "DUAL_SCHED_HI";
ec_names_[ec_names_count_] = "DUAL_EC_HI";
@@ -178,7 +178,7 @@ public class PushConsumerFactory {
++ec_names_count_;
++ss_names_count_;
}
- else if (args[arg_index].equals ("-dualECdemo2"))
+ else if (args[arg_index].equals ("-dualECdemo2"))
{
ss_names_[ss_names_count_] = "DUAL_SCHED_LO";
ec_names_[ec_names_count_] = "DUAL_EC_LO";
@@ -207,7 +207,7 @@ public class PushConsumerFactory {
ss_names_ = new String [1];
ss_names_ [0] = "ScheduleService";
}
- }
+ }
catch (org.omg.CORBA.ORBPackage.InvalidName e)
{
System.err.println ("CosNaming.NamingContextPackage.InvalidName");
@@ -216,28 +216,28 @@ public class PushConsumerFactory {
catch(org.omg.CORBA.SystemException e) {
System.err.println ("PushConsumerFactory constructor: ORB and Name Service initialization");
System.err.println(e);
- }
-
+ }
+
}
-
- public class Object_is_null_exception extends Exception
+
+ public class Object_is_null_exception extends Exception
{
Object_is_null_exception (String s)
{
super (s);
}
}
-
+
public void run ()
{
try
{
-
+
// Get the Naming Context to allow resolving the EventService and
// ScheduleService
- CosNaming.NamingContext naming_context_ =
+ CosNaming.NamingContext naming_context_ =
CosNaming.NamingContextHelper.narrow (naming_service_object_);
-
+
if (naming_context_ == null)
{
System.err.println ("The Naming Context is null");
@@ -245,7 +245,7 @@ public class PushConsumerFactory {
}
System.out.println ("Reference to the Naming Service is ok.");
- // Create Consumers connected to the EventService
+ // Create Consumers connected to the EventService
int ss_number = 0;
RtecScheduler.Scheduler scheduler_ = null;
for (int ec_number = 0; ec_number < ec_names_count_; ++ec_number)
@@ -256,24 +256,24 @@ public class PushConsumerFactory {
{
CosNaming.NameComponent[] ss_name_components_ = new CosNaming.NameComponent[1];
ss_name_components_[0] = new CosNaming.NameComponent (ss_names_[ss_number],"");
- org.omg.CORBA.Object scheduler_object_ = naming_context_.resolve (ss_name_components_);
-
+ org.omg.CORBA.Object scheduler_object_ = naming_context_.resolve (ss_name_components_);
+
if (scheduler_object_ == null)
{
throw new Object_is_null_exception(ss_names_[ss_number] +
" Object is null");
}
-
+
scheduler_ = RtecScheduler.SchedulerHelper.narrow (scheduler_object_);
if (scheduler_ == null)
{
- throw new Object_is_null_exception(ss_names_[ss_number] +
+ throw new Object_is_null_exception(ss_names_[ss_number] +
" narrowed ref is null");
}
- System.out.println ("Reference to " +
- ss_names_[ss_number] + " is ok.");
+ System.out.println ("Reference to " +
+ ss_names_[ss_number] + " is ok.");
++ss_number;
}
@@ -286,44 +286,44 @@ public class PushConsumerFactory {
if (event_channel_object_ == null)
{
- throw new Object_is_null_exception(ec_names_[ec_number] +
+ throw new Object_is_null_exception(ec_names_[ec_number] +
" Object is null");
}
- RtecEventChannelAdmin.EventChannel event_channel_ =
+ RtecEventChannelAdmin.EventChannel event_channel_ =
RtecEventChannelAdmin.EventChannelHelper.narrow (event_channel_object_);
if (event_channel_ == null)
{
- throw new Object_is_null_exception(ec_names_[ec_number] +
+ throw new Object_is_null_exception(ec_names_[ec_number] +
" narrowed ref is null");
}
-
- System.out.println ("Reference to " +
- ec_names_[ec_number] + " is ok.");
-
+
+ System.out.println ("Reference to " +
+ ec_names_[ec_number] + " is ok.");
+
// Start the consumer
System.out.println ("Instantiating the Push Consumer for " +
ec_names_[ec_number] + ": demo_consumer_" +
ec_number + ".");
- PushConsumer pushConsumer_ = new PushConsumer (orb_, poa_,
+ PushConsumer pushConsumer_ = new PushConsumer (orb_, poa_,
dataHandler_,
use_queueing_);
System.out.println ("Initializing the Push Consumer for " +
ec_names_[ec_number] + ": demo_consumer_" +
ec_number + ".");
- pushConsumer_.open_consumer (event_channel_, scheduler_,
+ pushConsumer_.open_consumer (event_channel_, scheduler_,
"demo_consumer_" + ec_number);
}
-
+
// Tell the CORBA environment that we are ready
-
- System.out.println ("PushConsumer registered with POA");
+
+ System.out.println ("PushConsumer registered with POA");
poa_.the_POAManager ().activate ();
- System.out.println ("POA Activated");
+ System.out.println ("POA Activated");
}
catch (CosNaming.NamingContextPackage.CannotProceed e)
{
@@ -339,7 +339,7 @@ public class PushConsumerFactory {
{
System.err.println ("CosNaming.NamingContextPackage.NotFound");
System.err.println (e);
-
+
}
catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive e)
{
@@ -350,14 +350,14 @@ public class PushConsumerFactory {
{
System.err.println (e);
}
- catch(org.omg.CORBA.SystemException e)
+ catch(org.omg.CORBA.SystemException e)
{
System.err.println ("PushConsumerFactory.run: Failure");
System.err.println(e);
- }
+ }
}
-
+
} // public class PushConsumerFactory
diff --git a/examples/Simulator/DOVEBrowser/Queue.java b/examples/Simulator/DOVEBrowser/Queue.java
index 7ffaba15c52..59e552dbe46 100644
--- a/examples/Simulator/DOVEBrowser/Queue.java
+++ b/examples/Simulator/DOVEBrowser/Queue.java
@@ -8,11 +8,11 @@ public class Queue
// Friendly?
Queue_Node head_ = null;
Queue_Node tail_ = null;
-
+
private int length_ = 0;
-
+
public Queue()
- {
+ {
}
public Enumeration forward_iterator()
@@ -24,7 +24,7 @@ public class Queue
{
return new Queue_Iterator(this, Queue_Iterator.REVERSE);
}
-
+
public void enqueue_tail(Object new_data)
{
Queue_Node new_node = new Queue_Node(new_data);
@@ -47,7 +47,7 @@ public class Queue
public void enqueue_head(Object new_data)
{
Queue_Node new_node = new Queue_Node(new_data);
-
+
if (head_ == null)
{
tail_ = new_node;
@@ -62,11 +62,11 @@ public class Queue
length_++;
}
-
+
public Object dequeue_head()
{
Object return_value = null;
-
+
if (head_ == null)
return_value = null;
else if (tail_ == head_)
@@ -79,18 +79,18 @@ public class Queue
{
return_value = head_.data_;
head_ = head_.next_;
- head_.prev_ = null;
+ head_.prev_ = null;
}
length_--;
return return_value;
}
-
+
public Object dequeue_tail()
{
Object return_value = null;
-
+
if (tail_ == null)
return_value = null;
else if (tail_ == head_)
@@ -100,10 +100,10 @@ public class Queue
head_ = null;
}
else
- {
+ {
return_value = tail_.data_;
tail_ = tail_.prev_;
- tail_.next_ = null;
+ tail_.next_ = null;
}
length_--;
@@ -149,11 +149,11 @@ class Queue_Iterator implements Enumeration
{
public static final boolean FORWARD = true;
public static final boolean REVERSE = false;
-
+
private Queue queue_;
private Queue_Node queue_ptr_;
private boolean direction_ = FORWARD;
-
+
public Queue_Iterator(Queue queue)
{
queue_ = queue;
@@ -174,7 +174,7 @@ class Queue_Iterator implements Enumeration
public Object nextElement()
{
Object data = queue_ptr_.data_;
-
+
if (direction_)
queue_ptr_ = queue_ptr_.next_;
else
diff --git a/examples/Simulator/DOVEBrowser/VisComp.java b/examples/Simulator/DOVEBrowser/VisComp.java
index 53294f33ea2..c038286a40a 100644
--- a/examples/Simulator/DOVEBrowser/VisComp.java
+++ b/examples/Simulator/DOVEBrowser/VisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// VisComp.java
//
diff --git a/examples/Simulator/DOVEBrowser/VisCompFactory.java b/examples/Simulator/DOVEBrowser/VisCompFactory.java
index b35eccc67a7..c992582277f 100644
--- a/examples/Simulator/DOVEBrowser/VisCompFactory.java
+++ b/examples/Simulator/DOVEBrowser/VisCompFactory.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// VisCompFactory.java
//
@@ -12,12 +12,12 @@
// ============================================================================
import java.beans.*;
-
+
class VisCompFactory {
- VisComp getNewVisComp (int property, String name) {
-
- ClassLoader classLoader_ = this.getClass().getClassLoader();
+ VisComp getNewVisComp (int property, String name) {
+
+ ClassLoader classLoader_ = this.getClass().getClassLoader();
VisComp visComp_ = null;
String visCompName_ = "VisComp";
diff --git a/examples/Simulator/DOVEBrowser/WeaponsVisComp.java b/examples/Simulator/DOVEBrowser/WeaponsVisComp.java
index 8c81bfc9c11..ef343784cf1 100644
--- a/examples/Simulator/DOVEBrowser/WeaponsVisComp.java
+++ b/examples/Simulator/DOVEBrowser/WeaponsVisComp.java
@@ -1,5 +1,5 @@
// $Id$
-//
+//
// = FILENAME
// WeaponsVisComp.java
//
@@ -57,7 +57,7 @@ public class WeaponsVisComp extends Panel implements VisComp
public int getProperty () {
return Properties.WEAPONS;
}
-
+
public Dimension getPreferredSize () {
return new Dimension (250, 200);
}
@@ -65,18 +65,18 @@ public class WeaponsVisComp extends Panel implements VisComp
public Dimension getMinimumSize () {
return new Dimension (80, 80);
}
-
+
public void update (java.util.Observable observable, java.lang.Object obj) {
Weapons weapons_ = null;
try {
- weapons_ = (Weapons) obj;
+ weapons_ = (Weapons) obj;
}
catch (Exception excp) {
System.out.println (excp);
System.out.println ("Visualization Component received wrong data type!");
}
if (weapons_ != null)
- {
+ {
for (int i = 0; i < weapons_.number_of_weapons && i < 5; i++)
{
String weapon = "";
@@ -85,19 +85,19 @@ public class WeaponsVisComp extends Panel implements VisComp
{
default:
break;
- case 0: weapon = weapons_.weapon1_identifier;
+ case 0: weapon = weapons_.weapon1_identifier;
status = weapons_.weapon1_status;
break;
- case 1: weapon = weapons_.weapon2_identifier;
+ case 1: weapon = weapons_.weapon2_identifier;
status = weapons_.weapon2_status;
break;
- case 2: weapon = weapons_.weapon3_identifier;
+ case 2: weapon = weapons_.weapon3_identifier;
status = weapons_.weapon3_status;
break;
- case 3: weapon = weapons_.weapon4_identifier;
+ case 3: weapon = weapons_.weapon4_identifier;
status = weapons_.weapon4_status;
break;
- case 4: weapon = weapons_.weapon5_identifier;
+ case 4: weapon = weapons_.weapon5_identifier;
status = weapons_.weapon5_status;
break;
}
@@ -108,7 +108,7 @@ public class WeaponsVisComp extends Panel implements VisComp
if (status_label_ != null)
status_label_.setText ((status == 1) ? ONLINE : OFFLINE);
else
- {
+ {
if (count_ == 0)
this.removeAll ();
@@ -119,7 +119,7 @@ public class WeaponsVisComp extends Panel implements VisComp
status_label_.setFont (FONT_SMALL);
weapon_label_.setFont (FONT_SMALL);
weapon_label_.setForeground (BLUE);
-
+
gbc_.gridx = 0;
gbc_.anchor = GridBagConstraints.WEST;
gbl_.setConstraints (weapon_label_, gbc_);
@@ -128,7 +128,7 @@ public class WeaponsVisComp extends Panel implements VisComp
gbc_.anchor = GridBagConstraints.EAST;
gbl_.setConstraints (status_label_, gbc_);
add (status_label_);
-
+
gbc_.gridy++;
weapons_table_.put (weapon, status_label_);
}
diff --git a/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp b/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
index 654cee6b006..21322c09a05 100644
--- a/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
+++ b/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp
@@ -1,26 +1,22 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// DOVE_Supplier.cpp
-//
-// = DESCRIPTION
-// A wrapper around the event service initialization and
-// marshalling
-//
-// = AUTHOR
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file DOVE_Supplier.cpp
+ *
+ * $Id$
+ *
+ * A wrapper around the event service initialization and
+ * marshalling
+ *
+ *
+ * @author Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#include "DOVE_Supplier.h"
#include "tao/ORB_Core.h"
-ACE_RCSID (Event_Supplier,
- DOVE_Supplier,
- "$Id$")
-
// Static pointer member initialization for Singleton.
ACE_Scheduler_Factory::POD_RT_Info *
diff --git a/examples/Simulator/Event_Supplier/DOVE_Supplier.h b/examples/Simulator/Event_Supplier/DOVE_Supplier.h
index 4061b552e55..68730f98e1d 100644
--- a/examples/Simulator/Event_Supplier/DOVE_Supplier.h
+++ b/examples/Simulator/Event_Supplier/DOVE_Supplier.h
@@ -1,25 +1,24 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// DOVE_Supplier.h
-//
-// = DESCRIPTION
-// A wrapper around the event service initialization and marshalling.
-//
-// = AUTHORS
-// Michael Kircher (mk1@cs.wustl.edu)
-// Chris Gill (cdgill@cs.wustl.edu)
-// ============================================================================
-
-#include "ace/OS.h"
+
+//=============================================================================
+/**
+ * @file DOVE_Supplier.h
+ *
+ * $Id$
+ *
+ * A wrapper around the event service initialization and marshalling.
+ *
+ *
+ * @author Michael Kircher (mk1@cs.wustl.edu) Chris Gill (cdgill@cs.wustl.edu)
+ */
+//=============================================================================
+
+
+#include "orbsvcs/RtecEventChannelAdminC.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "orbsvcs/RtecEventChannelAdminC.h"
#include "orbsvcs/RtecEventCommS.h"
#include "orbsvcs/Event_Utilities.h"
#include "orbsvcs/Event_Service_Constants.h"
@@ -35,35 +34,35 @@ class DOVE_Supplier
{
public:
+ /// Constructor.
DOVE_Supplier ();
- // Constructor.
+ /// Destructor.
~DOVE_Supplier (void);
- // Destructor.
+ /// Initialize the ORB and the connection to the Name Service
int init (void);
- // Initialize the ORB and the connection to the Name Service
+ /// Connect to the event service.
int connect (const char * MIB_name = 0,
const char* es_name = 0,
const char * ss_name = 0,
ACE_Scheduler_Factory::POD_RT_Info * pod_rt_info = 0);
- // Connect to the event service.
+ /// Perform all post-connection-establishment processing.
void connected ();
- // Perform all post-connection-establishment processing.
+ /// Disconnect from the event service.
void disconnect ();
- // Disconnect from the event service.
+ /// Notify the consumer proxy that we have events
void notify (CORBA::Any& message);
- // Notify the consumer proxy that we have events
+ /// Use the next connection in the list of established connections.
void use_next_connection ();
- // Use the next connection in the list of established connections.
+ /// Use the previous connection in the list of established connections.
void use_prev_connection ();
- // Use the previous connection in the list of established connections.
private:
@@ -101,17 +100,17 @@ private:
ACE_Scheduler_Factory::POD_RT_Info pod_rt_info_;
};
+ /// Get the event channel reference.
int get_EventChannel ();
- // Get the event channel reference.
+ /// Get the scheduler reference.
int get_Scheduler ();
- // Get the scheduler reference.
+ /// Connect the the supplier with the event channel.
int connect_Supplier ();
- // Connect the the supplier with the event channel.
+ /// Access the default rt_info singleton.
static ACE_Scheduler_Factory::POD_RT_Info * pod_rt_info_instance ();
- // Access the default rt_info singleton.
static ACE_Scheduler_Factory::POD_RT_Info * pod_rt_info_instance_;
@@ -131,8 +130,8 @@ private:
Internal_DOVE_Supplier* internal_DOVE_Supplier_ptr_;
+ /// Keep the name of the MIB around.
const char * MIB_name_;
- // Keep the name of the MIB around.
};
#endif /* DOVE_SUPPLIER_H */
diff --git a/examples/Simulator/Event_Supplier/DualEC_Sup.cpp b/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
index f3c56dda24a..fcdf12bba92 100644
--- a/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
+++ b/examples/Simulator/Event_Supplier/DualEC_Sup.cpp
@@ -1,25 +1,18 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// DualEC_Sup.cpp
-//
-// = DESCRIPTION
-// Event Supplier for visualizing scheduling behavior, using arrival
-// and dispatch data logged by an event channel dispatch command object
-//
-// = AUTHOR
-// Chris Gill (cdgill@cs.wustl.edu)
-//
-// Adapted from the DOVE simulation event supplier
-// originally
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-// modified
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file DualEC_Sup.cpp
+ *
+ * $Id$
+ *
+ * Event Supplier for visualizing scheduling behavior, using arrival
+ * and dispatch data logged by an event channel dispatch command object
+ *
+ *
+ * @author Chris Gill (cdgill@cs.wustl.edu) Adapted from the DOVE simulation event supplier originally David Levine (levine@cs.wustl.edu) and Tim Harrison (harrison@cs.wustl.edu) modified Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#include "DualEC_Sup.h"
#include "NavWeapC.h"
@@ -37,10 +30,7 @@
#include "ace/Get_Opt.h"
#include "ace/Sched_Params.h"
#include "ace/OS_NS_errno.h"
-
-ACE_RCSID (Event_Supplier,
- DualEC_Sup,
- "$Id$")
+#include "ace/OS_NS_ctype.h"
//FUZZ: disable check_for_lack_ACE_OS
static const char usage [] =
diff --git a/examples/Simulator/Event_Supplier/DualEC_Sup.h b/examples/Simulator/Event_Supplier/DualEC_Sup.h
index 0762d2b31f6..0cba4a31d20 100644
--- a/examples/Simulator/Event_Supplier/DualEC_Sup.h
+++ b/examples/Simulator/Event_Supplier/DualEC_Sup.h
@@ -1,21 +1,18 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// DualEC_Sup.h
-//
-// = DESCRIPTION
-// Event supplier for visualization of scheduling behavior, using
-// arrival and dispatch data logged by an EC dispatch command object
-//
-// = AUTHOR
-// Chris Gill (cdgill@cs.wustl.edu)
-//
-// Adapted from the orginal DOVE simulation event supplier written by
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file DualEC_Sup.h
+ *
+ * $Id$
+ *
+ * Event supplier for visualization of scheduling behavior, using
+ * arrival and dispatch data logged by an EC dispatch command object
+ *
+ *
+ * @author Chris Gill (cdgill@cs.wustl.edu) Adapted from the orginal DOVE simulation event supplier written by Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef DUALEC_SUP_H
#define DUALEC_SUP_H
@@ -43,66 +40,71 @@ struct Schedule_Viewer_Data
};
+/**
+ * @class DualEC_Supplier
+ *
+ * @brief Event Supplier.
+ *
+ * Reads information out of a file and
+ * feeds it with additional navigation and
+ * weapon data into the dove_supplier, which
+ * is connected to the event channel
+ */
class DualEC_Supplier
{
- // = TITLE
- // Event Supplier.
- //
- // = DESCRIPTION
- // Reads information out of a file and
- // feeds it with additional navigation and
- // weapon data into the dove_supplier, which
- // is connected to the event channel
public:
DualEC_Supplier (int argc, ACE_TCHAR** argv);
~DualEC_Supplier (void);
+ /// Initialize: set up, resolve ORB services,
+ /// connect the DOVE_Suppliers.
int init (void);
- // Initialize: set up, resolve ORB services,
- // connect the DOVE_Suppliers.
+ /// Compute schedule priorities, possibly dump
+ /// data into runtime scheduler header files.
void compute_schedules (void);
- // Compute schedule priorities, possibly dump
- // data into runtime scheduler header files.
+ /// here is really something going on,
+ /// here we deliver the messages
void start_generating_events (void);
- // here is really something going on,
- // here we deliver the messages
+ /// Load the scheduling information into memory
void load_schedule_data ();
- // Load the scheduling information into memory
private:
+/**
+ * @class Terminator
+ *
+ * Private class that implements a termination servant.
+ */
class Terminator : public POA_NavWeapTerminator
- // = DESCRIPTION
- // Private class that implements a termination servant.
{
void shutdown (void);
};
+ /// Run the orb event loop.
static ACE_THR_FUNC_RETURN run_orb (void *);
- // Run the orb event loop.
+ /// Run navigation event generation thread.
static ACE_THR_FUNC_RETURN run_nav_thread (void *arg);
- // Run navigation event generation thread.
+ /// Run weapons event generation thread.
static ACE_THR_FUNC_RETURN run_weap_thread (void *arg);
- // Run weapons event generation thread.
+ /// Create two scheduling service instances, registers
+ /// them with the Naming Service.
int create_schedulers (void);
- // Create two scheduling service instances, registers
- // them with the Naming Service.
+ /// Create two event service instances, registers
+ /// them with the Naming Service.
int create_event_channels (void);
- // Create two event service instances, registers
- // them with the Naming Service.
+ /// Get command line options.
unsigned int get_options (int argc, ACE_TCHAR *argv []);
- // Get command line options.
// Time values to pause before notifying the supplier each time.
ACE_Time_Value nav_pause_;
diff --git a/examples/Simulator/Event_Supplier/Event_Con.cpp b/examples/Simulator/Event_Supplier/Event_Con.cpp
index 0af9a89d627..9bf83416e8d 100644
--- a/examples/Simulator/Event_Supplier/Event_Con.cpp
+++ b/examples/Simulator/Event_Supplier/Event_Con.cpp
@@ -1,26 +1,22 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// Event_Con.cpp
-//
-// = DESCRIPTION
-// This demo just tests the basic functionality of the Event Service
-// One Conumer which inherits from the Rtec Consumer. One Supplier
-// with an internal Rtec Consumer and one internal Rtec Supplier.
-// The internal Supplier is just a demo supplier because the
-// architecture expects an supplier which has inherited from the
-// Rtec Supplier.
-//
-// = AUTHOR
-// originally
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-// modified
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Event_Con.cpp
+ *
+ * $Id$
+ *
+ * This demo just tests the basic functionality of the Event Service
+ * One Conumer which inherits from the Rtec Consumer. One Supplier
+ * with an internal Rtec Consumer and one internal Rtec Supplier.
+ * The internal Supplier is just a demo supplier because the
+ * architecture expects an supplier which has inherited from the
+ * Rtec Supplier.
+ *
+ *
+ * @author originally David Levine (levine@cs.wustl.edu) and Tim Harrison (harrison@cs.wustl.edu) modified Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#include "Event_Con.h"
#include "NavWeapC.h"
@@ -38,8 +34,6 @@
#include "ace/os_include/os_limits.h"
-ACE_RCSID(Event_Supplier, Event_Con, "$Id$")
-
static const char usage [] =
"[-? |\n"
" [-c <consumers> [4]]\n"
diff --git a/examples/Simulator/Event_Supplier/Event_Con.h b/examples/Simulator/Event_Supplier/Event_Con.h
index 89c2b4cd905..b89a1962a67 100644
--- a/examples/Simulator/Event_Supplier/Event_Con.h
+++ b/examples/Simulator/Event_Supplier/Event_Con.h
@@ -1,18 +1,14 @@
-// $Id$
-// ============================================================================
-//
-// = FILENAME
-// Event_Con.h
-//
-// = AUTHOR
-// originally
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-// modified
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+//=============================================================================
+/**
+ * @file Event_Con.h
+ *
+ * $Id$
+ *
+ * @author originally David Levine (levine@cs.wustl.edu) and Tim Harrison (harrison@cs.wustl.edu) modified Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef EVENT_CON_H
#define EVENT_CON_H
@@ -27,37 +23,43 @@
#include "orbsvcs/RtecEventCommS.h"
#include "orbsvcs/RtecSchedulerC.h"
+/**
+ * @class Demo_Consumer
+ *
+ * @brief Demo Consumer
+ *
+ * Simple example of a consumer that registers for supplier
+ * notifications.
+ */
class Demo_Consumer : public POA_RtecEventComm::PushConsumer
{
- // = TITLE
- // Demo Consumer
- //
- // = DESCRIPTION
- // Simple example of a consumer that registers for supplier
- // notifications.
public:
Demo_Consumer (void);
+ /**
+ * Uses the name server to obtain a reference to the <supplier_name>
+ * and registers with channel to receive notifications from the
+ * supplier. Also registers to receive shutdown messages from the
+ * supplier. Stores <my_name> for printing out messages. Returns 0
+ * on success, -1 on failure.
+ */
int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec,
const char *my_name);
- // Uses the name server to obtain a reference to the <supplier_name>
- // and registers with channel to receive notifications from the
- // supplier. Also registers to receive shutdown messages from the
- // supplier. Stores <my_name> for printing out messages. Returns 0
- // on success, -1 on failure.
+ /// The channel is disconnecting.
virtual void disconnect_push_consumer (void);
- // The channel is disconnecting.
// = (not protected to allow short-circuiting) protected:
+ /**
+ * If the <events>[0] is a notification, prints out the data from
+ * the supplier. If its a shutdown message, the consumer
+ * disconnects from the channel.
+ */
virtual void push (const RtecEventComm::EventSet &events);
- // If the <events>[0] is a notification, prints out the data from
- // the supplier. If its a shutdown message, the consumer
- // disconnects from the channel.
protected:
+ /// Disconnect from the Event Service.
void shutdown (void);
- // Disconnect from the Event Service.
// = Event channel adminstration references.
RtecEventChannelAdmin::EventChannel_var channel_admin_;
diff --git a/examples/Simulator/Event_Supplier/Event_Sup.cpp b/examples/Simulator/Event_Supplier/Event_Sup.cpp
index 3a796535c97..6eb162dc74d 100644
--- a/examples/Simulator/Event_Supplier/Event_Sup.cpp
+++ b/examples/Simulator/Event_Supplier/Event_Sup.cpp
@@ -1,21 +1,17 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// Event_Sup.cpp
-//
-// = DESCRIPTION
-// Event Supplier for the flight simulator
-//
-// = AUTHOR
-// originally
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-// modified
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Event_Sup.cpp
+ *
+ * $Id$
+ *
+ * Event Supplier for the flight simulator
+ *
+ *
+ * @author originally David Levine (levine@cs.wustl.edu) and Tim Harrison (harrison@cs.wustl.edu) modified Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#include "Event_Sup.h"
#include "NavWeapC.h"
@@ -32,12 +28,7 @@
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
-
-#include "ace/os_include/os_ctype.h"
-
-ACE_RCSID (Event_Supplier,
- Event_Sup,
- "$Id$")
+#include "ace/OS_NS_ctype.h"
static const char usage [] =
"[[-?]\n"
diff --git a/examples/Simulator/Event_Supplier/Event_Sup.h b/examples/Simulator/Event_Supplier/Event_Sup.h
index 194bbbf4ab8..96a0e2a33ae 100644
--- a/examples/Simulator/Event_Supplier/Event_Sup.h
+++ b/examples/Simulator/Event_Supplier/Event_Sup.h
@@ -1,17 +1,17 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// Event_Sup.h
-//
-// = DESCRIPTION
-// Event Supplier for the simulation
-//
-// = AUTHOR
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Event_Sup.h
+ *
+ * $Id$
+ *
+ * Event Supplier for the simulation
+ *
+ *
+ * @author Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef EVENT_SUP_H
#define EVENT_SUP_H
@@ -32,37 +32,39 @@ struct Schedule_Viewer_Data
u_long computation_time;
};
+/**
+ * @class Event_Supplier
+ *
+ * @brief Event Supplier.
+ *
+ * Reads Scheduler information out of a file and
+ * feeds it with additional navigation and
+ * weapon data into the dove_supplier, which
+ * is connected to the event channel
+ */
class Event_Supplier
{
- // = TITLE
- // Event Supplier.
- //
- // = DESCRIPTION
- // Reads Scheduler information out of a file and
- // feeds it with additional navigation and
- // weapon data into the dove_supplier, which
- // is connected to the event channel
public:
Event_Supplier (int argc, ACE_TCHAR** argv);
~Event_Supplier (void);
+ /// connect the DOVE_Supplier
int init (void);
- // connect the DOVE_Supplier
+ /// here is really something going on,
+ /// here we deliver the messages
void start_generating_events (void);
- // here is really something going on,
- // here we deliver the messages
+ /// Load the scheduling information into memory
void load_schedule_data (ACE_Unbounded_Queue<Schedule_Viewer_Data *> &schedule_data);
- // Load the scheduling information into memory
private:
+ /// just a helper to put all the information into the CORBA::Any
void insert_event_data (CORBA::Any &data,
ACE_Unbounded_Queue_Iterator<Schedule_Viewer_Data *> &schedule_iter);
- // just a helper to put all the information into the CORBA::Any
unsigned int get_options (int argc, ACE_TCHAR *argv []);
diff --git a/examples/Simulator/Event_Supplier/Logging_Sup.cpp b/examples/Simulator/Event_Supplier/Logging_Sup.cpp
index 5b897b8638d..72901acca3e 100644
--- a/examples/Simulator/Event_Supplier/Logging_Sup.cpp
+++ b/examples/Simulator/Event_Supplier/Logging_Sup.cpp
@@ -1,25 +1,18 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// Logging_Sup.cpp
-//
-// = DESCRIPTION
-// Event Supplier for visualizing scheduling behavior, using arrival
-// and dispatch data logged by an event channel dispatch command object
-//
-// = AUTHOR
-// Chris Gill (cdgill@cs.wustl.edu)
-//
-// Adapted from the DOVE simulation event supplier
-// originally
-// David Levine (levine@cs.wustl.edu) and
-// Tim Harrison (harrison@cs.wustl.edu)
-// modified
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Logging_Sup.cpp
+ *
+ * $Id$
+ *
+ * Event Supplier for visualizing scheduling behavior, using arrival
+ * and dispatch data logged by an event channel dispatch command object
+ *
+ *
+ * @author Chris Gill (cdgill@cs.wustl.edu) Adapted from the DOVE simulation event supplier originally David Levine (levine@cs.wustl.edu) and Tim Harrison (harrison@cs.wustl.edu) modified Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#include "Logging_Sup.h"
#include "NavWeapC.h"
@@ -36,12 +29,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_string.h"
-
-#include "ace/os_include/os_ctype.h"
-
-ACE_RCSID (Event_Supplier,
- Logging_Sup,
- "$Id$")
+#include "ace/OS_NS_ctype.h"
#if defined (ACE_OPENVMS)
// need this to circumvent link error on OpenVMS
diff --git a/examples/Simulator/Event_Supplier/Logging_Sup.h b/examples/Simulator/Event_Supplier/Logging_Sup.h
index 208be88cde7..0443c94324b 100644
--- a/examples/Simulator/Event_Supplier/Logging_Sup.h
+++ b/examples/Simulator/Event_Supplier/Logging_Sup.h
@@ -1,21 +1,18 @@
-// $Id$
-
-// ============================================================================
-//
-// = FILENAME
-// Logging_Sup.h
-//
-// = DESCRIPTION
-// Event supplier for visualization of scheduling behavior, using
-// arrival and dispatch data logged by an EC dispatch command object
-//
-// = AUTHOR
-// Chris Gill (cdgill@cs.wustl.edu)
-//
-// Adapted from the orginal DOVE simulation event supplier written by
-// Michael Kircher (mk1@cs.wustl.edu)
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Logging_Sup.h
+ *
+ * $Id$
+ *
+ * Event supplier for visualization of scheduling behavior, using
+ * arrival and dispatch data logged by an EC dispatch command object
+ *
+ *
+ * @author Chris Gill (cdgill@cs.wustl.edu) Adapted from the orginal DOVE simulation event supplier written by Michael Kircher (mk1@cs.wustl.edu)
+ */
+//=============================================================================
+
#ifndef LOGGING_SUP_H
#define LOGGING_SUP_H
@@ -36,37 +33,39 @@ struct Schedule_Viewer_Data
u_long computation_time;
};
+/**
+ * @class Logging_Supplier
+ *
+ * @brief Event Supplier.
+ *
+ * Reads Scheduler information out of a file and
+ * feeds it with additional navigation and
+ * weapon data into the dove_supplier, which
+ * is connected to the event channel
+ */
class Logging_Supplier
{
- // = TITLE
- // Event Supplier.
- //
- // = DESCRIPTION
- // Reads Scheduler information out of a file and
- // feeds it with additional navigation and
- // weapon data into the dove_supplier, which
- // is connected to the event channel
public:
Logging_Supplier (int argc, ACE_TCHAR** argv);
~Logging_Supplier (void);
+ /// connect the DOVE_Supplier
int init (void);
- // connect the DOVE_Supplier
+ /// here is really something going on,
+ /// here we deliver the messages
void start_generating_events (void);
- // here is really something going on,
- // here we deliver the messages
+ /// Load the scheduling information into memory
void load_schedule_data (ACE_Unbounded_Queue<Schedule_Viewer_Data *> &schedule_data);
- // Load the scheduling information into memory
private:
+ /// just a helper to put all the information into the CORBA::Any
void insert_event_data (CORBA::Any &data,
ACE_Unbounded_Queue_Iterator<Schedule_Viewer_Data *> &schedule_iter);
- // just a helper to put all the information into the CORBA::Any
unsigned int get_options (int argc, ACE_TCHAR *argv []);
diff --git a/examples/Simulator/Event_Supplier/Makefile.am b/examples/Simulator/Event_Supplier/Makefile.am
deleted file mode 100644
index 2341a58e12d..00000000000
--- a/examples/Simulator/Event_Supplier/Makefile.am
+++ /dev/null
@@ -1,225 +0,0 @@
-## Process this file with automake to create Makefile.in
-##
-## $Id$
-##
-## This file was generated by MPC. Any changes made directly to
-## this file will be lost the next time it is generated.
-##
-## MPC Command:
-## ../bin/mwc.pl -type automake -noreldefs TAO.mwc
-
-ACE_BUILDDIR = $(top_builddir)/..
-ACE_ROOT = $(top_srcdir)/..
-TAO_BUILDDIR = $(top_builddir)
-TAO_IDL = ACE_ROOT=$(ACE_ROOT) TAO_ROOT=$(TAO_ROOT) $(TAO_BUILDDIR)/TAO_IDL/tao_idl
-TAO_IDL_DEP = $(TAO_BUILDDIR)/TAO_IDL/tao_idl
-TAO_IDLFLAGS = -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) -I$(srcdir) -g $(ACE_BUILDDIR)/apps/gperf/src/ace_gperf
-TAO_ROOT = $(top_srcdir)
-
-noinst_PROGRAMS =
-
-## Makefile.Event_Supplier_IDL.am
-
-if BUILD_EXCEPTIONS
-
-BUILT_SOURCES = \
- ./NavWeapC.cpp \
- ./NavWeapC.h \
- ./NavWeapC.inl \
- ./NavWeapS.cpp \
- ./NavWeapS.h \
- ./NavWeapS.inl
-
-CLEANFILES = \
- ./NavWeap-stamp \
- ./NavWeapC.cpp \
- ./NavWeapC.h \
- ./NavWeapC.inl \
- ./NavWeapS.cpp \
- ./NavWeapS.h \
- ./NavWeapS.inl
-
-./NavWeapC.cpp ./NavWeapC.h ./NavWeapC.inl ./NavWeapS.cpp ./NavWeapS.h ./NavWeapS.inl: ./NavWeap-stamp
-
-./NavWeap-stamp: $(srcdir)/../NavWeap.idl $(TAO_IDL_DEP)
- mkdir -p .
- $(TAO_IDL) $(TAO_IDLFLAGS) $(srcdir)/../NavWeap.idl
- @touch $@
-
-noinst_HEADERS = \
- ../NavWeap.idl
-
-endif BUILD_EXCEPTIONS
-
-## Makefile.Event_Supplier_DualEC_Sup.am
-
-if BUILD_CORBA_MESSAGING
-if BUILD_EXCEPTIONS
-if !BUILD_ACE_FOR_TAO
-
-noinst_PROGRAMS += DualEC_Sup
-
-DualEC_Sup_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR) \
- -I$(TAO_ROOT)/orbsvcs \
- -I$(TAO_BUILDDIR)/orbsvcs
-
-DualEC_Sup_SOURCES = \
- DOVE_Supplier.cpp \
- DualEC_Sup.cpp \
- NavWeapC.cpp \
- NavWeapS.cpp \
- DOVE_Supplier.h \
- DualEC_Sup.h
-
-DualEC_Sup_LDADD = \
- $(TAO_BUILDDIR)/tao/libTAO_Utils.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTSched.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Serv.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
- $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
- $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif !BUILD_ACE_FOR_TAO
-endif BUILD_EXCEPTIONS
-endif BUILD_CORBA_MESSAGING
-
-## Makefile.Event_Supplier_Event_Con.am
-
-if BUILD_CORBA_MESSAGING
-if BUILD_EXCEPTIONS
-
-noinst_PROGRAMS += Event_Con
-
-Event_Con_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR) \
- -I$(TAO_ROOT)/orbsvcs \
- -I$(TAO_BUILDDIR)/orbsvcs
-
-Event_Con_SOURCES = \
- Event_Con.cpp \
- NavWeapC.cpp \
- Event_Con.h
-
-Event_Con_LDADD = \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTSched.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
- $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
- $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif BUILD_EXCEPTIONS
-endif BUILD_CORBA_MESSAGING
-
-## Makefile.Event_Supplier_Event_Sup.am
-
-if BUILD_CORBA_MESSAGING
-if BUILD_EXCEPTIONS
-
-noinst_PROGRAMS += Event_Sup
-
-Event_Sup_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR) \
- -I$(TAO_ROOT)/orbsvcs \
- -I$(TAO_BUILDDIR)/orbsvcs
-
-Event_Sup_SOURCES = \
- DOVE_Supplier.cpp \
- Event_Sup.cpp \
- NavWeapC.cpp \
- DOVE_Supplier.h \
- Event_Sup.h
-
-Event_Sup_LDADD = \
- $(TAO_BUILDDIR)/tao/libTAO_Utils.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTSched.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
- $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
- $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif BUILD_EXCEPTIONS
-endif BUILD_CORBA_MESSAGING
-
-## Makefile.Event_Supplier_Logging_Sup.am
-
-if BUILD_CORBA_MESSAGING
-if BUILD_EXCEPTIONS
-
-noinst_PROGRAMS += Logging_Sup
-
-Logging_Sup_CPPFLAGS = \
- -I$(ACE_ROOT) \
- -I$(ACE_BUILDDIR) \
- -I$(TAO_ROOT) \
- -I$(TAO_BUILDDIR) \
- -I$(TAO_ROOT)/orbsvcs \
- -I$(TAO_BUILDDIR)/orbsvcs
-
-Logging_Sup_SOURCES = \
- DOVE_Supplier.cpp \
- Logging_Sup.cpp \
- NavWeapC.cpp \
- DOVE_Supplier.h \
- Logging_Sup.h
-
-Logging_Sup_LDADD = \
- $(TAO_BUILDDIR)/tao/libTAO_Utils.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTSched.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent_Skel.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTEvent.la \
- $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
- $(TAO_BUILDDIR)/tao/libTAO_Messaging.la \
- $(TAO_BUILDDIR)/tao/libTAO_PI.la \
- $(TAO_BUILDDIR)/tao/libTAO_CodecFactory.la \
- $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
- $(TAO_BUILDDIR)/tao/libTAO_Valuetype.la \
- $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
- $(TAO_BUILDDIR)/tao/libTAO.la \
- $(ACE_BUILDDIR)/ace/libACE.la
-
-endif BUILD_EXCEPTIONS
-endif BUILD_CORBA_MESSAGING
-
-## Clean up template repositories, etc.
-clean-local:
- -rm -f *~ *.bak *.rpo *.sym lib*.*_pure_* core core.*
- -rm -f gcctemp.c gcctemp so_locations *.ics
- -rm -rf cxx_repository ptrepository ti_files
- -rm -rf templateregistry ir.out
- -rm -rf ptrepository SunWS_cache Templates.DB
diff --git a/examples/Simulator/Makefile.am b/examples/Simulator/Makefile.am
deleted file mode 100644
index d6c8532d025..00000000000
--- a/examples/Simulator/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-## Process this file with automake to create Makefile.in
-##
-## $Id$
-##
-## This file was generated by MPC. Any changes made directly to
-## this file will be lost the next time it is generated.
-##
-## MPC Command:
-## ../bin/mwc.pl -type automake -noreldefs TAO.mwc
-
-SUBDIRS = \
- Event_Supplier
-
diff --git a/examples/Simulator/Persian.idl b/examples/Simulator/Persian.idl
index 014dcbb9d4b..cca3dfb14d8 100644
--- a/examples/Simulator/Persian.idl
+++ b/examples/Simulator/Persian.idl
@@ -2,7 +2,7 @@
// ===========================================================================
//
-// = FILE
+// = FILE
// Persian.idl
//
// = DESCRIPTION
@@ -56,7 +56,7 @@ module PersianRecursion
// = DESCRIPTION
// This interface specifies a single operation, used
// to shut down the orb. This allows the orb to
- // be shut down cleanly, from within a synchronously
+ // be shut down cleanly, from within a synchronously
// servant dispatched servant, but with the request
// originating from another thread.
{