summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-19 17:12:36 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-19 17:12:36 +0000
commitb99f38cd88406202713136c939ffbf25178032f2 (patch)
tree93369700f7eaac01cda5fbef21a00b1a5be68680
parent8a798803c6306ce64fee0cbfccf5d9cbd8249841 (diff)
downloadATCD-b99f38cd88406202713136c939ffbf25178032f2.tar.gz
Thu Feb 19 10:15:00 1998 Michael Kircher <mk1@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-98c3
-rw-r--r--TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp23
2 files changed, 21 insertions, 5 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index afcb9587ca0..90f52e7e0b4 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,4 +1,7 @@
Thu Feb 19 10:15:00 1998 Michael Kircher <mk1@cs.wustl.edu>
+ * orbsvcs/test/Simulator: Set the file permissions right.
+
+Thu Feb 19 10:15:00 1998 Michael Kircher <mk1@cs.wustl.edu>
* orbsvcs/test/Simulator:
Intruduced new demo, using the Event Service as transport
media for monitoring events.
diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
index bf34ee23d89..d6ab242e2a5 100644
--- a/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
+++ b/TAO/examples/Simulator/Event_Supplier/Event_Sup.cpp
@@ -37,11 +37,11 @@
#include "NavWeapC.h"
#define SOURCE_ID 1001
-#define TOTAL_MESSAGES 150
+static const char usage [] = "[-? |\n"
+" [-m <count> of messages to send [100]]]";
-static const char usage [] = "[-? |\n";
-
+unsigned int total_messages = 100;
@@ -240,7 +240,7 @@ Demo_Supplier::start_generating_events (void)
ACE_OS::sleep (pause);
- } while (++total_sent_ < TOTAL_MESSAGES);
+ } while (++total_sent_ < total_messages);
// Sending a shutdown event -- not wanted right now
@@ -365,7 +365,7 @@ get_options (int argc, char *argv [])
{
// We need the 'O' in get_opt() because we also want to have ORB parameters, they
// all start with 'O'
- ACE_Get_Opt get_opt (argc, argv, "O?");
+ ACE_Get_Opt get_opt (argc, argv, "O?m:");
int opt;
int temp;
@@ -378,6 +378,18 @@ get_options (int argc, char *argv [])
argv[0], usage));
ACE_OS::exit (0);
break;
+ case 'm':
+ if ((temp = ACE_OS::atoi (get_opt.optarg)) > 0)
+ {
+ total_messages = (u_int) temp;
+ }
+ else
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: count must be > 0",
+ argv[0]), 1);
+ }
+ break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
"%s: unknown arg, -%c\n"
@@ -399,6 +411,7 @@ get_options (int argc, char *argv [])
}
+
// function main
int