LinuxMCE Forums
General => Developers => Topic started by: lomeshp on January 11, 2012, 08:36:24 pm
-
I am interested in creating C# app that would send commands to LinuxMCE, any suggestions?
-
Mono as platform and then you'd need to port parts of the DCE implementation (the part responsible for sending and receiving from DCE as a client).
/Joakim
-
Thanks. I've been trying to find a good tutorial on how to write apps that can communicate with LinuxMCE, does anyone of a good tutorial?
-
Read both the Developers guide, and Developing a DCE Device, on the wiki.
-Thom
-
If you do get anything built in C#(going or not) please post info on here/wiki as it's something I've been thinking of looking into and have read a fair chunk of the wiki so very slowly kinda getting an idea of how things work :-\
-
Please ask questions. Some of us in here know the stack incredibly well, and can speed up the process of understanding.
-Thom
-
I built a C# orbiter for testing purposes. It works but there are issues and maybe someone can help. The way I am sending messages to DCERouter is through a socked. I am sending the command as "TOUCH 100x100" (100x100 is just an example). This only works if the screen on the weborbiter is same as the command I am calling.
Where can I find list of commands so that I can direclty call DCERouter using C# socket?
-
You need to read the Developers Guide first. It explains DCE. The list of commands themselves can be found in the Advanced > DCE > Commands / Events / Device Data menu in the web admin.
Also, you need to look at the C++ code in src/DCE to get an idea of how DCE is structured, and what is possible from the header files.
-Thom
-
The socket you are sending stuff to is using the so called Proxy Orbiter. It is a kludge that was created for the web orbiter in the first place. A "real" orbiter doesn't talk to the socket of Proxy Orbiter, but sends and receives messages to dcerouter. As TSCHAK pointed out there is a nice wiki page about it. For sending stuff, you can use the MessageSend binary. Or create a small library in c# to do the same thing. in my peoples dir in svn there is a PHP lib that supports message sending in native PHP. svn/peoples/posde/iOrbiter/libMessageSend.php iirc.
-
The socket you are sending stuff to is using the so called Proxy Orbiter. It is a kludge that was created for the web orbiter in the first place. A "real" orbiter doesn't talk to the socket of Proxy Orbiter, but sends and receives messages to dcerouter.
There is already a .NET implementation of touch orbiter, UnOrbiter.NET. http://svn.linuxmce.org/trac.cgi/ticket/795 (http://svn.linuxmce.org/trac.cgi/ticket/795) It is part of the kludge, though, so it probably doesn't help get you towards your goal.
You might be able to import the DCE libs into you C# project and go that route.
-
Is there any mileage in compiling the C++ DCE library under managed C++ in .Net?
It would then be straightforward for C# to call managed C++.
Andy.
-
Dude, don't ask, just do it. ;)
-Thom