Class IndirectionSimulationUtil
java.lang.Object
org.palladiosimulator.indirections.scheduler.util.IndirectionSimulationUtil
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
addParameterToStackFrameWithCopying
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> contextStackFrame, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, String parameterName, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> targetStackFrame) Same asSimulatedStackHelper.addParameterToStackFrame(SimulatedStackframe, EList, SimulatedStackframe)
but defaults for the parameters.static IndirectionDate
claimDataFromStack
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String id) static IndirectionDate
createData
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> contextStack, Iterable<org.palladiosimulator.pcm.parameter.VariableUsage> variableUsages, Collection<Double> time) createDataEntries
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> contextStack, Iterable<org.palladiosimulator.pcm.parameter.VariableUsage> variableUsages) static void
createNewDataOnStack
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String id, IndirectionDate date) static void
flatResolveTimes
(Object timeDependency, List<Double> times) flatResolveTimes
(List<Object> timeDependencies) static void
flattenDataOnStack
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String baseName, IndirectionDate date) static String
forceGetParameter
(String parameterName, JavaClassDataChannel dataChannel) static boolean
getBooleanParameter
(JavaClassDataChannel dataChannel, String parameterName) static double
getDoubleParameter
(JavaClassDataChannel dataChannel, String parameterName) static int
getIntegerParameter
(JavaClassDataChannel dataChannel, String parameterName) static org.palladiosimulator.pcm.repository.Parameter
getOneParameter
(org.palladiosimulator.pcm.repository.EventGroup eventGroup) static String
getStringParameter
(JavaClassDataChannel dataChannel, String parameterName) static de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object>
indirectionDateToStackframe
(String baseName, IndirectionDate date) static <T extends org.palladiosimulator.pcm.core.entity.Entity>
Tstatic void
makeDateInformationAvailableOnStack
(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String referenceName) static void
requireExactNumberOfSinkSourceRoles
(DataChannel dataChannel, int sinkRoleNumber, int sourceRoleNumber) static void
requireNumberOfSinkSourceRoles
(DataChannel dataChannel, Predicate<Integer> sinkRoleCheck, String sinkRoleCheckDescription, Predicate<Integer> sourceRoleCheck, String sourceRoleCheckDescription) static String
rewriteVariableNamePrefix
(String variableName, String incomingParameterName, String outgoingParameterName) Changes the prefix in the given variable name from the parameter name of the incoming event type to the one of the outgoing event type.toConfigMap
(Collection<String> entries) static de.uka.ipd.sdq.simucomframework.entities.SimuComEntity
triggerOnce
(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, double delay, Runnable taskToRun) static org.palladiosimulator.simulizar.simulationevents.PeriodicallyTriggeredSimulationEntity
triggerPeriodically
(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, double firstOccurrence, double delay, Runnable taskToRun) static void
validateIndirectionDateStructure
(IndirectionDate date, DataInterface dataInterface) static void
validateStackframeStructure
(Map<String, Object> dataMap, String parameterName)
-
Method Details
-
addParameterToStackFrameWithCopying
public static final void addParameterToStackFrameWithCopying(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> contextStackFrame, EList<org.palladiosimulator.pcm.parameter.VariableUsage> parameter, String parameterName, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> targetStackFrame) Same asSimulatedStackHelper.addParameterToStackFrame(SimulatedStackframe, EList, SimulatedStackframe)
but defaults for the parameters. Additionally, it can copy all characterizations for a type by specifying a reference name of: input->output- Parameters:
parameterName
-
-
claimDataFromStack
public static IndirectionDate claimDataFromStack(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String id) -
createData
public static IndirectionDate createData(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> contextStack, Iterable<org.palladiosimulator.pcm.parameter.VariableUsage> variableUsages, Collection<Double> time) -
createDataEntries
-
createNewDataOnStack
public static void createNewDataOnStack(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String id, IndirectionDate date) -
indirectionDateToStackframe
public static de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> indirectionDateToStackframe(String baseName, IndirectionDate date) -
flattenDataOnStack
public static void flattenDataOnStack(de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStack<Object> stack, String baseName, IndirectionDate date) -
getOneParameter
public static org.palladiosimulator.pcm.repository.Parameter getOneParameter(org.palladiosimulator.pcm.repository.EventGroup eventGroup) -
initName
public static <T extends org.palladiosimulator.pcm.core.entity.Entity> T initName(T entity, String name) -
initName
public static <T extends de.uka.ipd.sdq.identifier.Identifier> T initName(T identifier, String name) -
makeDateInformationAvailableOnStack
-
rewriteVariableNamePrefix
public static String rewriteVariableNamePrefix(String variableName, String incomingParameterName, String outgoingParameterName) Changes the prefix in the given variable name from the parameter name of the incoming event type to the one of the outgoing event type. -
triggerPeriodically
public static org.palladiosimulator.simulizar.simulationevents.PeriodicallyTriggeredSimulationEntity triggerPeriodically(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, double firstOccurrence, double delay, Runnable taskToRun) -
triggerOnce
public static de.uka.ipd.sdq.simucomframework.entities.SimuComEntity triggerOnce(de.uka.ipd.sdq.simucomframework.model.SimuComModel model, double delay, Runnable taskToRun) -
validateIndirectionDateStructure
public static void validateIndirectionDateStructure(IndirectionDate date, DataInterface dataInterface) -
validateStackframeStructure
-
requireNumberOfSinkSourceRoles
-
requireExactNumberOfSinkSourceRoles
public static void requireExactNumberOfSinkSourceRoles(DataChannel dataChannel, int sinkRoleNumber, int sourceRoleNumber) -
getDoubleParameter
-
getIntegerParameter
-
getBooleanParameter
-
getStringParameter
-
forceGetParameter
-
toConfigMap
-
flatResolveTimes
-
flatResolveTimes
-