gnucap-devel
[Top][All Lists]
Advanced

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

[Gnucap-devel] Re: gnucap-ruby bindings


From: Roeland Moors
Subject: [Gnucap-devel] Re: gnucap-ruby bindings
Date: Thu, 27 May 2004 15:02:46 +0200
User-agent: Mutt/1.3.28i

On Sat, May 22, 2004 at 02:25:48PM +0200, Roeland Moors wrote:
> 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.
> 
> example:
> 
> gnucap = Sim::Gnucap.new("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")
> ...
> 

The webpage can be found at: http://gnucap.rubyforge.org
Suggestions are welcome.

-- 
Roeland




reply via email to

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