Am 25.02.2013 um 21:33 schrieb Tom Easterday: > > >> That said: what exactly is the tuning effort about? There are various ways >> to access pins, and I think pretty much all of them would be orders of >> magnitude faster than 'halcmd show pin x' ? > > The tuning effort is that we are writing a GUI that talks to Linuxcnc over > wifi and would like it to be as responsive as possible. Currently we are > using a simple web server > (http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Rockhopper_Web_Server). What other > way(s) would you suggest for getting/setting pins?
I'd think a webserver based on forking shell commmands and 'as responsive as possible' is incompatible. If you want it to be fast, use the HAL C API - if you need to access arbitrary pins without linking them all in advance through halcmd, consider the private HAL API in hal_priv.h - halpr_find_pin_by_name(name) is your friend read the halcmd sources, or halrmt.c to see how it is used; and dont forget the RTAPI mutex around these calls or the segfaults will be on you when you dont expect them The halmodule.cc Python module could be used as a model and that would work just fine in a Tornado server, but the C API is outdated and very error-prone; particularly easy to create memory leaks or dangling references Alternatively a boost::python binding will be shorter, more robust and Py3k out of the box but it's a bit of a learning curve if you want it to be super-Pythonic - see master:interpmodule.cc for the full drama If a more pedestrian free-function binding does the job, have a look at master:canonmodule.cc and make it work with the examples from halrmt.c - Michael ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
