Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - aaron.b

Pages: [1]
1
Control of basic serial devices, like tv's and receiver's with rs232 ports, is done with generic serial device, which uses embedded ruby.

We're working now on a port of LinuxMCE that will provide basic home automation control and a/v control on a very cheap platform (think $50 access point with 4mb ram).  We're running into a problem with GSD, though.  Ruby is just too big and heavy.  99% of the gsd devices don't need the power that Ruby offers.  All they do is string parsing and formatting.  For example, the 'set volume' command takes an int from 0-100, but a Yamaha receiver wants the volume as a hex value from 0x00-0xff.  So, for the yamaha receiver, all we use Ruby for is basic math (i*2.55) and formating (decimal to hex), and calculating a checksum, which is the string sent to the receiver.  All the serial port control is done in the C-code of GSD; the Ruby engine is just used as a built in script engine for basic string manipulation.

There are some really sophisticated GSD based devices that use a lot of Ruby; like the EIB.  But, for the really basic control of simple serial devices, I'm thinking it would be nice to allow use of a lighter weight scripting language to do the string parsing.  That way, those devices could run on very lightweight platforms.

Does anybody have any comments on this?  Anybody with experience with Lua, or perhaps who could propose alternative languages that might do what we want?  I thought about embedding PERL, but it seems to be heavy, like Ruby.  We could just do basic bash calls, however, bash doesn't really have a C-language interface afaik that would allow the C-language DCE device to easily call functions in bash and get return values.

Comments?

Pages: [1]