[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnucap-devel] gnucap-ruby bindings

From: Roeland Moors
Subject: [Gnucap-devel] gnucap-ruby bindings
Date: Sat, 22 May 2004 14:25:48 +0200
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

I'm creating ruby bindings for gnucap.
The source will be available on rubyforge as soon as I have an account created. This is just an experimental phase and I would appreciate any suggestions, comments, ...

These are the basic commands:

command: Send a command to gnucap and return the output as a string
buildcmd: Send a command in build mode and return the output as a string
analysis: Send a command and return the output as a Hash

I use pipes to communicate to gnucap in interactive mode.


gnucap ="Bridge")
gnucap.buildcmd("v1 1 0 sin(0 15 60 0 0)")
gnucap.buildcmd("rload 2 3 10k")
gnucap.buildcmd("d1 1 2 mod1")
gnucap.buildcmd("d2 0 2 mod1")
gnucap.buildcmd("d3 3 1 mod1")
gnucap.buildcmd("d4 3 0 mod1")
gnucap.buildcmd(".model mod1 d")
gnucap.command("print tran v(1,0) v(2,3)")
plotdata = gnucap.analysis("tran .5m 25m")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]