Difference between revisions of "Generic Serial Device"
Line 1: | Line 1: | ||
− | <table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>Generic_Serial_Device (also knowk as GSD) is a Pluto device that allows enduser to do simple programming for RS232, serial USB or network connected devices. | + | <table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>Generic_Serial_Device (also knowk as '''GSD''') is a Pluto device that allows enduser to do simple programming for RS232, serial USB or network connected devices. |
+ | :Note : The information is not quite complete because I'm not the original author. | ||
== Short description == | == Short description == | ||
+ | It's a standard DCE device, it only can execute commands and send events (no event handler yet, but Aaron wants it badly). | ||
+ | |||
+ | The main idea is instead of programming a device in C++, compile, link whith proper libraries you can edit (in a webpage) few lines of code in ruby which will be executed when device receives that command. It exports several objects into ruby so you'll have access to devicedata, device hierarchy, established connection and so on. | ||
+ | |||
+ | The ruby code for each device template is storred somewhere in ''InfraredGroup_Command'' table. To edit infrared code, on [[pluto-admin]] website go to Wizard> Devices > Generic_Serial_Devices. You have to add a device from a device template in order to see anything in that page. | ||
+ | |||
+ | Select the device, and click "RubyCodes" button to be able to edit code that will be executed. | ||
+ | You should be able to see commands that are specified in device template (like ON/OFF/WhateverElse) and a group of ''Internal commands'' (Private_Method_Listing, Process_IDLE, Process_Incoming_Data, Process_Initialize, Process_Receive_Command_For_Child and Process_Release). | ||
+ | |||
+ | |||
+ | == Design notes == | ||
== Implementation issues == | == Implementation issues == |
Revision as of 10:20, 22 May 2006
This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto. |
- Note : The information is not quite complete because I'm not the original author.
Short description
It's a standard DCE device, it only can execute commands and send events (no event handler yet, but Aaron wants it badly).
The main idea is instead of programming a device in C++, compile, link whith proper libraries you can edit (in a webpage) few lines of code in ruby which will be executed when device receives that command. It exports several objects into ruby so you'll have access to devicedata, device hierarchy, established connection and so on.
The ruby code for each device template is storred somewhere in InfraredGroup_Command table. To edit infrared code, on pluto-admin website go to Wizard> Devices > Generic_Serial_Devices. You have to add a device from a device template in order to see anything in that page.
Select the device, and click "RubyCodes" button to be able to edit code that will be executed. You should be able to see commands that are specified in device template (like ON/OFF/WhateverElse) and a group of Internal commands (Private_Method_Listing, Process_IDLE, Process_Incoming_Data, Process_Initialize, Process_Receive_Command_For_Child and Process_Release).
Design notes
Implementation issues
Examples
For more details check GSD_Ruby_Interface