import mecsyco.core.operation.event.EventOperation; import mecsyco.core.type.SimulData; import mecsyco.core.type.SimulEvent; public class DataOperationTemplate extends EventOperation{ /* * Constructor * You can have empty, depend on if you want a flexible operation or a fixed one * (fixed because in any case, the operation will be exactly the same) * here, we use a constructor for flexible operation */ public DataOperationTemplate (Type1 aVars1, Type2 aVars2) { Vars1=aVars1; Vars2=aVars2; } /* *Implementation *In the case of flexible, create variable for the operation */ private Type1 Var1; private Type2 var2; @Override public SimulData apply (SimulEvent aEvent) { /*the result, can be any SimulData type you want *(for example, the freshly made type done in the "User Guide: SimulData manipulation" */ DataTypeTemplate result; //extract the simulData from SimulEvent. Instead of SimulData, you can precise //the exact SimulData type and then use methods you or we had implemented SimulData data=aEvent.getData(); /* * Operation you want to do * For making it flexible, use variables you created (Vars1 and Vars 2 here) * Do not forget to assign the result of the operation in the variable "result" */ return result; } }