Commit 69b6b902 authored by De Viry Guilhem's avatar De Viry Guilhem

Commit local, annulation de modifications mineures

parent b10971a1
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=10
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=10
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=10
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=10
......@@ -41,17 +41,6 @@
<labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
</endLabelStyleDescription>
</computedStyleDescriptions>
<computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_D6TnAHWLEemrGdf5UgZWiQ" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1">
<borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='red']"/>
<labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='red']"/>
<color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</computedStyleDescriptions>
<computedStyleDescriptions xmi:type="style:FlatContainerStyleDescription" xmi:id="_D6jeoHWLEemrGdf5UgZWiQ" arcWidth="8" arcHeight="8" borderSizeComputationExpression="1" tooltipExpression="service:renderTooltip" roundedCorner="true" widthComputationExpression="12" heightComputationExpression="10" backgroundStyle="Liquid">
<borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='red']"/>
<labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='red']"/>
<backgroundColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
<foregroundColor xmi:type="description:UserFixedColor" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@userColorsPalettes[name='Ecore%20Palette']/@entries[name='EClass']"/>
</computedStyleDescriptions>
</data>
</ownedAnnotationEntries>
<ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_jGwGMC8REemUD62u2ND_rQ" source="GMF_DIAGRAMS">
......@@ -132,10 +121,6 @@
<styles xmi:type="notation:FontStyle" xmi:id="_C5dH4UQQEemrwoRpiiTFJA" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_C5dH4kQQEemrwoRpiiTFJA"/>
</children>
<children xmi:type="notation:Node" xmi:id="_D66D8HWLEemrGdf5UgZWiQ" type="3010" element="_D6SY4HWLEemrGdf5UgZWiQ">
<styles xmi:type="notation:FontStyle" xmi:id="_D66D8XWLEemrGdf5UgZWiQ" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_D66D8nWLEemrGdf5UgZWiQ"/>
</children>
<styles xmi:type="notation:SortingStyle" xmi:id="_TV0UAkQNEemrwoRpiiTFJA"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_TV0UA0QNEemrwoRpiiTFJA"/>
</children>
......@@ -472,13 +457,15 @@
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_TVj1UEQNEemrwoRpiiTFJA" name="Guard" tooltipText="&#xA;ERROR : The default value literal 'new EMap&lt;new EString(), new EString()>()' must be a valid literal of the attribute's type&#xA;ERROR : The attribute 'Guard.Dictionary' is not transient so it must have a data type that is serializable&#xA;WARNING : The generic type associated with the 'EMap' classifier should have 2 type argument(s) to match the number of type parameter(s) of the classifier " incomingEdges="_Ll87sl-gEemRWcGjpF2T8A _Hm05UGtJEemJMoCNZztO6w" width="12" height="10">
<ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_TVj1UEQNEemrwoRpiiTFJA" name="Guard" tooltipText="" incomingEdges="_Ll87sl-gEemRWcGjpF2T8A _Hm05UGtJEemJMoCNZztO6w" width="12" height="10">
<target xmi:type="ecore:EClass" href="fsm.ecore#//Guard"/>
<semanticElements xmi:type="ecore:EClass" href="fsm.ecore#//Guard"/>
<arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
<arrangeConstraints>KEEP_SIZE</arrangeConstraints>
<arrangeConstraints>KEEP_RATIO</arrangeConstraints>
<ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_D6kFsHWLEemrGdf5UgZWiQ" labelColor="239,41,41" description="_D6jeoHWLEemrGdf5UgZWiQ" borderSize="1" borderSizeComputationExpression="1" borderColor="239,41,41" backgroundStyle="Liquid" foregroundColor="255,252,216"/>
<ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_6Tf4QHWfEemHx_Qya0bWOA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
<description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
</ownedStyle>
<actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
<ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_C5N3UEQQEemrwoRpiiTFJA" name="name : EString" tooltipText="">
<target xmi:type="ecore:EAttribute" href="fsm.ecore#//Guard/name"/>
......@@ -488,12 +475,6 @@
</ownedStyle>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
</ownedElements>
<ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_D6SY4HWLEemrGdf5UgZWiQ" name="Dictionary : EMap = new EMap&lt;new EString(), new EString()>()" tooltipText="&#xA;ERROR : The default value literal 'new EMap&lt;new EString(), new EString()>()' must be a valid literal of the attribute's type&#xA;ERROR : The attribute 'Guard.Dictionary' is not transient so it must have a data type that is serializable&#xA;WARNING : The generic type associated with the 'EMap' classifier should have 2 type argument(s) to match the number of type parameter(s) of the classifier ">
<target xmi:type="ecore:EAttribute" href="fsm.ecore#//Guard/Dictionary"/>
<semanticElements xmi:type="ecore:EAttribute" href="fsm.ecore#//Guard/Dictionary"/>
<ownedStyle xmi:type="diagram:BundledImage" xmi:id="_D6UOEHWLEemrGdf5UgZWiQ" labelColor="239,41,41" labelAlignment="LEFT" description="_D6TnAHWLEemrGdf5UgZWiQ" borderColor="239,41,41"/>
<actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
</ownedElements>
</ownedDiagramElements>
<ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Ll21EF-gEemRWcGjpF2T8A" name="[1..1] initialState" sourceNode="_o0qEMC8REemUD62u2ND_rQ" targetNode="_7IzxAC8REemUD62u2ND_rQ">
<target xmi:type="ecore:EReference" href="fsm.ecore#//FSM/initialState"/>
......
......@@ -50,7 +50,5 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Guard">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Dictionary" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap"
defaultValueLiteral="new EMap&lt;new EString(), new EString()>()"/>
</eClassifiers>
</ecore:EPackage>
[comment encoding = UTF-8 /]
[module generateAction('http://fr.supelec.plong9.fsm')]
[template public generateAction(aFSM : FSM)]
[for (action : Action | aFSM.ownedActions)]
[if not (action.name = 'DisconnectClientAction')]
[file (aFSM.name + '/' + action.name.toUpper() + '.java', false, 'UTF-8')]
package [aFSM.name/]
import java.io.IOException;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import fsm.Action;
import fsm.Event;
import fsm.FSM;
[if (aFSM.isServer)]
import fsm.FSMServer;
[else]
import fsm.FSMClient;
[/if]
public class [action.name.toUpper()/] extends Action {
@Override
public void execute(FSM fsm, Event e) {
[if (aFSM.isServer)]
var dos = ((FSMServer)fsm).getNetworkServer().getOutputStreamByClient(e.origin);
[else]
var dos = ((FSMClient)fsm).getNetworkClient().getOutputStream();
[/if]
// [protected ('for ' + action.name + ' contents')]
// TODO : Action contents
// [/protected]
}
}
[/file]
[/if]
[/for]
[/template]
[comment encoding = UTF-8 /]
[module generateGuard('http://fr.supelec.plong9.fsm')]
[template public generateGuard(aFSM : FSM)]
[file (aFSM.name, false, 'UTF-8')]
[/file]
[/template]
package PongServer
import java.io.IOException;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import fsm.Action;
import fsm.Event;
import fsm.FSM;
import fsm.FSMServer;
public class PONGACTION extends Action {
@Override
public void execute(FSM fsm, Event e) {
var dos = ((FSMServer)fsm).getNetworkServer().getOutputStreamByClient(e.origin);
// Start of user code for PongAction contents
// lala
// End of user code
}
}
package PongServer
import java.io.IOException;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import fsm.Action;
import fsm.Event;
import fsm.FSM;
import fsm.FSMServer;
public class PONGACTION2 extends Action {
@Override
public void execute(FSM fsm, Event e) {
var dos = ((FSMServer)fsm).getNetworkServer().getOutputStreamByClient(e.origin);
// Start of user code for PongAction2 contents
// TODO : Action contents
// End of user code
}
}
package PongServer
import java.io.IOException;
import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream;
import fsm.Action;
import fsm.Event;
import fsm.FSM;
import fsm.FSMServer;
public class TIMEOUTACTION extends Action {
@Override
public void execute(FSM fsm, Event e) {
var dos = ((FSMServer)fsm).getNetworkServer().getOutputStreamByClient(e.origin);
// Start of user code for TimeoutAction contents
// TODO : Action contents
// End of user code
}
}
package PongServer;
import java.util.logging.Level;
import fsm.FSMServer;
import fsm.State;
import fsm.Transition;
import PongServer.TIMEOUTACTION;
import PongServer.PONGACTION;
import fsm.DisconnectClientAction;
import PongServer.PONGACTION2;
public class main {
public static void main(String[] args) {
FSMServer fsm = new FSMServer("PongServer", (dis, f) -> new NetworkMessageParser(dis, f), 50300, "serverpw");
fsm.LOGGER.setLevel(Level.INFO);
State state_attenteconnexion = new State("AttenteConnexion");
State state_attente = new State("Attente");
State state_end = new State("End");
Transition trans_connexionrecue = new Transition("connexionRecue");
trans_connexionrecue.setSource(AttenteConnexion);
trans_connexionrecue.setTarget(Attente);
trans_connexionrecue.registerEvent("newConnection");
Transition trans_timeout = new Transition("timeout");
trans_timeout.setSource(AttenteConnexion);
trans_timeout.setTarget(End);
trans_timeout.registerEvent("timeoutConnection");
trans_timeout.registerAction(new TIMEOUTACTION());
Transition trans_reception1 = new Transition("reception1");
trans_reception1.setSource(Attente);
trans_reception1.setTarget(AttenteConnexion);
trans_reception1.registerEvent("ping");
trans_reception1.registerAction(new PONGACTION());
trans_reception1.registerAction(new DISCONNECTCLIENTACTION());
trans_reception1.registerGuard(new PONGGUARD());
Transition trans_reception2 = new Transition("reception2");
trans_reception2.setSource(Attente);
trans_reception2.setTarget(AttenteConnexion);
trans_reception2.registerEvent("ping");
trans_reception2.registerAction(new PONGACTION2());
trans_reception2.registerAction(new DISCONNECTCLIENTACTION());
fsm.addState(state_attenteconnexion);
fsm.addState(state_attente);
fsm.addState(state_end);
fsm.setInitialState(state_attenteconnexion);
fsm.setFinalState(state_attenteconnexion);
fsm.start();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment