On Sun, 2008-10-12 at 11:32 -0400, Anthony J Bybell wrote: [snip description of very cool stuff going on]
> Are there code examples in gEDA someone couple specifically point me to? I > know you guys have used guile, but I'm certainly not a fan of functional > programming languages so I'd prefer not to go down that route, however I > would like to see how the interfacing was done and where it was done > rather than reinvent the wheel poorly. I'm not sure about embedded scripting languages, although I've used "Lua", which is quite "basic" like, and seems popular. Tcl / Scheme is perhaps more canonical in EDA though. You don't _have_ to make your scheme API that functional, depending on how much programming you expect the user to do. Take a look at tinyscheme if you're thinking of adding scheme APIs, _do not use guile_. gerbv has an example of tinyscheme usage. Peter Brett would perhaps also be able to assist, since he's been looking at porting gEDA to using tinyschem instead of guile. For remote IPC, use DBus. To the purists, this should export all methods you wish to have callable. Your exported DBus interface is an API into your program. Doing what I did with PCB, and providing _one_ API method, to execute a string with PCB's builtin action syntax, would probably not be considered good form. (But you could do this if you wanted). I've got some example code using DBus to communicate to a data-logging process, and the beginnings of some code to have a "geda-query" program which exposes a DBus API to answer questions about gEDA schematic / symbol files. That example is here: http://repo.or.cz/w/geda-gaf/pcjc2.git?a=commitdiff;h=e9d16f2afad38cb8fe850b9ba610199e1a1af65 (Don't, on any account, copy the nasty "libdbus" implementation I did for PCB. That was done because PCB's core doesn't have a GLib mainloop available) Best wishes, -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
