Ejemplo n.º 1
0
 /// <summary>
 /// Collector Agent for Life data Aquesition
 /// </summary>
 /// <param name="actorPaths"></param>
 /// <param name="time">Current time span</param>
 /// <param name="debug">Parameter to activate Debug Messages on Agent level</param>
 public Collector(ActorPaths paths
                  , ICollectorBehaviour collectorBehaviour
                  , IMessageHub msgHub
                  , Configuration configuration
                  , long time
                  , List <Type> streamTypes)
     : base(time: time, channels: streamTypes)
 {
     Console.WriteLine(value: "I'm alive: " + Self.Path.ToStringWithAddress());
     collectorBehaviour.Collector = this;
     Behaviour        = collectorBehaviour;
     messageHub       = msgHub;
     Config           = configuration;
     actorPaths       = paths;
     simulationId     = Config.GetOption <SimulationId>();
     simulationNumber = Config.GetOption <SimulationNumber>();
     simulationKind   = Config.GetOption <SimulationKind>();
     saveToDB         = Config.GetOption <SaveToDB>();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Collector Agent for Life data Aquesition
 /// </summary>
 /// <param name="actorPaths"></param>
 /// <param name="time">Current time span</param>
 /// <param name="debug">Parameter to activate Debug Messages on Agent level</param>
 public Collector(ActorPaths paths
                  , ICollectorBehaviour collectorBehaviour
                  , IMessageHub msgHub
                  , Configuration configuration
                  , long time
                  , List <Type> streamTypes)
     : base(time: time, channels: streamTypes)
 {
     collectorBehaviour.Collector = this;
     Behaviour        = collectorBehaviour;
     messageHub       = msgHub;
     Config           = configuration;
     actorPaths       = paths;
     simulationId     = Config.GetOption <SimulationId>();
     simulationNumber = Config.GetOption <SimulationNumber>();
     simulationKind   = Config.GetOption <SimulationKind>();
     saveToDB         = Config.GetOption <SaveToDB>();
     maxTime          = Config.GetOption <SimulationEnd>().Value;
     messageHub.SendToAllClients(msg: "Collector initialized: " + Self.Path.ToStringWithAddress());
 }