News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

LinuxMCE with C#

Started by lomeshp, January 11, 2012, 08:36:24 PM

Previous topic - Next topic

lomeshp

I am interested in creating C# app that would send commands to LinuxMCE, any suggestions?

JoakimL

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

lomeshp

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?

tschak909

Read both the Developers guide, and Developing a DCE Device, on the wiki.

-Thom

Kezza

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  :-\


tschak909

Please ask questions. Some of us in here know the stack incredibly well, and can speed up the process of understanding.

-Thom

lomeshp

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?

tschak909

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

Marie.O

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.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

buckle

Quote from: posde on January 19, 2012, 12:32:15 PM
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  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.

ajward

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.

tschak909

Dude, don't ask, just do it. ;)

-Thom