LinuxMCE Forums
May 22, 2013, 02:44:12 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
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
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: LinuxMCE with C#  (Read 1417 times)
lomeshp
Newbie
*
Posts: 14


View Profile
« on: January 11, 2012, 08:36:24 pm »

I am interested in creating C# app that would send commands to LinuxMCE, any suggestions?
Logged
JoakimL
Veteran
***
Posts: 149



View Profile
« Reply #1 on: January 11, 2012, 08:55:19 pm »

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
Logged
lomeshp
Newbie
*
Posts: 14


View Profile
« Reply #2 on: January 11, 2012, 10:08:34 pm »

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?
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #3 on: January 11, 2012, 11:43:47 pm »

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

-Thom
Logged
Kezza
Veteran
***
Posts: 146


View Profile
« Reply #4 on: January 12, 2012, 10:46:25 am »

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  Undecided

Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #5 on: January 12, 2012, 03:24:32 pm »

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

-Thom
Logged
lomeshp
Newbie
*
Posts: 14


View Profile
« Reply #6 on: January 13, 2012, 06:47:11 pm »

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?
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #7 on: January 13, 2012, 07:00:21 pm »

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
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #8 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. 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.
Logged

buckle
Veteran
***
Posts: 65


View Profile
« Reply #9 on: March 11, 2012, 06:13: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.
Logged
ajward
Regular Poster
**
Posts: 20


View Profile
« Reply #10 on: March 22, 2012, 12:29:34 pm »

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.
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #11 on: March 22, 2012, 05:01:25 pm »

Dude, don't ask, just do it. Wink

-Thom
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!