summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Dump_Schedule
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Dump_Schedule')
-rw-r--r--TAO/orbsvcs/Dump_Schedule/.cvsignore1
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp78
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Dump_Schedule.mpc6
-rw-r--r--TAO/orbsvcs/Dump_Schedule/Makefile.am47
4 files changed, 132 insertions, 0 deletions
diff --git a/TAO/orbsvcs/Dump_Schedule/.cvsignore b/TAO/orbsvcs/Dump_Schedule/.cvsignore
new file mode 100644
index 00000000000..fb2c130a840
--- /dev/null
+++ b/TAO/orbsvcs/Dump_Schedule/.cvsignore
@@ -0,0 +1 @@
+Dump_Schedule
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp
new file mode 100644
index 00000000000..ec523388f64
--- /dev/null
+++ b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp
@@ -0,0 +1,78 @@
+
+// $Id$
+
+#include "ace/Sched_Params.h"
+#include "ace/Get_Opt.h"
+#include "ace/Argv_Type_Converter.h"
+#include "ace/OS_main.h"
+
+#include "orbsvcs/CosNamingC.h"
+#include "orbsvcs/Scheduler_Factory.h"
+
+ACE_RCSID (Dump_Schedule,
+ Dump_Schedule,
+ "$Id$")
+
+// This program dumps the results of one scheduling in a C++ file.
+
+int
+ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Copy command line parameter.
+ ACE_Argv_Type_Converter command_line(argc, argv);
+
+ // Initialize ORB.
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (command_line.get_argc(), command_line.get_ASCII_argv(), "internet" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Object_var naming_obj =
+ orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil(naming_obj.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to find the Naming Service\n"),
+ 1);
+
+ CosNaming::NamingContext_var naming_context =
+ CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ const char *name = "ScheduleService";
+ if (command_line.get_argc() > 1)
+ {
+ name = command_line.get_ASCII_argv()[1];
+ }
+ ACE_Scheduler_Factory::use_config (naming_context.in (), name);
+
+ RtecScheduler::RT_Info_Set_var infos;
+ RtecScheduler::Dependency_Set_var deps;
+ RtecScheduler::Config_Info_Set_var configs;
+ RtecScheduler::Scheduling_Anomaly_Set_var anomalies;
+
+ ACE_Scheduler_Factory::server ()->compute_scheduling
+ (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO,
+ ACE_SCOPE_THREAD),
+ ACE_Sched_Params::priority_max (ACE_SCHED_FIFO,
+ ACE_SCOPE_THREAD),
+ infos.out (), deps.out (), configs.out (), anomalies.out ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_Scheduler_Factory::dump_schedule (infos.in (),
+ deps.in (),
+ configs.in (),
+ anomalies.in (),
+ "Scheduler_Runtime.cpp");
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Dump_Schedule");
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.mpc b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.mpc
new file mode 100644
index 00000000000..2468639a7a3
--- /dev/null
+++ b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.mpc
@@ -0,0 +1,6 @@
+// -*- MPC -*-
+// $Id$
+
+project : orbsvcsexe, core, rtsched, naming, svc_utils, iortable, portableserver {
+ exename = Dump_Schedule
+}
diff --git a/TAO/orbsvcs/Dump_Schedule/Makefile.am b/TAO/orbsvcs/Dump_Schedule/Makefile.am
new file mode 100644
index 00000000000..c286f12f251
--- /dev/null
+++ b/TAO/orbsvcs/Dump_Schedule/Makefile.am
@@ -0,0 +1,47 @@
+## 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_ROOT = $(top_srcdir)
+
+## Makefile.Dump_Schedule.am
+
+bin_PROGRAMS = Dump_Schedule
+
+Dump_Schedule_CPPFLAGS = \
+ -I$(ACE_ROOT) \
+ -I$(ACE_BUILDDIR) \
+ -I$(TAO_ROOT) \
+ -I$(TAO_BUILDDIR) \
+ -I$(TAO_ROOT)/orbsvcs \
+ -I$(TAO_BUILDDIR)/orbsvcs
+
+Dump_Schedule_SOURCES = \
+ Dump_Schedule.cpp
+
+Dump_Schedule_LDADD = \
+ $(TAO_BUILDDIR)/tao/libTAO_IORTable.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_RTSched.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_Svc_Utils.la \
+ $(TAO_BUILDDIR)/tao/libTAO_PortableServer.la \
+ $(TAO_BUILDDIR)/orbsvcs/orbsvcs/libTAO_CosNaming.la \
+ $(TAO_BUILDDIR)/tao/libTAO_AnyTypeCode.la \
+ $(TAO_BUILDDIR)/tao/libTAO.la \
+ $(ACE_BUILDDIR)/ace/libACE.la
+
+## 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