diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/InputLayer.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/InputLayer.scala
index 3f78b399bdbff7dcf50441035293f025b26c6148..195d015c3fd88f16e43601aaed00ebba013c2180 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/InputLayer.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/InputLayer.scala
@@ -4,9 +4,10 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp
import fr.univ_lille.cristal.emeraude.n2s3.core.Neuron.NeuronMessage
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.WrapMessage
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{EventHolder, EventHolderMessage, LabelChangeEvent, LabelChangeResponse}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
import fr.univ_lille.cristal.emeraude.n2s3.features.io.input.StreamSupport
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Observable, ObservableMessage}
import fr.univ_lille.cristal.emeraude.n2s3.support.io._
import scala.annotation.tailrec
@@ -19,7 +20,7 @@ object AskRemainInput extends Message
/**
* Specialization of the NetworkContainer for the input layer
*/
-class InputLayer(stream: StreamSupport[_, InputSeq[N2S3Input]]) extends NetworkContainer with EventHolder {
+class InputLayer(stream: StreamSupport[_, InputSeq[N2S3Input]]) extends NetworkContainer with Observable {
/********************************************************************************************************************
* Declaration of events
@@ -66,7 +67,7 @@ class InputLayer(stream: StreamSupport[_, InputSeq[N2S3Input]]) extends NetworkC
}
case AskRemainInput =>
sender.send(WrapMessage(!stream.atEnd()))
- case m: EventHolderMessage =>
+ case m: ObservableMessage =>
processEventHolderMessage(m)
case _ => super.receiveMessage(message, sender)
}
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Neuron.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Neuron.scala
index c5f684567c75499cfee93bd4be9f61f59d1a3292..5c6924f50aa03f545f56e5961f022da116d41104 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Neuron.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Neuron.scala
@@ -9,8 +9,9 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.NetworkEntity.AskReference
import fr.univ_lille.cristal.emeraude.n2s3.core.NeuronConnection.ConnectionEnds
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.{Done, SynchronizedMessage}
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.WrapMessage
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{EventHolder, EventHolderMessage, NeuronFireEvent}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Observable, ObservableMessage}
import scala.collection.mutable
import scala.language.postfixOps
@@ -173,7 +174,7 @@ trait NeuronModel {
* The connection object is always stored in the output neuron.
* All connection are managed by a synchronizer
*/
-trait Neuron extends NetworkEntity with EventHolder with PropertyHolder with Serializable {
+trait Neuron extends NetworkEntity with Observable with PropertyHolder with Serializable {
import Neuron._
@@ -320,7 +321,7 @@ trait Neuron extends NetworkEntity with EventHolder with PropertyHolder with Ser
* *****************************************************************************************************************/
/**
- * Redirect EventHolderMessage and PropertyMessage to their process method
+ * Redirect ObservableMessage and PropertyMessage to their process method
* Handle CreateNeuronConnectionWith and CreateNeuronInputConnectionWith messages for the connection creation
* manage NeuronMessage by redirect content to the processSomaMessage method
*
@@ -328,7 +329,7 @@ trait Neuron extends NetworkEntity with EventHolder with PropertyHolder with Ser
* @param sender is a reference of the sender, which can be used to send response
*/
def receiveMessage(message : Message, sender : NetworkEntityReference) : Unit = message match {
- case m : EventHolderMessage => processEventHolderMessage(m)
+ case m : ObservableMessage => processEventHolderMessage(m)
case m : PropertyMessage => processPropertyMessage(m, sender)
/********************************************************************************************************************
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Synchronizer.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Synchronizer.scala
index dfdac32f7751436c8554c24607e5d4d20941e6b7..81cb377714140ae1d92f3b225a7cd81a90dfbb5d 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Synchronizer.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Synchronizer.scala
@@ -4,12 +4,11 @@
***********************************************************************************************************/
package fr.univ_lille.cristal.emeraude.n2s3.core
-import akka.actor.{Identify, Props}
-import fr.univ_lille.cristal.emeraude.n2s3.core
+import akka.actor.Props
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors._
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{Event, EventHolder, EventTriggered}
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.{ActorCompanion, Message, PropsBuilder, UnhandledMessageException}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Event, EventTriggered, Observable}
/**
* Synchronizer companion object
@@ -102,7 +101,7 @@ object Synchronizer {
* Furthermore, synchronizer is responsible to ask input for new events when the number of remain messages
* falls below a threshold
*/
-class Synchronizer extends NetworkEntity with EventHolder {
+class Synchronizer extends NetworkEntity with Observable {
import Synchronizer._
@@ -265,7 +264,7 @@ class Synchronizer extends NetworkEntity with EventHolder {
case WaitEndOfActivity =>
if (this.isActive){
sender.disableAutoResponse()
- subscribeTo(sender, WaitComputationEvent) }
+ addSubscription(sender, WaitComputationEvent) }
else {
sender.send(WaitComputationEvent.defaultResponse)
}
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Unit.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Unit.scala
index 0b42aeca9262ae7671e8c49667fdf25d9ac8d413..522c225f5c0aceb149599c82753c79a5319788aa 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Unit.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/Unit.scala
@@ -41,9 +41,9 @@ case class Time(timestamp : Timestamp) {
}
class TimeUnit(val value : Double) {
- def Second = new Time((value*1e6).toInt)
- def MilliSecond = new Time((value*1e3).toInt)
- def MicroSecond = new Time(value.toInt)
+ def Second = Time((value*1e6).toInt)
+ def MilliSecond = Time((value*1e3).toInt)
+ def MicroSecond = Time(value.toInt)
}
object UnitCast {
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Event.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Event.scala
deleted file mode 100644
index 389d592b3f3ef37c2e6e0d88d5553e92f904b575..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Event.scala
+++ /dev/null
@@ -1,22 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-/**
- * Basic class for all events.
- *
- * @tparam Response is the type of the Response of the event
- */
-abstract class Event[Response <: EventResponse] extends Serializable {
-
- /**
- * When this parameter return true, all event observers will be removed after that event is trigger
- */
- def isSingleUsage : Boolean = false
-
- /**
- * Return a default response if none is given to the trigger method.
- *
- * @throws UnsupportedOperationException by default if subclasses don't override this method
- */
- def defaultResponse : Response = throw new UnsupportedOperationException
-
-}
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolder.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolder.scala
deleted file mode 100644
index 21a1227d641c57afcc54bdca8b08bd87a505c974..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolder.scala
+++ /dev/null
@@ -1,133 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.{NetworkEntityPath, NetworkEntityReference}
-import fr.univ_lille.cristal.emeraude.n2s3.core.exceptions.EventNotFoundException
-
-import scala.collection.mutable
-import scala.collection.mutable.ArrayBuffer
-
-/**
- * Class which have a behavior close of Observable design pattern
- * Output entities can subscribe to available events of the subclass
- */
-trait EventHolder {
-
- /**
- * Contains the list of declared event, associated with all observers
- */
- private val events = mutable.HashMap[Event[_ <: EventResponse], mutable.ArrayBuffer[NetworkEntityReference]]()
- private val synchronizedEvents = mutable.HashMap[TimedEvent[_ <: TimedEventResponse], mutable.ArrayBuffer[(NetworkEntityReference, NetworkEntityPath, NetworkEntityReference)]]()
-
- /**
- * This method allow to declare an event which can be handled
- *
- * @param event is the type of the event
- */
- def addEvent(event : Event[_ <: EventResponse]): Unit = {
- events += event -> ArrayBuffer[NetworkEntityReference]()
-
- if(event.isInstanceOf[TimedEvent[_]])
- synchronizedEvents += event.asInstanceOf[TimedEvent[TimedEventResponse]] -> ArrayBuffer[(NetworkEntityReference, NetworkEntityPath, NetworkEntityReference)]()
- }
-
- /**
- * Subscribe an observer to the specified event
- *
- * @param entity is the entity which will receive response when event is triggered
- * @param event is the event to be observed
- * @throws EventNotFoundException is the event is not declared in this class
- */
- def subscribeTo(entity : NetworkEntityReference, event : Event[_ <: EventResponse]) : Unit = {
- events.get(event) match {
- case Some(list) => list += entity
- case None => throw new EventNotFoundException(event, this.getClass)
- }
- }
-
- /**
- * Subscribe an observer to the specified event. Triggered message will pass through the synchronizer
- *
- * @param entity is the entity which will receive response when event is triggered
- * @param event is the event to be observed
- * @throws EventNotFoundException is the event is not declared in this class
- */
- def subscribeSynchronizedTo(entity : NetworkEntityReference, event : TimedEvent[_ <: TimedEventResponse], synchronizer : NetworkEntityPath) : Unit = {
- synchronizedEvents.get(event) match {
- case Some(list) => list += ((referenceToSynchronizer(synchronizer), synchronizer, entity))
- case None => throw new EventNotFoundException(event, this.getClass)
- }
- }
-
- /**
- * Unsubscribe an observer to the specified event
- *
- * @param entity is the entity which will receive response when event is triggered
- * @param event is the event to be observed
- * @throws EventNotFoundException is the event is not declared in this class
- */
- def unsubscribeTo(entity : NetworkEntityReference, event : Event[_ <: EventResponse]) : Unit = {
- events.get(event) match {
- case Some(list) => list -= entity
- case None => throw new EventNotFoundException(event, this.getClass)
- }
- events.getOrElseUpdate(event, ArrayBuffer[NetworkEntityReference]())
- }
-
- /**
- * Trigger an event by sent default response of this event to all observers.
- * if this event is single usage, all observers will be removed
- *
- * @param event is the event to trigger
- * @tparam Response is the response type of the event
- */
- def triggerEvent[Response <: EventResponse](event : Event[Response]) : Unit = {
- triggerEventWith(event, event.defaultResponse)
- }
-
- /**
- * Trigger an event by sent specified response to all observers.
- * if this event is single usage, all observers will be removed
- *
- * @param event is the event to trigger
- * @param response is the response which will be sent to observers
- * @tparam Response is the response type of the event
- */
- def triggerEventWith[Response <: EventResponse](event : Event[Response], response : Response) : Unit = {
- events.get(event) match {
- case Some(subscribers) =>
- subscribers.foreach(subscriber => subscriber.send(response))
- if(event.isSingleUsage)
- subscribers.clear()
- case None =>
- }
-
- response match {
- case message : TimedEventResponse =>
- synchronizedEvents.get(event.asInstanceOf[TimedEvent[TimedEventResponse]]) match {
- case Some(subscribers) =>
- subscribers.foreach{ case (synchronizer, path, subscriber) => synchronizer.send(SynchronizedEvent(path, subscriber, message, message.timestamp)) }
- if(event.isSingleUsage)
- subscribers.clear()
- case None =>
- }
- case _ =>
- }
- }
-
- /**
- * method which allow to process all EventHolderMessage
- *
- * @param message is the content
- */
- def processEventHolderMessage(message : EventHolderMessage) : Unit = {
- message match {
- case Subscribe(event, ref) => subscribeTo(ref, event)
- case SubscribeSynchronized(event, ref, synchronizer) =>
- subscribeSynchronizedTo(ref, event, synchronizer)
- case Unsubscribe(event, ref) => unsubscribeTo(ref, event)
- }
- }
-
- def referenceToSynchronizer(synchronizer : NetworkEntityPath) : NetworkEntityReference
-
-}
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolderMessage.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolderMessage.scala
deleted file mode 100644
index 60b650d84c9ed320d88f23d5baaf342f166d0436..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventHolderMessage.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
-
-/***********************************************************************************************
- * SUBSCRIBE AND UNSUBSCRIBE MESSAGES
- **********************************************************************************************/
-abstract class EventHolderMessage extends Message
\ No newline at end of file
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventResponse.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventResponse.scala
deleted file mode 100644
index 2a1d0800f4f8cd1707f2cb642aca5b9b6be1f5f7..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventResponse.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
-
-/*********************************************************************************************************
- * List of event which can be trigger by neuron
- * Event can be added by an entity which inherited from Observable trait.
- * Each event carry a message which it send when the event is triggered by the observable entity
- ********************************************************************************************************/
-
-abstract class EventResponse extends Message
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventTriggered.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventTriggered.scala
deleted file mode 100644
index 1756a9a3ee804712db84220eda2eb49c775948d5..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/EventTriggered.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-/**
- * Default response when a event don't need specific response
- */
-object EventTriggered extends EventResponse
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartEvent.scala
deleted file mode 100644
index 734bd988454ec518891dd0b83baefbace6f13482..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartEvent.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-/**
- * Created by guille on 10/14/16.
- */
-object InputRestartEvent extends Event[InputRestartResponse]
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartResponse.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartResponse.scala
deleted file mode 100644
index 4db3c0a050d6d19053fd904036aa07eea0d0f86b..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/InputRestartResponse.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import akka.actor.ActorRef
-
-/**
- * Created by guille on 10/14/16.
- */
-case class InputRestartResponse(source : ActorRef) extends EventResponse
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeEvent.scala
index b779511d44da57e1a86b6a8eb0f5f96851ebf4ff..fa2719c6c9c3704864b0adac51fa31130077d660 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeEvent.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeEvent.scala
@@ -1,6 +1,8 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.event
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.TimedEvent
+
/**
* Created by guille on 10/14/16.
*/
-object LabelChangeEvent extends TimedEvent[LabelChangeResponse]
+object LabelChangeEvent extends TimedEvent[LabelChangeResponse]
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeResponse.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeResponse.scala
index 5ded130b470078e5e25a86224d280eced46dc6b0..8ae97513f9ae8d9c57c6ce9e9093cd86d7074f6f 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeResponse.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/LabelChangeResponse.scala
@@ -1,6 +1,7 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.event
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.TimedEventResponse
/********************************************************************************************************
* Event triggered when an input has a new label
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireEvent.scala
index 8e79913e384258ec9a1d913b5daaabd95f135122..40d4c5fda9235de65aa2df446464501f1b50b8db 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireEvent.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireEvent.scala
@@ -1,5 +1,7 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.event
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Event
+
/**
* Created by guille on 10/14/16.
*/
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireResponse.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireResponse.scala
index d3084edb786d48cffa6259d997bf59d844772362..e66d9b50e155577a33516cbca2c32b21f0a8cc29 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireResponse.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronFireResponse.scala
@@ -2,6 +2,7 @@ package fr.univ_lille.cristal.emeraude.n2s3.core.event
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
import fr.univ_lille.cristal.emeraude.n2s3.core.NetworkEntityPath
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.EventResponse
/********************************************************************************************************
* Event triggered when a neuron fire
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronUpdateEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronUpdateEvent.scala
index fd1d34fef53b4ff138db891ac7b224cf9fab37e3..06439a3499414fe1b63ebfe537cbc4c5b0d72d79 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronUpdateEvent.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/NeuronUpdateEvent.scala
@@ -1,5 +1,7 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.event
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Event, EventTriggered}
+
/***************************************************************************************************
* Event triggered when update arise in neuron
**************************************************************************************************/
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Subscribe.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Subscribe.scala
deleted file mode 100644
index 0ef3b74f3fcb6302be7eaef5c729ad8f1d1f83cb..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Subscribe.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.NetworkEntityReference
-
-/** Subscribe an actor to an event */
-case class Subscribe(event : Event[_ <: EventResponse], ref : NetworkEntityReference) extends EventHolderMessage
\ No newline at end of file
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SubscribeSynchronized.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SubscribeSynchronized.scala
deleted file mode 100644
index a41397ccb29db5129aa78aefafe4f7256ca13672..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SubscribeSynchronized.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.{NetworkEntityPath, NetworkEntityReference}
-
-/** Subscribe an actor to an event and send the triggered event though a synchronizer */
-case class SubscribeSynchronized(event : TimedEvent[_ <: TimedEventResponse], ref : NetworkEntityReference, synchronizer: NetworkEntityPath) extends EventHolderMessage
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynapseUpdateEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynapseUpdateEvent.scala
index b522c6f0d1bad6f9d4b1160b060f64fd24e8f232..4b4a3236f166904da7d1db6888247925d8df428f 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynapseUpdateEvent.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynapseUpdateEvent.scala
@@ -1,5 +1,7 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.event
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Event, EventTriggered}
+
/***************************************************************************************************
* Event triggered when update arise in synapse
**************************************************************************************************/
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynchronizedEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynchronizedEvent.scala
deleted file mode 100644
index 0415dffe0efd4bdc6a9e4a951669e0586d252715..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/SynchronizedEvent.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp
-import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.SynchronizedMessage
-import fr.univ_lille.cristal.emeraude.n2s3.core.{NetworkEntityPath, NetworkEntityReference}
-import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
-
-/**
- * Created by guille on 10/20/16.
- */
-case class SynchronizedEvent(synchronizer : NetworkEntityPath, override val postSync : NetworkEntityReference, override val message : Message, override val timestamp : Timestamp) extends SynchronizedMessage
\ No newline at end of file
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEvent.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEvent.scala
deleted file mode 100644
index 1676e4fafafbda3d146f350fb3dfc14d5b6dc3d9..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEvent.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-/**
- * Created by guille on 10/20/16.
- */
-abstract class TimedEvent[Response <: TimedEventResponse] extends Event[Response]
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEventResponse.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEventResponse.scala
deleted file mode 100644
index bddd3b2b0d79e522bc106e7d549d2407d58bbfca..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/TimedEventResponse.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
-
-/**
- * Created by guille on 10/20/16.
- */
-abstract class TimedEventResponse extends EventResponse {
- val timestamp : Timestamp
-}
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Unsubscribe.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Unsubscribe.scala
deleted file mode 100644
index fef6cc7dee9da4c70b44f3a5ed5ed083b99e737d..0000000000000000000000000000000000000000
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/event/Unsubscribe.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package fr.univ_lille.cristal.emeraude.n2s3.core.event
-
-import fr.univ_lille.cristal.emeraude.n2s3.core.NetworkEntityReference
-
-/** Unsubscribe an actor to an event */
-case class Unsubscribe(event : Event[_ <: EventResponse], ref : NetworkEntityReference) extends EventHolderMessage
\ No newline at end of file
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/exceptions/EventNotFoundException.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/exceptions/EventNotFoundException.scala
index d60a38a292e9463c35028bdeb7a2e9753d41447e..dadb80bcb4eee26a4edf2ae20c3198c1bc7ecb0a 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/exceptions/EventNotFoundException.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/exceptions/EventNotFoundException.scala
@@ -1,6 +1,6 @@
package fr.univ_lille.cristal.emeraude.n2s3.core.exceptions
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.Event
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Event
/**
* Created by falezp on 06/06/16.
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitor.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitor.scala
index 42e6a9d72917340b0492f8afeed266ec99b4d0db..b035870d3592b3483ed724cd1a0a172a035b1316 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitor.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitor.scala
@@ -12,6 +12,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.event._
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Subscribe, Unsubscribe}
import scala.collection.mutable
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitorRef.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitorRef.scala
index 9acdd0c2af2180d2a725168fa6301da094146f28..edda73094d07acf13bd35404a45e728042ef2611 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitorRef.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/io/report/BenchmarkMonitorRef.scala
@@ -5,15 +5,16 @@
package fr.univ_lille.cristal.emeraude.n2s3.features.io.report
import akka.actor.{ActorRef, Props}
-import fr.univ_lille.cristal.emeraude.n2s3.core._
-
-import scala.concurrent.Await
import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
+import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.Config
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.LabelChangeEvent
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.{N2S3, NeuronGroupObserverRef, NeuronGroupRef}
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
+
+import scala.concurrent.Await
class BenchmarkMonitorRef(neuronGroup: NeuronGroupRef) extends NeuronGroupObserverRef {
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/BackPropagation.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/BackPropagation.scala
index 09f34d3a3b1a03676534164698532ab7246dd907..3e5e9e5f536514a8c6cca943a70c0c9204b091c1 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/BackPropagation.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/BackPropagation.scala
@@ -9,10 +9,11 @@ import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.{Next, WaitEndOfActivity}
import fr.univ_lille.cristal.emeraude.n2s3.core.{ExternalSender, GetProperty, NetworkEntityPath, PropertyValue, _}
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, WrapMessage}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.NeuronLayer
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.graph.ValuesGraph
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.{AbstractActorSystem, LocalActorDeploymentStrategy, PropsBuilder}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.collection.mutable
import scala.concurrent.Await
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikeCounter.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikeCounter.scala
index 9a0907c08b594e0a01c4ce1f12a1f983e752de68..b6038040a73eca6461609f34ca2acb9c86c25cb2 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikeCounter.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikeCounter.scala
@@ -3,8 +3,9 @@ package fr.univ_lille.cristal.emeraude.n2s3.features.learning
import akka.actor.Actor
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.WrapMessage
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, NeuronFireResponse, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, NeuronFireResponse}
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.collection.mutable
/**
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikingSquareError.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikingSquareError.scala
index a50788e395f1f058546c59450c448754c31d2d71..9bd75df69419ddb621c1def1cab703784dbead67 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikingSquareError.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SpikingSquareError.scala
@@ -5,11 +5,12 @@ import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.{Next, WaitEndOfActivity}
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, WrapMessage}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties.SynapticWeightFloat
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.NeuronLayer
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.graph.ValuesGraph
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.{AbstractActorSystem, LocalActorDeploymentStrategy, PropsBuilder}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.collection.mutable
import scala.concurrent.Await
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SquareError.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SquareError.scala
index d919021baed71245f7797225740aaa9990e4fc17..8f66d94205e0d7bb9281281aa3a50fb2f8655051 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SquareError.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SquareError.scala
@@ -1,21 +1,20 @@
package fr.univ_lille.cristal.emeraude.n2s3.features.learning
-import akka.actor.Actor.Receive
import akka.actor.{Actor, ActorRef, Props}
-import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
+import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.{Next, WaitEndOfActivity}
import fr.univ_lille.cristal.emeraude.n2s3.core._
+import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, WrapMessage}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
+import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties.SynapticWeightFloat
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.NeuronLayer
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.graph.ValuesGraph
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.{AbstractActorSystem, LocalActorDeploymentStrategy, PropsBuilder}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.collection.mutable
-import scala.concurrent.duration._
import scala.concurrent.Await
-import akka.pattern.ask
-import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, WrapMessage}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse, Subscribe}
-import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties.SynapticWeightFloat
+import scala.concurrent.duration._
/**
* Created by falezp on 24/05/16.
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SupervisedSTDPLearning.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SupervisedSTDPLearning.scala
index d26ef3abbbf8275224985ff19ebf528327126577..71c9f68d2f3c1f40ba3ba9d51edc2941b27e8788 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SupervisedSTDPLearning.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/learning/SupervisedSTDPLearning.scala
@@ -7,9 +7,10 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.Neuron.NeuronMessage
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.WrapMessage
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse, SubscribeSynchronized, SynchronizedEvent}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.N2S3
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{SubscribeSynchronized, SynchronizedEvent}
/**
* Created by falezp on 14/10/16.
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/LabelMonitor.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/LabelMonitor.scala
index 1ecbb92facbed531daa57f99c38aa5926a5140cd..6a639b8adcb576d3c500a55982038ae481540592 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/LabelMonitor.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/LabelMonitor.scala
@@ -11,7 +11,8 @@ import scala.collection.mutable.ArrayBuffer
import scala.concurrent.Await
import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{LabelChangeEvent, LabelChangeResponse}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
/**
* Created by falezp on 19/10/16.
*/
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/NeuronLog.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/NeuronLog.scala
index ca3e0456c7ae690ff58f276f5a102d23304ccb24..3f9436d69d42d23f017c52c8e12215e7444aebe9 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/NeuronLog.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/NeuronLog.scala
@@ -9,10 +9,11 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core.UnitTime._
import fr.univ_lille.cristal.emeraude.n2s3.core._
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{InputRestartResponse, NeuronFireEvent, NeuronFireResponse, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, NeuronFireResponse}
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.graph.{InputOutputGraph, NeuronsGraph, ValuesGraph}
import fr.univ_lille.cristal.emeraude.n2s3.models.qbg.NeuronPotentialResponse
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.{ActorCompanion, PropsBuilder, SinglePropsBuilder}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.concurrent.duration._
@@ -32,8 +33,6 @@ class NeuronsFireLogText(filename : String ) extends Actor {
def receive = {
case NeuronFireResponse(timestamp, path) =>
fos.println(path + "\t" + timestamp + "\n")
- case InputRestartResponse(source) =>
- fos.println(source.path.name + " restart\n")
case Done =>
fos.close()
sender ! Done
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SpikeMonitor.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SpikeMonitor.scala
index b65287ecec98d6935a126970f11ef56e3c23216a..86bf8156d4036da9bd6fb0cd4d8b49ecacfb0137 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SpikeMonitor.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SpikeMonitor.scala
@@ -1,17 +1,18 @@
package fr.univ_lille.cristal.emeraude.n2s3.features.logging
import akka.actor.{Actor, Props}
+import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp
-import fr.univ_lille.cristal.emeraude.n2s3.core.actors.Config
+import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core._
+import fr.univ_lille.cristal.emeraude.n2s3.core.actors.Config
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, NeuronFireResponse}
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.N2S3
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.Await
-import akka.pattern.ask
-import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, NeuronFireResponse, Subscribe}
/**
* Created by falezp on 19/10/16.
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SynapseLog.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SynapseLog.scala
index adc9af4e87de08b57a9c2aa008594aa1a626786b..86807447b521cd88ba8d413800988dd4d6665420 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SynapseLog.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/features/logging/SynapseLog.scala
@@ -6,10 +6,10 @@ import akka.actor._
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.WaitEndOfActivity
import fr.univ_lille.cristal.emeraude.n2s3.core.UnitTime._
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.EventTriggered
import fr.univ_lille.cristal.emeraude.n2s3.core.{ExternalSender, NetworkEntityPath, Time}
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.graph.{SynapsesConductancesGraph, SynapsesWeightsBarGraph, ValuesGraph}
import fr.univ_lille.cristal.emeraude.n2s3.models.qbg.SynapseWeightResponse
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.EventTriggered
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
@@ -68,7 +68,7 @@ class SynapsesGraph(step: Int = 50, unit : TimeUnitType = MilliSecond) extends A
event.keys.toList.sortBy(x => x).foreach { k =>
if (k >= beg.timestamp && k <= end.timestamp)
for (i <- 0 until event.get(k).size) {
- graph.addSerie(event.get(k).get(i)._1, convert(unit,new Time(k)), event.get(k).get(i)._2)
+ graph.addSerie(event(k)(i)._1, convert(unit,new Time(k)), event(k)(i)._2)
}
}
graph launchOffline()
@@ -87,7 +87,7 @@ class SynapsesLogGraph(step: Int = 50, unit : TimeUnitType = MilliSecond) extend
def receive = {
case SynapseWeightResponse(t, source, id, value) =>
if (t - lastT > step) {
- graph.refreshSerie(source.path.name + ":" + id, convert(unit,new Time(t)), value)
+ graph.refreshSerie(source.path.name + ":" + id, convert(unit,Time(t)), value)
if (!graph.isRunning())
graph.launch()
lastT = t
@@ -108,8 +108,8 @@ class SynapsesWeightRepartition(sync: NetworkEntityPath) extends Actor {
val graph = new SynapsesConductancesGraph
val fos: FileOutputStream = new FileOutputStream("output/log/synapseRepart.log")
values.keys.foreach { k =>
- fos.write((k + "\t" + values.get(k).get + "\n").map(_.toByte).toArray)
- graph.addSerie(values.get(k).get)
+ fos.write((k + "\t" + values(k) + "\n").map(_.toByte).toArray)
+ graph.addSerie(values(k))
}
graph.launch()
fos.close()
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/models/qbg/Event.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/models/qbg/Event.scala
index da1db9b212402316444b95d51a6d1707c5c32467..00a65c6a105bd85c628a3b397ff5960958d300c6 100644
--- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/models/qbg/Event.scala
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/models/qbg/Event.scala
@@ -6,7 +6,7 @@ package fr.univ_lille.cristal.emeraude.n2s3.models.qbg
import akka.actor._
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{Event, EventResponse}
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.{Event, EventResponse}
/********************************************************************************************************
* Event trigger when potential of neuron change
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Event.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Event.scala
new file mode 100644
index 0000000000000000000000000000000000000000..d4d3767c4eb1222bb8b19031aaa47d4696a12ab7
--- /dev/null
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Event.scala
@@ -0,0 +1,31 @@
+package fr.univ_lille.cristal.emeraude.n2s3.support.event
+
+import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
+import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+
+/**
+ * Represents events that are raised by the simulation at runtime.
+ * When an event happens, the subscriber will receive a message of type [[Response]]
+ */
+abstract class Event[Response <: EventResponse] extends Serializable {
+
+ /**
+ * When true, all subscriptions to this event will be removed after the event is risen
+ */
+ def isSingleUsage : Boolean = false
+
+ /**
+ * Returns a default message to use when this event happens.
+ *
+ * @throws UnsupportedOperationException by default if subclasses don't override this method
+ */
+ def defaultResponse : Response = throw new UnsupportedOperationException
+}
+
+abstract class EventResponse extends Message
+
+abstract class TimedEvent[Response <: TimedEventResponse] extends Event[Response]
+
+abstract class TimedEventResponse extends EventResponse {
+ val timestamp : Timestamp
+}
\ No newline at end of file
diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Observable.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Observable.scala
new file mode 100644
index 0000000000000000000000000000000000000000..5306e76d731f55db390067bd9e0b6be5872741fd
--- /dev/null
+++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/support/event/Observable.scala
@@ -0,0 +1,149 @@
+package fr.univ_lille.cristal.emeraude.n2s3.support.event
+
+import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
+import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.SynchronizedMessage
+import fr.univ_lille.cristal.emeraude.n2s3.core.{NetworkEntityPath, NetworkEntityReference}
+import fr.univ_lille.cristal.emeraude.n2s3.core.exceptions.EventNotFoundException
+import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message
+
+import scala.collection.mutable
+import scala.collection.mutable.ArrayBuffer
+
+/********************************************************************************************************************
+ * Messages
+ ******************************************************************************************************************/
+
+abstract class ObservableMessage extends Message
+object EventTriggered extends EventResponse
+
+case class Subscribe(event : Event[_ <: EventResponse], ref : NetworkEntityReference) extends ObservableMessage
+case class SubscribeSynchronized(event : TimedEvent[_ <: TimedEventResponse], ref : NetworkEntityReference, synchronizer: NetworkEntityPath) extends ObservableMessage
+case class Unsubscribe(event : Event[_ <: EventResponse], ref : NetworkEntityReference) extends ObservableMessage
+
+case class SynchronizedEvent(synchronizer : NetworkEntityPath, override val postSync : NetworkEntityReference, override val message : Message, override val timestamp : Timestamp) extends SynchronizedMessage
+
+/**
+ * Implementation of the Observer design pattern
+ * Users of this trait becomes observables.
+ */
+trait Observable {
+ /**
+ * Contains the list of declared event, associated with all observers
+ */
+ private val events = mutable.HashMap[Event[_ <: EventResponse], mutable.ArrayBuffer[NetworkEntityReference]]()
+ private val synchronizedEvents = mutable.HashMap[TimedEvent[_ <: TimedEventResponse], mutable.ArrayBuffer[(NetworkEntityReference, NetworkEntityPath, NetworkEntityReference)]]()
+
+ /**
+ * Declares an event to be handled by this observable.
+ *
+ * @param event is the type of the event
+ */
+ def addEvent(event : Event[_ <: EventResponse]): Unit = {
+ events += event -> ArrayBuffer[NetworkEntityReference]()
+
+ if(event.isInstanceOf[TimedEvent[_]])
+ synchronizedEvents += event.asInstanceOf[TimedEvent[TimedEventResponse]] -> ArrayBuffer[(NetworkEntityReference, NetworkEntityPath, NetworkEntityReference)]()
+ }
+
+ /**
+ * Subscribes an observer to the specified event
+ *
+ * @param entity is the entity which will receive response when event is triggered
+ * @param event is the event to be observed
+ * @throws EventNotFoundException is the event is not declared in this class
+ */
+ def addSubscription(entity : NetworkEntityReference, event : Event[_ <: EventResponse]) : Unit = {
+ events.get(event) match {
+ case Some(list) => list += entity
+ case None => throw new EventNotFoundException(event, this.getClass)
+ }
+ }
+
+ /**
+ * Subscribes an observer to the specified event. Triggered message will pass through the synchronizer
+ *
+ * @param entity is the entity which will receive response when event is triggered
+ * @param event is the event to be observed
+ * @throws EventNotFoundException is the event is not declared in this class
+ */
+ def addSynchronizedSubscription(entity : NetworkEntityReference, event : TimedEvent[_ <: TimedEventResponse], synchronizer : NetworkEntityPath) : Unit = {
+ synchronizedEvents.get(event) match {
+ case Some(list) => list += ((referenceToSynchronizer(synchronizer), synchronizer, entity))
+ case None => throw new EventNotFoundException(event, this.getClass)
+ }
+ }
+
+ /**
+ * Unsubscribes an observer from an event
+ *
+ * @param entity is the entity which will receive response when event is triggered
+ * @param event is the event to be observed
+ * @throws EventNotFoundException is the event is not declared in this class
+ */
+ def removeSubscription(entity : NetworkEntityReference, event : Event[_ <: EventResponse]) : Unit = {
+ events.get(event) match {
+ case Some(list) => list -= entity
+ case None => throw new EventNotFoundException(event, this.getClass)
+ }
+ events.getOrElseUpdate(event, ArrayBuffer[NetworkEntityReference]())
+ }
+
+ /**
+ * Triggers an event.
+ * Sends the default response of this event to all its observers.
+ * If this event is single usage, remove all subscriptions to it.
+ *
+ * @param event is the event to trigger
+ * @tparam Response is the response type of the event
+ */
+ def triggerEvent[Response <: EventResponse](event : Event[Response]) : Unit = {
+ triggerEventWith(event, event.defaultResponse)
+ }
+
+ /**
+ * Triggers an event with a specific response message.
+ * Sends the specified response to all observers.
+ * If this event is single usage, all observers will be removed
+ *
+ * @param event is the event to trigger
+ * @param response is the response which will be sent to observers
+ * @tparam Response is the response type of the event
+ */
+ def triggerEventWith[Response <: EventResponse](event : Event[Response], response : Response) : Unit = {
+ events.get(event) match {
+ case Some(subscribers) =>
+ subscribers.foreach(subscriber => subscriber.send(response))
+ if(event.isSingleUsage)
+ subscribers.clear()
+ case None =>
+ }
+
+ response match {
+ case message : TimedEventResponse =>
+ synchronizedEvents.get(event.asInstanceOf[TimedEvent[TimedEventResponse]]) match {
+ case Some(subscribers) =>
+ subscribers.foreach{ case (synchronizer, path, subscriber) => synchronizer.send(SynchronizedEvent(path, subscriber, message, message.timestamp)) }
+ if(event.isSingleUsage)
+ subscribers.clear()
+ case None =>
+ }
+ case _ =>
+ }
+ }
+
+ /**
+ * method which allow to process all ObservableMessage
+ *
+ * @param message is the content
+ */
+ def processEventHolderMessage(message : ObservableMessage) : Unit = {
+ message match {
+ case Subscribe(event, ref) => addSubscription(ref, event)
+ case SubscribeSynchronized(event, ref, synchronizer) =>
+ addSynchronizedSubscription(ref, event, synchronizer)
+ case Unsubscribe(event, ref) => removeSubscription(ref, event)
+ }
+ }
+
+ def referenceToSynchronizer(synchronizer : NetworkEntityPath) : NetworkEntityReference
+}
\ No newline at end of file
diff --git a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ExampleFreeWay.scala b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ExampleFreeWay.scala
index 5c2ca03487c7c4d36949dae650d1e37194511f2f..8e51052d762eee19afcaeb5f029aa10a93d938f8 100644
--- a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ExampleFreeWay.scala
+++ b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ExampleFreeWay.scala
@@ -7,7 +7,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core.UnitCast._
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.Config
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties._
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types.FullConnection
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.{InputOutputGraphNetworkObserver, N2S3}
@@ -17,6 +17,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.features.io.report.{ImageSynapsesWeig
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.NeuronsFireLogText
import fr.univ_lille.cristal.emeraude.n2s3.models.qbg._
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import squants.electro.ElectricPotentialConversions.ElectricPotentialConversions
import scala.concurrent.Await
diff --git a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/Masquelier.scala b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/Masquelier.scala
index e1953ead19f9f97d83ff0102049a48a585d81fa9..a2f3f97e3ffbdda81738db66cfaabdfdfdaf5159 100644
--- a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/Masquelier.scala
+++ b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/Masquelier.scala
@@ -8,7 +8,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, ShapelessSpike}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties.{MembraneThresholdFloat, MembraneThresholdType, MembraneThresholdTypeEnum}
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.N2S3
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types.FullConnection
@@ -20,6 +20,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.models.bio.InhibitorConnection
import fr.univ_lille.cristal.emeraude.n2s3.models.qbg.NeuronPotentialEvent
import fr.univ_lille.cristal.emeraude.n2s3.support.InputDistribution
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import fr.univ_lille.cristal.emeraude.n2s3.support.io.{InputSeq, N2S3Input, N2S3InputEnd, N2S3InputSpike}
import scala.concurrent.Await
diff --git a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/SmallReservoir.scala b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/SmallReservoir.scala
index ea0e1c66247300e60976e35336ae928091932968..7455516dbf34c1ffd38bb736e55eb90c3621a15f 100644
--- a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/SmallReservoir.scala
+++ b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/bio/SmallReservoir.scala
@@ -3,29 +3,28 @@ package fr.univ_lille.cristal.emeraude.n2s3.apps.bio
import java.io.{File, PrintWriter}
import akka.actor.Props
+import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias._
-import fr.univ_lille.cristal.emeraude.n2s3.core._
+import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core.UnitCast._
+import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, ShapelessSpike}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
+import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties._
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.N2S3
-import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types.{FullConnection, RandomConnection}
+import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types.RandomConnection
import fr.univ_lille.cristal.emeraude.n2s3.features.io.input._
-import fr.univ_lille.cristal.emeraude.n2s3.features.learning.{DelayAdaptation, SpikeProp, SupervisedSTDPLearning}
+import fr.univ_lille.cristal.emeraude.n2s3.features.learning.DelayAdaptation
import fr.univ_lille.cristal.emeraude.n2s3.features.logging.{ExportNetworkTopology, NeuronsFireLogText}
import fr.univ_lille.cristal.emeraude.n2s3.models.bio._
-import fr.univ_lille.cristal.emeraude.n2s3.models.qbg.NeuronPotentialEvent
import fr.univ_lille.cristal.emeraude.n2s3.support.InputDistribution
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import fr.univ_lille.cristal.emeraude.n2s3.support.io._
import scala.collection.mutable.ListBuffer
import scala.concurrent.Await
-import scala.sys.Prop
import scala.util.Random
-import akka.pattern.ask
-import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
-import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties._
/**
* Created by falezp on 14/10/16.
*/
@@ -180,7 +179,7 @@ object SmallReservoir extends App {
println("Start Training ...")
DelayAdaptation.execute(n2s3, Map(
- "Up" -> classifier.neuronPaths(0),
+ "Up" -> classifier.neuronPaths.head,
"Down" -> classifier.neuronPaths(1)
), 1.0f)
diff --git a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/BitStream.scala b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/BitStream.scala
index 95f441ae12b3335dea3b734178187ada12f4ec59..f05cb32cec8fcf458e690648bc49b9b5f3832407 100644
--- a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/BitStream.scala
+++ b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/BitStream.scala
@@ -21,8 +21,9 @@ import scala.util.Random
import akka.pattern.ask
import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, ShapelessSpike}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties._
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
/**
* Created by falezp on 14/10/16.
*/
diff --git a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/PatternStart.scala b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/PatternStart.scala
index ce325988f8558640c2364576d48570425b530e01..44aeb1d20483be6213843e4bf4311a4f69543950 100644
--- a/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/PatternStart.scala
+++ b/n2s3_examples/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/apps/ternary/PatternStart.scala
@@ -9,7 +9,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.core.Synchronizer.Done
import fr.univ_lille.cristal.emeraude.n2s3.core.UnitCast._
import fr.univ_lille.cristal.emeraude.n2s3.core._
import fr.univ_lille.cristal.emeraude.n2s3.core.actors.{Config, ShapelessSpike}
-import fr.univ_lille.cristal.emeraude.n2s3.core.event.{NeuronFireEvent, Subscribe}
+import fr.univ_lille.cristal.emeraude.n2s3.core.event.NeuronFireEvent
import fr.univ_lille.cristal.emeraude.n2s3.core.models.properties.MembraneThresholdFloat
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.N2S3
import fr.univ_lille.cristal.emeraude.n2s3.features.builder.connection.types.FullConnection
@@ -20,6 +20,7 @@ import fr.univ_lille.cristal.emeraude.n2s3.models.ternary_synapse
import fr.univ_lille.cristal.emeraude.n2s3.models.ternary_synapse.InhibitorConnection
import fr.univ_lille.cristal.emeraude.n2s3.support.InputDistribution
import fr.univ_lille.cristal.emeraude.n2s3.support.actors.LocalActorDeploymentStrategy
+import fr.univ_lille.cristal.emeraude.n2s3.support.event.Subscribe
import fr.univ_lille.cristal.emeraude.n2s3.support.io.{InputSeq, N2S3Input, N2S3InputEnd, N2S3InputSpike}
import scala.concurrent.Await