using System.Collections.Generic;
using Nancy.ModelBinding;
using SpiceSharp.Simulations;
using SpiceSharp.Components;
public class SpiceSharpModule : NancyModule
public SpiceSharpModule()
new VoltageSource("V1", "in", "0", new Pulse(0, 1, 1e-6, 1e-7, 1e-7, 1e-6, 2e-6)),
new Resistor("R1", "in", "out", 1e3),
new Capacitor("C1", "out", "0", 1e-9));
var tran = new Transient("tran", 1e-6, 10e-6);
var time = new List<double>();
var inValues = new List<double>();
var outValues = new List<double>();
tran.ExportSimulationData += (sender, args) => {
inValues.Add(args.GetVoltage("in"));
outValues.Add(args.GetVoltage("out"));
Get["/index"] = parameters =>
var data = new SpiceSharpData