use of org.osate.aadl2.instance.EndToEndFlowInstance in project osate2 by osate.
the class InstancePackageImpl method initializePackageContents.
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) {
return;
}
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
Aadl2Package theAadl2Package = (Aadl2Package) EPackage.Registry.INSTANCE.getEPackage(Aadl2Package.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
featureInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
featureInstanceEClass.getESuperTypes().add(getInstanceObject());
instanceObjectEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
annexInstanceEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
propertyAssociationInstanceEClass.getESuperTypes().add(theAadl2Package.getPropertyAssociation());
connectionInstanceEndEClass.getESuperTypes().add(getInstanceObject());
connectionInstanceEClass.getESuperTypes().add(getFlowElementInstance());
flowElementInstanceEClass.getESuperTypes().add(getInstanceObject());
systemOperationModeEClass.getESuperTypes().add(theAadl2Package.getMode());
modeInstanceEClass.getESuperTypes().add(getInstanceObject());
modeTransitionInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
modeTransitionInstanceEClass.getESuperTypes().add(getInstanceObject());
connectionReferenceEClass.getESuperTypes().add(getInstanceObject());
componentInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
componentInstanceEClass.getESuperTypes().add(getFlowElementInstance());
flowSpecificationInstanceEClass.getESuperTypes().add(getFlowElementInstance());
endToEndFlowInstanceEClass.getESuperTypes().add(getFlowElementInstance());
systemInstanceEClass.getESuperTypes().add(getComponentInstance());
instanceReferenceValueEClass.getESuperTypes().add(theAadl2Package.getPropertyValue());
// Initialize classes and features; add operations and parameters
initEClass(// $NON-NLS-1$
featureInstanceEClass, // $NON-NLS-1$
FeatureInstance.class, // $NON-NLS-1$
"FeatureInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFeatureInstance_SrcFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
getFlowSpecificationInstance_Source(), // $NON-NLS-1$
"srcFlowSpec", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFeatureInstance_DstFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
getFlowSpecificationInstance_Destination(), // $NON-NLS-1$
"dstFlowSpec", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFeatureInstance_FeatureInstance(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"featureInstance", // $NON-NLS-1$
null, 0, -1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Category(), // $NON-NLS-1$
getFeatureCategory(), // $NON-NLS-1$
"category", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Direction(), // $NON-NLS-1$
theAadl2Package.getDirectionType(), // $NON-NLS-1$
"direction", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFeatureInstance_Feature(), // $NON-NLS-1$
theAadl2Package.getFeature(), // $NON-NLS-1$
null, // $NON-NLS-1$
"feature", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Index(), // $NON-NLS-1$
theAadl2Package.getInteger(), // $NON-NLS-1$
"index", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
instanceObjectEClass, // $NON-NLS-1$
InstanceObject.class, // $NON-NLS-1$
"InstanceObject", // $NON-NLS-1$
IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getInstanceObject_AnnexInstance(), // $NON-NLS-1$
getAnnexInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"annexInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, InstanceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
annexInstanceEClass, // $NON-NLS-1$
AnnexInstance.class, // $NON-NLS-1$
"AnnexInstance", // $NON-NLS-1$
IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getAnnexInstance_AnnexSubclause(), // $NON-NLS-1$
theAadl2Package.getAnnexSubclause(), // $NON-NLS-1$
null, // $NON-NLS-1$
"annexSubclause", null, 1, 1, AnnexInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
propertyAssociationInstanceEClass, // $NON-NLS-1$
PropertyAssociationInstance.class, // $NON-NLS-1$
"PropertyAssociationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPropertyAssociationInstance_PropertyAssociation(), theAadl2Package.getPropertyAssociation(), // $NON-NLS-1$
null, // $NON-NLS-1$
"propertyAssociation", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
PropertyAssociationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionInstanceEndEClass, // $NON-NLS-1$
ConnectionInstanceEnd.class, // $NON-NLS-1$
"ConnectionInstanceEnd", // $NON-NLS-1$
IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConnectionInstanceEnd_SrcConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
getConnectionInstance_Source(), // $NON-NLS-1$
"srcConnectionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstanceEnd_DstConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
getConnectionInstance_Destination(), // $NON-NLS-1$
"dstConnectionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionInstanceEClass, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
"ConnectionInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConnectionInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
"inSystemOperationMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionInstance_InModeTransition(), // $NON-NLS-1$
getModeTransitionInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inModeTransition", null, 0, -1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Complete(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"complete", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Kind(), // $NON-NLS-1$
getConnectionKind(), // $NON-NLS-1$
"kind", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_Destination(), getConnectionInstanceEnd(), // $NON-NLS-1$
getConnectionInstanceEnd_DstConnectionInstance(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_ConnectionReference(), getConnectionReference(), null, // $NON-NLS-1$
"connectionReference", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Bidirectional(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"bidirectional", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_Source(), getConnectionInstanceEnd(), // $NON-NLS-1$
getConnectionInstanceEnd_SrcConnectionInstance(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
flowElementInstanceEClass, // $NON-NLS-1$
FlowElementInstance.class, // $NON-NLS-1$
"FlowElementInstance", // $NON-NLS-1$
IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(// $NON-NLS-1$
systemOperationModeEClass, // $NON-NLS-1$
SystemOperationMode.class, // $NON-NLS-1$
"SystemOperationMode", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getSystemOperationMode_CurrentMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"currentMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, SystemOperationMode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(// $NON-NLS-1$
modeInstanceEClass, // $NON-NLS-1$
ModeInstance.class, // $NON-NLS-1$
"ModeInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getModeInstance_SrcModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
getModeTransitionInstance_Source(), // $NON-NLS-1$
"srcModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeInstance_DstModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
getModeTransitionInstance_Destination(), // $NON-NLS-1$
"dstModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
getModeInstance_Initial(), // $NON-NLS-1$//$NON-NLS-2$
theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
"initial", // $NON-NLS-1$//$NON-NLS-2$
"false", // $NON-NLS-1$//$NON-NLS-2$
1, // $NON-NLS-1$//$NON-NLS-2$
1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeInstance_Mode(), // $NON-NLS-1$
theAadl2Package.getMode(), // $NON-NLS-1$
null, // $NON-NLS-1$
"mode", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
getModeInstance_Derived(), // $NON-NLS-1$//$NON-NLS-2$
theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
"derived", // $NON-NLS-1$//$NON-NLS-2$
"false", // $NON-NLS-1$//$NON-NLS-2$
1, // $NON-NLS-1$//$NON-NLS-2$
1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeInstance_Parent(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"parent", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
modeTransitionInstanceEClass, // $NON-NLS-1$
ModeTransitionInstance.class, // $NON-NLS-1$
"ModeTransitionInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getModeTransitionInstance_Destination(), getModeInstance(), getModeInstance_DstModeTransition(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeTransitionInstance_ModeTransition(), theAadl2Package.getModeTransition(), null, // $NON-NLS-1$
"modeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeTransitionInstance_Trigger(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"trigger", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeTransitionInstance_Source(), getModeInstance(), getModeInstance_SrcModeTransition(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionReferenceEClass, // $NON-NLS-1$
ConnectionReference.class, // $NON-NLS-1$
"ConnectionReference", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getConnectionReference_Context(), // $NON-NLS-1$
getComponentInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"context", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Connection(), // $NON-NLS-1$
theAadl2Package.getConnection(), // $NON-NLS-1$
null, // $NON-NLS-1$
"connection", // $NON-NLS-1$
null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Source(), // $NON-NLS-1$
getConnectionInstanceEnd(), // $NON-NLS-1$
null, // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Destination(), // $NON-NLS-1$
getConnectionInstanceEnd(), // $NON-NLS-1$
null, // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionReference_Reverse(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"reverse", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
componentInstanceEClass, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
"ComponentInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getComponentInstance_FeatureInstance(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"featureInstance", // $NON-NLS-1$
null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ComponentInstance(), // $NON-NLS-1$
getComponentInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"componentInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ModeInstance(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"modeInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getComponentInstance_ModeTransitionInstance(), getModeTransitionInstance(), null, // $NON-NLS-1$
"modeTransitionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getComponentInstance_Category(), // $NON-NLS-1$
theAadl2Package.getComponentCategory(), // $NON-NLS-1$
"category", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getComponentInstance_FlowSpecification(), getFlowSpecificationInstance(), null, // $NON-NLS-1$
"flowSpecification", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_EndToEndFlow(), // $NON-NLS-1$
getEndToEndFlowInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"endToEndFlow", // $NON-NLS-1$
null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ConnectionInstance(), // $NON-NLS-1$
getConnectionInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"connectionInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_Subcomponent(), // $NON-NLS-1$
theAadl2Package.getSubcomponent(), // $NON-NLS-1$
null, // $NON-NLS-1$
"subcomponent", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getComponentInstance_Index(), // $NON-NLS-1$
theAadl2Package.getInteger(), // $NON-NLS-1$
"index", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_Classifier(), // $NON-NLS-1$
theAadl2Package.getComponentClassifier(), // $NON-NLS-1$
null, // $NON-NLS-1$
"classifier", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
flowSpecificationInstanceEClass, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
"FlowSpecificationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFlowSpecificationInstance_Source(), getFeatureInstance(), getFeatureInstance_SrcFlowSpec(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_Destination(), getFeatureInstance(), // $NON-NLS-1$
getFeatureInstance_DstFlowSpec(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_FlowSpecification(), theAadl2Package.getFlowSpecification(), null, // $NON-NLS-1$
"flowSpecification", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFlowSpecificationInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_InModeTransition(), getModeTransitionInstance(), null, // $NON-NLS-1$
"inModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
endToEndFlowInstanceEClass, // $NON-NLS-1$
EndToEndFlowInstance.class, // $NON-NLS-1$
"EndToEndFlowInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_FlowElement(), // $NON-NLS-1$
getFlowElementInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"flowElement", // $NON-NLS-1$
null, 0, -1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getEndToEndFlowInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
"inSystemOperationMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
EndToEndFlowInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_EndToEndFlow(), // $NON-NLS-1$
theAadl2Package.getEndToEndFlow(), // $NON-NLS-1$
null, // $NON-NLS-1$
"endToEndFlow", null, 1, 1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
systemInstanceEClass, // $NON-NLS-1$
SystemInstance.class, // $NON-NLS-1$
"SystemInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getSystemInstance_SystemOperationMode(), // $NON-NLS-1$
getSystemOperationMode(), // $NON-NLS-1$
null, // $NON-NLS-1$
"systemOperationMode", null, 0, -1, SystemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getSystemInstance_ComponentImplementation(), theAadl2Package.getComponentImplementation(), null, // $NON-NLS-1$
"componentImplementation", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
SystemInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
instanceReferenceValueEClass, // $NON-NLS-1$
InstanceReferenceValue.class, // $NON-NLS-1$
"InstanceReferenceValue", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getInstanceReferenceValue_ReferencedInstanceObject(), getInstanceObject(), null, // $NON-NLS-1$
"referencedInstanceObject", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
InstanceReferenceValue.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
// Initialize enums and add enum literals
// $NON-NLS-1$
initEEnum(connectionKindEEnum, ConnectionKind.class, "ConnectionKind");
addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.ACCESS_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.PARAMETER_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.PORT_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.MODE_TRANSITION_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_GROUP_CONNECTION);
// $NON-NLS-1$
initEEnum(featureCategoryEEnum, FeatureCategory.class, "FeatureCategory");
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_DATA_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.PARAMETER);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.BUS_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_GROUP_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.FEATURE_GROUP);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.ABSTRACT_FEATURE);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/uml2/2.0.0/UML
createUMLAnnotations();
// duplicates
createDuplicatesAnnotations();
}
use of org.osate.aadl2.instance.EndToEndFlowInstance in project osate2 by osate.
the class ComponentInstanceImpl method createEndToEndFlow.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EndToEndFlowInstance createEndToEndFlow() {
EndToEndFlowInstance newEndToEndFlow = (EndToEndFlowInstance) create(InstancePackage.Literals.END_TO_END_FLOW_INSTANCE);
getEndToEndFlows().add(newEndToEndFlow);
return newEndToEndFlow;
}
use of org.osate.aadl2.instance.EndToEndFlowInstance in project osate2 by osate.
the class FlowLatencyAnalysisSwitch method invokeOnSOM.
/**
* Invoke the analysis and return Result collection
*
* @param etef The end to end flow instance
* @param som The mode to run the analysis in. If the ETEF is not active it will not be run.
* @param asynchronousSystem Whether the system is treated as asynchronous
* @param majorFrameDelay Whether partition output is performed at a major frame (as opposed to the partition end)
* @param worstCaseDeadline Use deadline based processing (as opposed to max compute execution time)
* @param bestCaseEmptyQueue Assume empty queue (instead of full)
* @param disableQueuingLatency <code>true</code> if queuing latency should always be reported as zero
*
* @since org.osate.analysis.flows 3.0
*/
private void invokeOnSOM(EndToEndFlowInstance etef, SystemOperationMode som, boolean asynchronousSystem, boolean majorFrameDelay, boolean worstCaseDeadline, boolean bestCaseEmptyQueue, boolean disableQueuingLatency) {
if (report == null) {
report = new LatencyReport();
}
report.setRootinstance(etef.getSystemInstance());
report.setLatencyAnalysisParameters(asynchronousSystem, majorFrameDelay, worstCaseDeadline, bestCaseEmptyQueue, disableQueuingLatency);
SystemInstance root = etef.getSystemInstance();
if (etef.isActive(som)) {
root.setCurrentSystemOperationMode(som);
LatencyReportEntry latres = analyzeLatency(etef, som, asynchronousSystem);
// Issue 1148
report.addEntry(latres);
root.clearCurrentSystemOperationMode();
}
}
use of org.osate.aadl2.instance.EndToEndFlowInstance in project osate2 by osate.
the class FlowLatencyAnalysisSwitch method mapComponentInstance.
private void mapComponentInstance(final EndToEndFlowInstance etef, final FlowElementInstance flowElementInstance, LatencyReportEntry entry) {
ComponentInstance componentInstance;
final boolean hasLatency = flowElementInstance instanceof FlowSpecificationInstance || flowElementInstance instanceof ConnectionInstance || flowElementInstance instanceof EndToEndFlowInstance || latencyCats.contains(((ComponentInstance) flowElementInstance).getCategory());
final RealRange expected = hasLatency ? PropertyUtils.getScaledRange(org.osate.aadl2.contrib.communication.CommunicationProperties::getLatency, flowElementInstance, TimeUnits.MS).orElse(RealRange.ZEROED) : RealRange.ZEROED;
if (flowElementInstance instanceof FlowSpecificationInstance) {
componentInstance = flowElementInstance.getComponentInstance();
} else {
componentInstance = (ComponentInstance) flowElementInstance;
}
FeatureInstance incomingConnectionFI = FlowLatencyUtil.getIncomingConnectionFeatureInstance(etef, flowElementInstance);
/**
* Get all the relevant properties.
*/
double period = periodCats.contains(componentInstance.getCategory()) ? PropertyUtils.getScaled(TimingProperties::getPeriod, componentInstance, TimeUnits.MS).orElse(0.0) : 0.0;
double deadline = deadlineCats.contains(componentInstance.getCategory()) ? PropertyUtils.getScaled(TimingProperties::getDeadline, componentInstance, TimeUnits.MS).orElse(0.0) : 0.0;
boolean isAssignedDeadline = isAssignedDeadline(componentInstance);
final boolean isThreadOrDevice = InstanceModelUtil.isThread(componentInstance) || InstanceModelUtil.isDevice(componentInstance) || InstanceModelUtil.isAbstract(componentInstance);
final boolean isPeriodic = period > 0 && (isThreadOrDevice ? (!InstanceModelUtil.isSporadicComponent(componentInstance) && !InstanceModelUtil.isTimedComponent(componentInstance) && !InstanceModelUtil.isAperiodicComponent(componentInstance)) : true);
final RealRange responseTime = getResponseTimeInMilliSec(flowElementInstance, componentInstance, isPeriodic);
final RealRange executionTime = getExecutionTimeInMilliSec(flowElementInstance, componentInstance, isPeriodic);
/**
* The component is periodic. Therefore it will sample its input unless we have an immediate connection or delayed connection
*/
boolean checkLastImmediate = false;
if (isPeriodic) {
// we have a periodic component that samples
if (incomingConnectionFI != null) {
// it is not the first component in the ETEF. We need to add sampling latency
if (incomingConnectionFI.getCategory() == FeatureCategory.DATA_PORT || incomingConnectionFI.getCategory() == FeatureCategory.ABSTRACT_FEATURE) {
// sampling incoming data
// period is set, and if thread, abstract, or device needs to be dispatched as periodic
// We sample only data ports. Event and event data ports have queuing latency
LatencyContributorComponent samplingLatencyContributor = new LatencyContributorComponent(componentInstance, flowElementInstance, report.isMajorFrameDelay());
samplingLatencyContributor.setSamplingPeriod(period);
if ((InstanceModelUtil.isThread(componentInstance) || InstanceModelUtil.isDevice(componentInstance)) && !hasAssignedPropertyValue(componentInstance, "Dispatch_Protocol")) {
samplingLatencyContributor.reportInfo("Assume Periodic dispatch because period is set");
}
if (FlowLatencyUtil.isPreviousConnectionDelayed(etef, flowElementInstance)) {
samplingLatencyContributor.setBestCaseMethod(LatencyContributorMethod.DELAYED);
samplingLatencyContributor.setWorstCaseMethod(LatencyContributorMethod.DELAYED);
} else if (FlowLatencyUtil.isPreviousConnectionImmediate(etef, flowElementInstance)) {
// the cumulative does not exceed the deadline of the last.
if (!FlowLatencyUtil.isNextConnectionImmediate(etef, flowElementInstance)) {
checkLastImmediate = true;
}
} else {
// sampled. We may under sample
ComponentInstance prevComp = FlowLatencyUtil.getPreviousComponent(etef, flowElementInstance);
double prevPeriod = prevComp != null ? PropertyUtils.getScaled(TimingProperties::getPeriod, prevComp, TimeUnits.MS).orElse(0.0) : 0;
if (period > 0 && prevPeriod > 0 && period % prevPeriod == 0.0) {
samplingLatencyContributor.setSamplingPeriod(prevPeriod);
} else {
samplingLatencyContributor.setSamplingPeriod(period);
}
samplingLatencyContributor.setBestCaseMethod(LatencyContributorMethod.SAMPLED);
samplingLatencyContributor.setWorstCaseMethod(LatencyContributorMethod.SAMPLED);
}
entry.addContributor(samplingLatencyContributor);
} else {
// queuing latency handled later
// do nothing here
}
} else {
// The periodic component is the first component in the ETEF
// record fact that first element is periodic so we can process synchronous behavior correctly
LatencyContributorComponent samplingLatencyContributor = new LatencyContributorComponent(componentInstance, flowElementInstance, report.isMajorFrameDelay());
samplingLatencyContributor.setBestCaseMethod(LatencyContributorMethod.FIRST_PERIODIC);
samplingLatencyContributor.setWorstCaseMethod(LatencyContributorMethod.FIRST_PERIODIC);
entry.addContributor(samplingLatencyContributor);
}
} else {
// the component is not executing periodically
if (entry.getContributors().isEmpty()) {
// insert first partition sampling for the aperiodic case. For other partitions it is inserted by connection processing
ComponentInstance firstPartition = FlowLatencyUtil.getPartition(componentInstance);
if (firstPartition != null) {
double partitionLatency = FlowLatencyUtil.getPartitionPeriod(firstPartition);
List<ScheduleWindow> schedule = FlowLatencyUtil.getModuleSchedule(firstPartition);
double partitionDuration = FlowLatencyUtil.getPartitionDuration(firstPartition, schedule);
LatencyContributorComponent platencyContributor = new LatencyContributorComponent(firstPartition, flowElementInstance, report.isMajorFrameDelay());
if (!FlowLatencyUtil.isInSchedule(firstPartition, schedule)) {
platencyContributor.reportWarning("Partition not found in ARINC653 schedule of processor " + FlowLatencyUtil.getModule(firstPartition).getName());
}
if (partitionDuration > 0) {
platencyContributor.setSamplingPeriod(partitionLatency);
double frameOffset = FlowLatencyUtil.getPartitionFrameOffset(firstPartition, schedule);
platencyContributor.setPartitionOffset(frameOffset);
platencyContributor.setPartitionDuration(partitionDuration);
platencyContributor.setWorstCaseMethod(LatencyContributorMethod.PARTITION_SCHEDULE);
platencyContributor.setBestCaseMethod(LatencyContributorMethod.PARTITION_SCHEDULE);
entry.addContributor(platencyContributor);
} else {
platencyContributor.setSamplingPeriod(partitionLatency);
platencyContributor.setWorstCaseMethod(LatencyContributorMethod.PARTITION_FRAME);
platencyContributor.setBestCaseMethod(LatencyContributorMethod.PARTITION_FRAME);
entry.addContributor(platencyContributor);
}
}
}
}
/**
* Selection of the worst case value, generic case.
*/
LatencyContributorMethod bestmethod;
LatencyContributorMethod worstmethod;
double worstCaseValue = 0.0;
double bestCaseValue = 0.0;
worstmethod = LatencyContributorMethod.UNKNOWN;
LatencyContributorComponent processingLatencyContributor = new LatencyContributorComponent(componentInstance, flowElementInstance, report.isMajorFrameDelay());
if (responseTime.getMaximum() != 0.0) {
worstCaseValue = responseTime.getMaximum();
worstmethod = LatencyContributorMethod.RESPONSE_TIME;
} else if (executionTime.getMaximum() != 0.0) {
if (!report.isWorstCaseDeadline()) {
// Use execution time for worst-case if preferences specify not deadline or no deadline is specified
worstCaseValue = executionTime.getMaximum();
worstmethod = LatencyContributorMethod.PROCESSING_TIME;
} else if (!isAssignedDeadline) {
worstCaseValue = executionTime.getMaximum();
worstmethod = LatencyContributorMethod.PROCESSING_TIME;
processingLatencyContributor.reportInfo("Using execution time as deadline was not set");
}
}
if ((worstCaseValue == 0.0) && isAssignedDeadline && report.isWorstCaseDeadline()) {
// use deadline if no execution time and deadline was explicitly assigned
worstCaseValue = deadline;
worstmethod = LatencyContributorMethod.DEADLINE;
}
if ((worstCaseValue == 0.0) && (expected.getMaximum() != 0.0)) {
// use flow latency if neither deadline nor execution time
worstCaseValue = expected.getMaximum();
worstmethod = LatencyContributorMethod.SPECIFIED;
} else if (worstCaseValue == 0.0 && deadline != 0.0) {
// if no flow spec value then use default deadline == period
worstCaseValue = deadline;
worstmethod = LatencyContributorMethod.DEADLINE;
processingLatencyContributor.reportInfo("Using deadline as execution time was not set");
}
/**
* Selection of the best case value, generic cases.
*/
bestmethod = LatencyContributorMethod.UNKNOWN;
if (responseTime.getMinimum() != 0.0) {
bestCaseValue = responseTime.getMinimum();
bestmethod = LatencyContributorMethod.RESPONSE_TIME;
} else if (executionTime.getMinimum() != 0.0) {
bestCaseValue = executionTime.getMinimum();
bestmethod = LatencyContributorMethod.PROCESSING_TIME;
}
if ((bestCaseValue == 0.0) && (expected.getMinimum() != 0.0)) {
bestCaseValue = expected.getMinimum();
bestmethod = LatencyContributorMethod.SPECIFIED;
}
// take into account queuing delay
if (incomingConnectionFI != null) {
double qs = 0;
LatencyContributorComponent ql = new LatencyContributorComponent(componentInstance, flowElementInstance, report.isMajorFrameDelay());
if (hasAssignedPropertyValue(incomingConnectionFI, org.osate.xtext.aadl2.properties.util.CommunicationProperties.QUEUE_SIZE)) {
qs = CommunicationProperties.getQueueSize(incomingConnectionFI).orElse(0);
} else if (incomingConnectionFI.getCategory() == FeatureCategory.DATA_PORT && isThreadOrDevice && (InstanceModelUtil.isSporadicComponent(componentInstance) || InstanceModelUtil.isTimedComponent(componentInstance) || InstanceModelUtil.isAperiodicComponent(componentInstance))) {
// treat data port as a port of queue size 1 when not a sampling thread
qs = 1;
ql.reportInfo("Data port as queue size 1 for sporadic, aperiodic, timed dispatch");
}
if (qs != 0) {
// take into account queuing delay on event and event data ports.
double dl = 0.0;
if (InstanceModelUtil.isSporadicComponent(componentInstance) || InstanceModelUtil.isPeriodicComponent(componentInstance)) {
dl = period;
ql.reportInfo("Sporadic or periodic has period delay per queue element");
} else {
dl = worstCaseValue;
}
double queuingDelay = qs * dl;
ql.setMaximum(queuingDelay);
if (report.isBestcaseEmptyQueue()) {
ql.setMinimum(0.0);
ql.reportInfo("Assume best case empty queue");
} else {
double mindl = (InstanceModelUtil.isSporadicComponent(componentInstance) || InstanceModelUtil.isPeriodicComponent(componentInstance) ? period : bestCaseValue);
ql.setMinimum(qs * mindl);
ql.reportInfo("Assume best case full queue");
}
ql.setWorstCaseMethod(LatencyContributorMethod.QUEUED);
ql.setBestCaseMethod(LatencyContributorMethod.QUEUED);
entry.addContributor(ql);
}
}
processingLatencyContributor.setWorstCaseMethod(worstmethod);
processingLatencyContributor.setBestCaseMethod(bestmethod);
processingLatencyContributor.setMaximum(worstCaseValue);
processingLatencyContributor.setMinimum(bestCaseValue);
processingLatencyContributor.setExpectedMaximum(expected.getMaximum());
processingLatencyContributor.setExpectedMinimum(expected.getMinimum());
if (checkLastImmediate && deadline > 0.0) {
processingLatencyContributor.setImmediateDeadline(deadline);
}
processingLatencyContributor.checkConsistency();
entry.addContributor(processingLatencyContributor);
}
use of org.osate.aadl2.instance.EndToEndFlowInstance in project osate2 by osate.
the class FlowLatencyAnalysisSwitch method invokeOnSOM.
/**
* Invoke the analysis on all ETEF in system instance and return Result collection
*
* @param ci The component instance that owns the end to end flow instances
* @param som The mode to run the analysis in.
* @param asynchronousSystem Whether the system is treated as asynchronous
* @param majorFrameDelay Whether partition output is performed at a major frame (as opposed to the partition end)
* @param worstCaseDeadline Use deadline based processing (as opposed to max compute execution time)
* @param bestCaseEmptyQueue Assume empty queue (instead of full)
* @return A populated report in AnalysisResult format.
*
* @since org.osate.analysis.flows 3.0
*/
// NB. Called by CheckFlowLatency
public void invokeOnSOM(SystemInstance si, SystemOperationMode som, boolean asynchronousSystem, boolean majorFrameDelay, boolean worstCaseDeadline, boolean bestCaseEmptyQueue, boolean disableQueuingLatency) {
List<EndToEndFlowInstance> alletef = EcoreUtil2.getAllContentsOfType(si, EndToEndFlowInstance.class);
for (EndToEndFlowInstance etef : alletef) {
invokeOnSOM(etef, som, asynchronousSystem, majorFrameDelay, worstCaseDeadline, bestCaseEmptyQueue, disableQueuingLatency);
}
// Issue 1148
fillInQueuingTimes(si);
}
Aggregations