/// <summary> /// Constructor /// </summary> /// <param name="simulation">Simulation</param> /// <param name="posNode">Positive node</param> /// <param name="negNode">Negative (reference) node</param> public RealVoltageExport(Simulation simulation, Identifier posNode, Identifier negNode) : base(simulation) { PosNode = posNode ?? throw new ArgumentNullException(nameof(posNode)); NegNode = negNode; }
/// <summary> /// Initializes a new instance of the <see cref="GenericExport{T}"/> class. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="extractor">The function for extracting information.</param> public GenericExport(Simulation simulation, Func <T> extractor) : base(simulation) { _myExtractor = extractor; }
/// <summary> /// Initializes a new instance of the <see cref="RealVoltageExport"/> class. /// </summary> /// <param name="simulation">The simulation.</param> /// <param name="posNode">The node identifier.</param> /// <exception cref="ArgumentNullException">posNode</exception> public RealVoltageExport(Simulation simulation, string posNode) : base(simulation) { PosNode = posNode ?? throw new ArgumentNullException(nameof(posNode)); NegNode = null; }
/// <summary> /// Initializes the export. /// </summary> /// <param name="sender">The object (simulation) sending the event.</param> /// <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param> protected override void Initialize(object sender, EventArgs e) { var state = Simulation.GetState <INoiseSimulationState>(); Extractor = () => state.OutputNoiseDensity; }