public void Import(ImportPipeline pipe) { _pipe = pipe; var arg = pipe.Factory.NewArgument(Models.Antenna.Simple.Name); if (!string.IsNullOrEmpty(pipe.Options.AntennaFile)) { var file = Path.Combine(pipe.Options.Workspace, pipe.Options.AntennaFile); var key = ReadJson <EmptyArgs>(file).Key; switch (key) { case Models.Antenna.Simple.Key: arg = ReadJson <SimpleAntennaArgs>(file); break; case Models.Antenna.Flat.Key: arg = ReadJson <FlatAntennaArgs>(file); break; case Models.Antenna.Spheric.Key: arg = ReadSphericAntenna(file); break; default: break; } } // arguments file loaded pipe.Arguments.Add(SimulationTypes.Antenna, arg); }
public void Import(ImportPipeline pipe) { var args = pipe.Factory.NewArgument(Models.Energy.Battery.Name); args.Index = 999; pipe.Arguments.Add(SimulationTypes.Energy, args); }
public void Import(ImportPipeline pipe) { if (!string.IsNullOrEmpty(pipe.Options.RuntimeFile)) { var file = Path.Combine(pipe.Options.Workspace, pipe.Options.RuntimeFile); var args = new JsonStorage <RuntimeArgs>(file).Read().First(); pipe.Runtime.With(args); } }
public void Import(ImportPipeline pipe) { var args = pipe.Factory.NewArgument(Models.Channel.AdaptedFriis.Name) as AdaptedFriisArgs; if (!string.IsNullOrEmpty(pipe.Options.ChannelFile)) { var file = Path.Combine(pipe.Options.Workspace, pipe.Options.ChannelFile); args = new JsonStorage <AdaptedFriisArgs>(file).Read().First(); } pipe.Arguments.Add(SimulationTypes.Channel, args); }
public void Import(ImportPipeline pipe) { var args = pipe.Factory.NewArgument(Models.Network.Name) as NetworkArgs; if (!string.IsNullOrEmpty(pipe.Options.DevicesFile)) { var file = Path.Combine(pipe.Options.Workspace, pipe.Options.DevicesFile); var devices = new JsonStorage <SimpleDevice[]>(file).Read().First(); args.Network.AddRange(devices); } pipe.Arguments.Add(SimulationTypes.Network, args); }
public void Import(ImportPipeline pipe) { var args = pipe.Factory.NewArgument(Models.Communication.LrWpan.Name); pipe.Arguments.Add(SimulationTypes.Communication, args); }
public void Import(ImportPipeline pipe) { var args = pipe.Factory.NewArgument(Models.Scene.Name); pipe.Arguments.Add(SimulationTypes.Scene, args); }