summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-16 19:35:15 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-16 19:35:15 +0000
commit108b4fefc663bb8a43dda8a468027ed7a21a0cd4 (patch)
treebb48b6051f8e93c6bd58d3cc67dc3155eed42507 /TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
parentd4224d56fd4ab2bb330db4680e3d5699c32bd546 (diff)
downloadATCD-108b4fefc663bb8a43dda8a468027ed7a21a0cd4.tar.gz
added usability features to scheduling service
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
index e72cdf2e12e..0ff75757c00 100644
--- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp
@@ -9,8 +9,10 @@
#include "orbsvcs/Scheduler_Factory.i"
#endif /* __ACE_INLINE__ */
+// initialize static class members
RtecScheduler::Scheduler_ptr ACE_Scheduler_Factory::server_ = 0;
-
+ACE_Scheduler_Factory::Factory_Status ACE_Scheduler_Factory::status_ =
+ ACE_Scheduler_Factory::UNINITIALIZED;
static int entry_count = -1;
static ACE_Scheduler_Factory::POD_RT_Info* rt_info = 0;
@@ -26,6 +28,7 @@ int ACE_Scheduler_Factory::use_runtime (int ec,
entry_count = ec;
rt_info = rti;
+ status_ = ACE_Scheduler_Factory::RUNTIME;
return 0;
}
@@ -93,6 +96,8 @@ ACE_Scheduler_Factory::use_config (CosNaming::NamingContext_ptr naming,
" exception while resolving server\n"), -1);
}
TAO_ENDTRY;
+
+ status_ = ACE_Scheduler_Factory::CONFIG;
return 0;
}
@@ -138,8 +143,18 @@ static char end_infos[] =
int ACE_Scheduler_Factory::dump_schedule
(const RtecScheduler::RT_Info_Set& infos,
- const char* filename)
+ const char* filename, const char* format_string)
{
+ if (format_string == 0)
+ {
+ format_string = "{ \"%20s\", %10d, {%10d, %10d}, {%10d, %10d}, "
+ "{%10d, %10d}, %10d, "
+ "(RtecScheduler::Criticality) %d, "
+ "(RtecScheduler::Importance) %d, "
+ "{%10d, %10d}, %10d, %10d, %10d, %10d, "
+ "(RtecScheduler::Info_Type) %d }";
+ }
+
FILE* file = stdout;
if (filename != 0)
{
@@ -163,9 +178,8 @@ int ACE_Scheduler_Factory::dump_schedule
// @@ TODO Eventually the TimeT structure will be a 64-bit
// unsigned int, we will have to change this dump method then.
ACE_OS::fprintf (file,
- "{ \"%s\", %d, {%d, %d}, {%d, %d}, {%d, %d}, %d,\n"
- " %d, %d, {%d, %d}, %d, %d, %d, %d, %d }",
- (const char*)info.entry_point,
+ format_string,
+ (const char*) info.entry_point,
info.handle,
info.worst_case_execution_time.low,
info.worst_case_execution_time.high,
@@ -208,4 +222,3 @@ int ACE_Scheduler_Factory::dump_schedule
-