From e7d06756045ba737cef79217aa8ef19f7ad7b307 Mon Sep 17 00:00:00 2001 From: nshankar Date: Thu, 8 Mar 2007 23:19:18 +0000 Subject: Thu Mar 8 23:17:24 UTC 2007 Nishanth Shankaran --- ChangeLog | 12 +++++ common/Goal.idl | 61 +++++++++++++++++++++ common/OpString.idl | 143 +++++++++---------------------------------------- common/QoS.idl | 48 +++++++++++++++++ common/RACE_common.mpc | 54 ++++++++++++------- common/Time.idl | 32 +++++++++++ 6 files changed, 214 insertions(+), 136 deletions(-) create mode 100644 common/Goal.idl create mode 100644 common/QoS.idl create mode 100644 common/Time.idl diff --git a/ChangeLog b/ChangeLog index a7e6c77c306..4cf931e2b3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Thu Mar 8 23:17:24 UTC 2007 Nishanth Shankaran + + * common/Goal.idl: + * common/OpString.idl: + * common/QoS.idl: + * common/Time.idl: + + Refined the operational string structure and re-structured the IDL files. + + * common/RACE_common.mpc: Commented out building of RACE_common + project due to compilation errors. Need to fix later on. + Wed Mar 7 16:27:59 UTC 2007 Nishanth Shankaran * Controller/common/Subtask.h: Added the time_val structure. diff --git a/common/Goal.idl b/common/Goal.idl new file mode 100644 index 00000000000..428a181f6ea --- /dev/null +++ b/common/Goal.idl @@ -0,0 +1,61 @@ +#ifndef GOAL_IDL +#define GOAL_IDL + +#include "QoS.idl" +#include "Time.idl" + +module CIAO +{ + module RACE + { + struct GoalCondition + { + // ID of condition (in Task Network). + long condID; + + // Utility value (specifying importance of this goal condition). + long utility; + }; + + typedef sequence GoalConditions; + + struct TimeConstraint + { + // ID of condition (in Task Network). + long condID; + + // Start-by (end-by) time for this data (non-data) condition. + TimeValue constraint; + }; + + typedef sequence TimeConstraints; + + struct GoalStructure + { + // Universally unique ID of goal. + string UUID; + + // Human-readable name (for debugging, not identification). + string name; + + // Goal conditions with utility values. + GoalConditions goalConds; + + // Start-by and end-by constraints on conditions, in relative time + // (relative to start of opstring to achieve this goal). + TimeConstraints relTimes; + + // Start-by and end-by constraints on conditions, in clock time. + TimeConstraints absTimes; + + // QoS requirements. + QoSSpecifications QoSRequirements; + + // Expected time range for start of opstring (for achieving this goal) + // execution. + TimeWindow startWindow; + }; + }; +}; + +#endif /* GOAL_IDL */ diff --git a/common/OpString.idl b/common/OpString.idl index c50ad20bc22..d2260ce5150 100644 --- a/common/OpString.idl +++ b/common/OpString.idl @@ -1,38 +1,21 @@ #ifndef OPERATIONAL_STRING_IDL #define OPERATIONAL_STRING_IDL -#include "ciao/Deployment_Data.idl" +#include "DAnCE/Deployment/Deployment_DeploymentPlan.idl" +#include "QoS.idl" +#include "Time.idl" +#include "Goal.idl" + module CIAO { module RACE { - const long UNDEFINED_TIME_ENTRY = -1; - - struct TimeValue - { - // Seconds since Jan. 1, 1970 - long sec; - //and microseconds - long usec; - }; - - // A time window is a range between an earliest and latest time value. - struct TimeWindow - { - // Beginning of time window. - CIAO::RACE::TimeValue earliest; - - // End of time window. - CIAO::RACE::TimeValue latest; - }; - // A task instance in an opstring. struct InstanceDescription { - // Universally unique ID of opstring. - // (Should correspond to goal UUID). + // Universally unique ID of the instance. string UUID; // Human-readable name (for debugging, not identification). @@ -41,6 +24,12 @@ module CIAO // Node to which instance is deployed. string node; + + // Reference to the concrete implementation used by this instance - + // index into the Deployment::MonolithicDeploymentDescriptions of + // the operational string that implements this instance. + unsigned long implementationRef; + // ID of task performed by instance (in Task Network). string taskId; @@ -103,94 +92,7 @@ module CIAO typedef sequence OrderLinkDescriptions; - - // Kind of comparison for a QoS specification. - enum QoSComparator - { - LESS_THAN, - GREATER_THAN, - EQUAL, - LESS_THAN_EQUAL, - GREATER_THAN_EQUAL, - NOT_EQUAL - }; - - // Type of QoS specification. - enum QoSType - { - DEADLINE, - OTHERS - }; - - - struct QoSSpecification - { - // Human-readable name (for debugging, not identification). - string name; - - // Type of QoS. - QoSType type; - - // Specific type ID of component that monitors this QoS. - string MonitorID; - - // Comparison used for this QoS specification. - QoSComparator comparator; - - // Value to compare actual QoS to (using comparator). - any value; - }; - - typedef sequence QoSSpecifications; - - struct GoalCondition - { - // ID of condition (in Task Network). - long condID; - - // Utility value (specifying importance of this goal condition). - long utility; - }; - - typedef sequence GoalConditions; - - struct TimeConstraint - { - // ID of condition (in Task Network). - long condID; - - // Start-by (end-by) time for this data (non-data) condition. - TimeValue constraint; - }; - - typedef sequence TimeConstraints; - - struct GoalStructure - { - // Universally unique ID of goal. - string UUID; - - // Human-readable name (for debugging, not identification). - string name; - - // Goal conditions with utility values. - GoalConditions goalConds; - - // Start-by and end-by constraints on conditions, in relative time - // (relative to start of opstring to achieve this goal). - TimeConstraints relTimes; - - // Start-by and end-by constraints on conditions, in clock time. - TimeConstraints absTimes; - - // QoS requirements. - QoSSpecifications QoSRequirements; - - // Expected time range for start of opstring (for achieving this goal) - // execution. - TimeWindow startWindow; - }; - + // Operational String. struct OperationalString { // Universally unique ID of opstring. @@ -198,26 +100,26 @@ module CIAO string UUID; // Human-readable name (for debugging, not identification). - string name; + string label; // Goal achieved by this opstring. GoalStructure goal; // Task instances in opstring. - InstanceDescriptions instances; + InstanceDescriptions instance; // Data links (between task instances) in opstring. - DataLinkDescriptions dataLinks; + DataLinkDescriptions dataLink; // Ordering links (between task instances) in opstring. - OrderLinkDescriptions orderLinks; + OrderLinkDescriptions orderLink; // Priority of this opstring. // (Should be derived from expected utility of goal). long priority; // QoS requirements. - QoSSpecifications QoSRequirements; + QoSSpecifications QoSRequirement; // Expected time range for start of opstring execution. TimeWindow startWindow; @@ -226,7 +128,14 @@ module CIAO TimeWindow endWindow; // Properties for deployment of opstring. - ::Deployment::Properties properties; + ::Deployment::Properties infoProperty; + + // Component implementations used in this opstring. + ::Deployment::MonolithicDeploymentDescriptions implementation; + + // Implementation artifacts related to this opstring. + ::Deployment::ArtifactDeploymentDescriptions artifact; + }; }; diff --git a/common/QoS.idl b/common/QoS.idl new file mode 100644 index 00000000000..0a34f6340a6 --- /dev/null +++ b/common/QoS.idl @@ -0,0 +1,48 @@ +#ifndef QOS_IDL +#define QOS_IDL + +module CIAO +{ + module RACE + { + // Kind of comparison for a QoS specification. + enum QoSComparator + { + LESS_THAN, + GREATER_THAN, + EQUAL, + LESS_THAN_EQUAL, + GREATER_THAN_EQUAL, + NOT_EQUAL + }; + + // Type of QoS specification. + enum QoSType + { + DEADLINE, + OTHERS + }; + + // QoS structure. + struct QoSSpecification + { + // Human-readable name (for debugging, not identification). + string name; + + // Type of QoS. + QoSType type; + + // Specific type ID of component that monitors this QoS. + string MonitorID; + + // Comparison used for this QoS specification. + QoSComparator comparator; + + // Value to compare actual QoS to (using comparator). + any value; + }; + + typedef sequence QoSSpecifications; + }; +}; +#endif /* QOS_IDL */ diff --git a/common/RACE_common.mpc b/common/RACE_common.mpc index 924d1901584..2c736a04b58 100644 --- a/common/RACE_common.mpc +++ b/common/RACE_common.mpc @@ -1,49 +1,65 @@ -project(RACE_common_stub): ciao_deployment_stub { +// project(RACE_common_stub): ciao_deployment_stub { - sharedname = RACE_common_stub - idlflags += -Wb,stub_export_macro=RACE_COMMON_STUB_Export \ - -Wb,stub_export_include=RACE_common_stub_export.h +// sharedname = RACE_common_stub +// idlflags += -Wb,stub_export_macro=RACE_COMMON_STUB_Export \ +// -Wb,stub_export_include=RACE_common_stub_export.h - dynamicflags = RACE_COMMON_STUB_BUILD_DLL +// dynamicflags = RACE_COMMON_STUB_BUILD_DLL - IDL_Files { - RACE_common.idl - } +// IDL_Files { +// RACE_common.idl +// } - Source_Files { - RACE_commonC.cpp - } +// Source_Files { +// RACE_commonC.cpp +// } - Header_Files { - RACE_commonC.h - } +// Header_Files { +// RACE_commonC.h +// } - Inline_Files { - RACE_commonC.inl - } -} +// Inline_Files { +// RACE_commonC.inl +// } +// } project(OpString_stub): ciao_deployment_stub { sharedname = OpString_stub idlflags += -Wb,stub_export_macro=OPSTRING_STUB_Export \ - -Wb,stub_export_include=OpString_stub_export.h + -Wb,stub_export_include=OpString_stub_export.h \ + -I $(CIAO_ROOT)/DAnCE/Deployment dynamicflags = OPSTRING_STUB_BUILD_DLL IDL_Files { OpString.idl + Goal.idl + QoS.idl + Time.idl } Header_Files { OpStringC.h + GoalC.h + QoSC.h + TimeC.h + } Inline_Files { OpStringC.inl + GoalC.inl + QoSC.inl + TimeC.inl + } Source_Files { OpStringC.cpp + GoalC.cpp + QoSC.cpp + TimeC.cpp + } } diff --git a/common/Time.idl b/common/Time.idl new file mode 100644 index 00000000000..f7a8343005b --- /dev/null +++ b/common/Time.idl @@ -0,0 +1,32 @@ +#ifndef TIME_WINDOW_IDL +#define TIME_WINDOW_IDL + +module CIAO +{ + module RACE + { + + const long UNDEFINED_TIME_ENTRY = -1; + + struct TimeValue + { + // Seconds since Jan. 1, 1970 + long sec; + //and microseconds + long usec; + }; + + // A time window is a range between an earliest and latest time value. + struct TimeWindow + { + // Beginning of time window. + CIAO::RACE::TimeValue earliest; + + // End of time window. + CIAO::RACE::TimeValue latest; + }; + + }; +}; + +#endif /* TIME_WINDOW_IDL */ -- cgit v1.2.1