public class QueryUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryUtils.OccKindInfo
The Class OccKindInfo.
|
Modifier and Type | Field and Description |
---|---|
static int |
COMPONENT_TO_CORE
The Constant COMPONENT_TO_CORE.
|
static int |
COMPONENT_TO_PARTITION
The Constant COMPONENT_TO_PARTITION.
|
static int |
PARTITION_TO_CORE
The Constant PARTITION_TO_CORE.
|
static int |
TASK_TO_CORE
The Constant TASK_TO_CORE.
|
Constructor and Description |
---|
QueryUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
buildComponent2PartitionAssignment(org.eclipse.uml2.uml.Component parent,
java.util.Map<org.eclipse.uml2.uml.InstanceSpecification,java.util.LinkedHashSet<java.lang.Object>> result)
Given a component, create all the Component to Partition Assignments.
|
static java.lang.String |
buildCoreName(int coreNumber)
Builds the core name.
|
static void |
buildInstance2CoreAssignments(org.eclipse.uml2.uml.Component hwSystem,
java.util.Map<CHCore,java.util.LinkedHashSet<java.lang.Object>> result)
Builds the instance 2 core assignments.
|
static void |
buildPartition2CoreAssignments(org.eclipse.uml2.uml.Component parent,
java.util.Map<CHCore,java.util.LinkedHashSet<java.lang.Object>> result)
Create all the Partition to Core Assignments.
|
static java.util.Map<org.eclipse.uml2.uml.InstanceSpecification,java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification>> |
buildPartitionComponentMap(org.eclipse.uml2.uml.Model umlModel,
org.eclipse.uml2.uml.Package parent)
Returns a map with the Component to Partition assignments.
|
static java.util.Map<java.lang.String,java.util.Set<org.eclipse.uml2.uml.InstanceSpecification>> |
buildPartitionCoreMap(org.eclipse.uml2.uml.Model umlModel)
Returns a map with the Partition to Core assignments.
|
static void |
buildTask2CoreAssignments(org.eclipse.uml2.uml.Component hwSystem,
org.eclipse.uml2.uml.InstanceSpecification processor,
java.util.Map<java.lang.String,java.util.LinkedHashSet<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification>> coresToCHRtSpec,
java.util.Map<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.uml2.uml.InstanceSpecification> mapCHRtSpecToInstances)
Builds the task 2 core assignments.
|
static void |
deleteAssociations(org.eclipse.uml2.uml.Component parent,
int associationType)
Deletes all the associations of the given type.
|
static void |
deleteComponent2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
Delete component 2 core associations.
|
static void |
deletePartition2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
Delete partition 2 core associations.
|
static void |
deleteTask2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
Delete task 2 core associations.
|
static boolean |
elementIsComponentInstance(org.eclipse.uml2.uml.Element element)
Returns true if the given element is a component instance, false otherwise.
|
static boolean |
elementIsPartitionInstance(org.eclipse.uml2.uml.Element element)
Returns true if the given element is a partition instance, false otherwise.
|
static boolean |
elementIsProcessorInstance(org.eclipse.uml2.uml.Element element)
Returns true if the given element is a processor instance, false otherwise.
|
static boolean |
elementIsSlotInstance(org.eclipse.uml2.uml.Element element)
Element is slot instance.
|
static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> |
filterMultiCoreProcessors(org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> processors)
Filter multi core processors.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> |
getAllComponentInstances(org.eclipse.uml2.uml.Model umlModel)
Gets the all component instances.
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> |
getAllPartitionInstances(org.eclipse.uml2.uml.Model umlModel)
Gets the all partition instances.
|
static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> |
getAllProcessorInstances(org.eclipse.uml2.uml.Model umlModel)
Gets the all processor instances.
|
static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> |
getAllProcessorInstancesInPackage(org.eclipse.uml2.uml.Package thePackage)
Gets the all processor instances in package.
|
static org.eclipse.emf.common.util.EList<CHTask> |
getAllTaskInstances(org.eclipse.uml2.uml.Model umlModel)
Gets the all task instances.
|
static org.polarsys.chess.chessmlprofile.Core.CHESS |
getCHESS(org.eclipse.uml2.uml.Model umlModel)
Gets the chess.
|
static java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> |
getCHRTSpecFromInstances(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
Gets the CHRT spec from instances.
|
static java.util.Map<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.uml2.uml.Slot> |
getCHTasks(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
Gets the CH tasks.
|
static org.eclipse.emf.common.util.EList<CHTask> |
getCHTasksList(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
Gets the CH tasks list.
|
static org.eclipse.emf.common.command.CommandStack |
getCommandStack(org.eclipse.uml2.uml.Model umlModel)
Gets the command stack.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getComponent2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of Component to Core assignments in the given view in the given model.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getComponent2PartitionAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of Component to Partition assignments in the given view in the given model.
|
static java.util.LinkedHashSet<java.lang.Object> |
getComponentsAssigned2Core(CHCore core,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Given the Core (and related processor) get the list of components that are
assigned to it.
|
static java.util.LinkedHashSet<java.lang.Object> |
getComponentsAssigned2Partition(org.eclipse.uml2.uml.InstanceSpecification partition,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Given a Partition returns the list of Components that are assigned to it.
|
static java.lang.String |
getCoreNameFromImpliedNfpConstraint(org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign theAssignment)
Returns the name of the Core to which the given assignment is related.
|
static org.eclipse.emf.common.util.EList<CHCore> |
getCores(org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor processor)
Gets the cores.
|
static QueryUtils.OccKindInfo |
getOccKindInfo(java.lang.String occKind)
Returns the OccKindInfo that correspomnds to the input string.
|
static org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor |
getOneProcessor(org.eclipse.uml2.uml.Model umlModel)
Gets the one processor.
|
static org.eclipse.uml2.uml.Package |
getOneResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
Returns the first CHGaResourcePlatform that is found inside the given package.
|
static java.util.HashMap<CHTask,org.eclipse.emf.common.util.EList<CHTask>> |
getOperationChain(org.eclipse.uml2.uml.Model umlModel,
org.eclipse.emf.common.util.EList<CHTask> chtasks)
Gets the operation chain.
|
static java.util.HashMap<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.emf.common.util.EList<CHTask>> |
getOperationChain2(org.eclipse.uml2.uml.Model umlModel,
java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> chtasks)
Gets the operation chain 2.
|
static org.eclipse.uml2.uml.Package |
getOwnerCHGaResourcePlatformPackage(org.eclipse.uml2.uml.Model umlModel,
org.eclipse.uml2.uml.InstanceSpecification theSystem)
Returns the Package (in the Deployment View) that owns the input system.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getPartition2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of Partition to Core assignments in the given view in the given model.
|
static java.util.LinkedHashSet<java.lang.Object> |
getPartitionsAssigned2Core(CHCore core,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Given the Core (and related processor) get the list of partitions that are
assigned to it.
|
static org.eclipse.uml2.uml.Component |
getPartitionsComponent(org.eclipse.uml2.uml.Model umlModel)
Deprecated.
PartitionsComponent stereotype is deprecated
|
static org.eclipse.uml2.uml.Component |
getResourcePlatformComponent(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns a Component that is stereotyped as CHGaResourcePlatform inside the view with the given name
in the given model.
|
static org.eclipse.uml2.uml.Package |
getResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
Deprecated.
This method returns only one platform package. In the newer
version of CHESS there can be multiple platform packages.
Replace with getResourcePlatformPackages
|
static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Package> |
getResourcePlatformPackages(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of CHGaResourcePlatforms found inside the view with the given name in the given model.
|
static java.util.List<org.eclipse.uml2.uml.Package> |
getResourcePlatformPackages(org.eclipse.uml2.uml.Package cmpv)
Returns the list of CHGaResourcePlatforms found inside the given Package.
|
static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> |
getTask2CoreAssignments(org.eclipse.uml2.uml.Model umlModel,
java.lang.String viewName)
Returns the list of Task to Core assignments in the given view in the given model.
|
static CHTask |
getTaskFromSlot(org.eclipse.uml2.uml.Element element)
Returns the CHTask associated to the given element (if this is a CHRTPortSlot).
|
static java.util.LinkedHashSet<java.lang.Object> |
getTasksAssigned2Core(CHCore core,
org.eclipse.uml2.uml.Package pack,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Given the Core (and related processor) get the list of tasks that are
assigned to it.
|
static double |
getWCET(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification)
Gets the wcet.
|
static int |
getWCETunit(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification,
java.lang.String unitOfMeasure)
Gets the WCE tunit.
|
static float |
getWCETunitFloat(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification,
java.lang.String unitOfMeasure)
Gets the WCE tunit float.
|
static boolean |
isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if this Partition is assigned to a CPU.
|
static boolean |
isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.uml2.uml.Package pack,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if this Partition is assigned to a CPU.
|
static boolean |
isAssigned2Partition(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if Instance Specification in input is assigned to a Partition.
|
static boolean |
isAssigned2Processor(org.eclipse.uml2.uml.InstanceSpecification i,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Check if this Partition is assigned to a CPU.
|
static boolean |
isComponentInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns true if the given InstanceSpecification is a ComponentImplementation, false otherwise.
|
static boolean |
isDeviceInstance(org.eclipse.uml2.uml.InstanceSpecification instSpec)
check if an instance specification is an instance of a MARTE Device.
|
static boolean |
isGuarded(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification spec)
Checks if is guarded.
|
static boolean |
isOccKindPeriodic(java.lang.String occKind)
Checks if is occ kind periodic.
|
static boolean |
isOccKindSporadic(java.lang.String occKind)
Checks if is occ kind sporadic.
|
static boolean |
isOccKindSporadicOrPeriodic(java.lang.String occKind)
Checks if is occ kind sporadic or periodic.
|
static boolean |
isPartitionInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns true if the given InstanceSpecification is a functional Partition, false otherwise.
|
static boolean |
isProcessorInstance(org.eclipse.uml2.uml.InstanceSpecification e)
Returns true if the given InstanceSpecification is sterotyped as CH_HwProcessor.
|
static boolean |
isTaskAssigned2Core(CHTask t,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Returns true if the given task is assigned to a core, false otherwise.
|
static boolean |
isTaskAssigned2Core(CHTask task,
org.eclipse.uml2.uml.Package pack,
org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
Returns TRUE if the given Task is assigned to a Core in the Deployment
identified by the given package.
|
static boolean |
processorInstanceIsSingleCore(org.eclipse.uml2.uml.InstanceSpecification processorInstance)
Returns true is the input Instance Processor has only 1 CORE.
|
static int |
unitConversion(double value,
java.lang.String fromUnit,
java.lang.String toUnit)
Unit conversion.
|
static float |
unitConversionFloat(double value,
java.lang.String fromUnit,
java.lang.String toUnit)
Unit conversion float.
|
public static final int COMPONENT_TO_PARTITION
public static final int PARTITION_TO_CORE
public static final int COMPONENT_TO_CORE
public static final int TASK_TO_CORE
public static org.polarsys.chess.chessmlprofile.Core.CHESS getCHESS(org.eclipse.uml2.uml.Model umlModel)
umlModel
- the uml modelpublic static org.eclipse.emf.common.command.CommandStack getCommandStack(org.eclipse.uml2.uml.Model umlModel)
umlModel
- the uml modelpublic static org.eclipse.uml2.uml.Component getPartitionsComponent(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static java.util.LinkedHashSet<java.lang.Object> getComponentsAssigned2Partition(org.eclipse.uml2.uml.InstanceSpecification partition, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
partition
- the partitionassignments
- the assignmentspublic static void deleteAssociations(org.eclipse.uml2.uml.Component parent, int associationType)
parent
- the parentassociationType
- (PARTITION_TO_CORE | COMPONENT_TO_CORE | TASK_TO_CORE | COMPONENT_TO_PARTITIONpublic static CHTask getTaskFromSlot(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean elementIsSlotInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static void buildComponent2PartitionAssignment(org.eclipse.uml2.uml.Component parent, java.util.Map<org.eclipse.uml2.uml.InstanceSpecification,java.util.LinkedHashSet<java.lang.Object>> result)
parent
- the parentresult
- the resultpublic static java.lang.String buildCoreName(int coreNumber)
coreNumber
- the core numberpublic static void buildPartition2CoreAssignments(org.eclipse.uml2.uml.Component parent, java.util.Map<CHCore,java.util.LinkedHashSet<java.lang.Object>> result)
parent
- the parentresult
- the resultpublic static org.eclipse.uml2.uml.Package getOneResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
cmpv
- the cmpv@Deprecated public static org.eclipse.uml2.uml.Package getResourcePlatformPackage(org.eclipse.uml2.uml.Package cmpv)
cmpv
- the cmpvpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.Package> getResourcePlatformPackages(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static java.util.List<org.eclipse.uml2.uml.Package> getResourcePlatformPackages(org.eclipse.uml2.uml.Package cmpv)
cmpv
- is the given packagepublic static org.eclipse.uml2.uml.Component getResourcePlatformComponent(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static boolean isPartitionInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static boolean isComponentInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static boolean isGuarded(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification spec)
spec
- the specpublic static boolean isOccKindSporadicOrPeriodic(java.lang.String occKind)
occKind
- the occ kindpublic static boolean isOccKindSporadic(java.lang.String occKind)
occKind
- the occ kindpublic static boolean isOccKindPeriodic(java.lang.String occKind)
occKind
- the occ kindpublic static QueryUtils.OccKindInfo getOccKindInfo(java.lang.String occKind)
occKind
- the String with the occurrency kind informationpublic static java.util.Map<org.eclipse.uml2.uml.InstanceSpecification,java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification>> buildPartitionComponentMap(org.eclipse.uml2.uml.Model umlModel, org.eclipse.uml2.uml.Package parent) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelparent
- the parentorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static java.util.Map<java.lang.String,java.util.Set<org.eclipse.uml2.uml.InstanceSpecification>> buildPartitionCoreMap(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static boolean isProcessorInstance(org.eclipse.uml2.uml.InstanceSpecification e)
e
- the epublic static boolean isDeviceInstance(org.eclipse.uml2.uml.InstanceSpecification instSpec)
instSpec
- the inst specpublic static org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor getOneProcessor(org.eclipse.uml2.uml.Model umlModel)
umlModel
- the uml modelpublic static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> getAllProcessorInstances(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> getAllProcessorInstancesInPackage(org.eclipse.uml2.uml.Package thePackage) throws org.polarsys.chess.core.util.uml.ModelError
thePackage
- the the packageorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> filterMultiCoreProcessors(org.eclipse.emf.common.util.EList<org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor> processors)
processors
- the processorspublic static org.eclipse.emf.common.util.EList<CHCore> getCores(org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor processor)
processor
- the processorpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> getAllPartitionInstances(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> getAllComponentInstances(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<CHTask> getAllTaskInstances(org.eclipse.uml2.uml.Model umlModel) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static void deleteTask2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
hwSystem
- the hw systempublic static void deleteComponent2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
hwSystem
- the hw systempublic static void deletePartition2CoreAssociations(org.eclipse.uml2.uml.Component hwSystem)
hwSystem
- the hw systempublic static void buildInstance2CoreAssignments(org.eclipse.uml2.uml.Component hwSystem, java.util.Map<CHCore,java.util.LinkedHashSet<java.lang.Object>> result)
hwSystem
- the hw systemresult
- the resultpublic static java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> getCHRTSpecFromInstances(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
instances
- the instancespublic static java.util.Map<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.uml2.uml.Slot> getCHTasks(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
instances
- the instancespublic static org.eclipse.emf.common.util.EList<CHTask> getCHTasksList(org.eclipse.emf.common.util.EList<org.eclipse.uml2.uml.InstanceSpecification> instances)
instances
- the instancespublic static void buildTask2CoreAssignments(org.eclipse.uml2.uml.Component hwSystem, org.eclipse.uml2.uml.InstanceSpecification processor, java.util.Map<java.lang.String,java.util.LinkedHashSet<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification>> coresToCHRtSpec, java.util.Map<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.uml2.uml.InstanceSpecification> mapCHRtSpecToInstances)
hwSystem
- the hw systemprocessor
- the processorcoresToCHRtSpec
- the cores to CH rt specmapCHRtSpecToInstances
- the map CH rt spec to instancespublic static java.util.HashMap<CHTask,org.eclipse.emf.common.util.EList<CHTask>> getOperationChain(org.eclipse.uml2.uml.Model umlModel, org.eclipse.emf.common.util.EList<CHTask> chtasks) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelchtasks
- the chtasksorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static java.util.HashMap<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification,org.eclipse.emf.common.util.EList<CHTask>> getOperationChain2(org.eclipse.uml2.uml.Model umlModel, java.util.Set<org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification> chtasks) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelchtasks
- the chtasksorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static float unitConversionFloat(double value, java.lang.String fromUnit, java.lang.String toUnit)
value
- the valuefromUnit
- the from unittoUnit
- the to unitpublic static int unitConversion(double value, java.lang.String fromUnit, java.lang.String toUnit)
value
- the valuefromUnit
- the from unittoUnit
- the to unitpublic static float getWCETunitFloat(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification, java.lang.String unitOfMeasure) throws org.polarsys.chess.core.util.uml.ModelError
chRtSpecification
- the ch rt specificationunitOfMeasure
- the unit of measureorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static int getWCETunit(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification, java.lang.String unitOfMeasure) throws org.polarsys.chess.core.util.uml.ModelError
chRtSpecification
- the ch rt specificationunitOfMeasure
- the unit of measureorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static double getWCET(org.polarsys.chess.chessmlprofile.Predictability.RTComponentModel.CHRtSpecification chRtSpecification) throws org.polarsys.chess.core.util.uml.ModelError
chRtSpecification
- the ch rt specificationorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static boolean isAssigned2Partition(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static boolean isAssigned2Processor(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static boolean isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.uml2.uml.Package pack, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the ipack
- the packassignments
- the assignmentspublic static boolean isAssigned2Core(org.eclipse.uml2.uml.InstanceSpecification i, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
i
- the iassignments
- the assignmentspublic static boolean isTaskAssigned2Core(CHTask task, org.eclipse.uml2.uml.Package pack, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
task
- the taskpack
- the packassignments
- the assignmentspublic static boolean isTaskAssigned2Core(CHTask t, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
t
- the tassignments
- the assignmentspublic static java.util.LinkedHashSet<java.lang.Object> getPartitionsAssigned2Core(CHCore core, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
core
- the coreassignments
- the assignmentspublic static java.lang.String getCoreNameFromImpliedNfpConstraint(org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign theAssignment)
theAssignment
- the the assignmentpublic static boolean elementIsPartitionInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean elementIsComponentInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static boolean elementIsProcessorInstance(org.eclipse.uml2.uml.Element element)
element
- the elementpublic static java.util.LinkedHashSet<java.lang.Object> getComponentsAssigned2Core(CHCore core, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
core
- the coreassignments
- the assignmentspublic static java.util.LinkedHashSet<java.lang.Object> getTasksAssigned2Core(CHCore core, org.eclipse.uml2.uml.Package pack, org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> assignments)
core
- the corepack
- the packassignments
- the assignmentspublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getComponent2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getComponent2PartitionAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getPartition2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static org.eclipse.emf.common.util.EList<org.eclipse.papyrus.MARTE.MARTE_Foundations.Alloc.Assign> getTask2CoreAssignments(org.eclipse.uml2.uml.Model umlModel, java.lang.String viewName) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modelviewName
- the view nameorg.polarsys.chess.core.util.uml.ModelError
- the model errorpublic static boolean processorInstanceIsSingleCore(org.eclipse.uml2.uml.InstanceSpecification processorInstance)
processorInstance
- the processor instancepublic static org.eclipse.uml2.uml.Package getOwnerCHGaResourcePlatformPackage(org.eclipse.uml2.uml.Model umlModel, org.eclipse.uml2.uml.InstanceSpecification theSystem) throws org.polarsys.chess.core.util.uml.ModelError
umlModel
- the uml modeltheSystem
- the the systemorg.polarsys.chess.core.util.uml.ModelError
- the model error