Delete command

The place where software developers meet

Moderator: marcus

Delete command

Postby tiveria » Wed 24. Aug 2011, 18:05

Hi,

is there a .net call available to delete a certain command from a list of commands for a remote control?
i saw one command to delete an entire remote but thats not waht i would need.

br
michael
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: Delete command

Postby IRTrans » Wed 24. Aug 2011, 18:47

Hi,
currently that is not supported through the .NET API. However, additional commands do not hurt you in any way.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Delete command

Postby tiveria » Wed 24. Aug 2011, 19:10

Well, in theory this might be right.
But i want to implement a Learning screen where the user has to push 1-5 times the same button till the command is really learned.
but before i will come back to the issue above i still have another problem. I try to learn ir codes using the following c# code:

IRTrans.NET.NETWORKSTATUS stat = m_Server.LearnIR("test", "test");

if (stat == null)
{
object obj = m_Server.getLearnStatus();
if (obj is IRTrans.NET.NETWORKLEARNSTAT)
{
IRTrans.NET.NETWORKLEARNSTAT ls = (IRTrans.NET.NETWORKLEARNSTAT)obj;
textEdit1.Text = ls.received;
}
}

from the demos i assumed this should be the right code.
The problem is, that i do only get an empty learn status back. without the learned command or any other info in.
what am i doing wrong?
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: Delete command

Postby IRTrans » Wed 24. Aug 2011, 19:54

Hi,
learning multiple times is no problem. The command will simply be replaced each time you learn it.

Your code for the status looks correct - we will need to check why it does not work.

You can also integrate our learning dialog into your application:

Simply use: irt.ShowLearnDialog ("mm1","newc" ); ("mm1"/"newc" are the remote and commnand).
To do this you will need to use the GUIClient object instead of the IRTransServer object. Everything else stays the same:

irt = new GUIClient("127.0.0.1");

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Delete command

Postby tiveria » Wed 24. Aug 2011, 20:22

Well your ui doesn*t fit my needs. In parallel i have tried to use the asci interface of the server, but even there i have some trouble.

sending first a ASCI
and then a Alearn
i would expect after a button press something like
** 00123 LEAR HEXCODE

but i get
**00057 RCV_COD S00000000111111110110100010010111320,0,0 for unknown buttons
and
**00030 RCV_COM test,test,0,0 for already learned ones.


i'm really getting desperate as i have to develop an application but have to many problems because of the lack of documentation.

btw. here is the code for the tcp stuff:

TcpClient client = new TcpClient("localhost", 21000);
if (client.Connected)
{
NetworkStream stream = client.GetStream();
Byte[] data = System.Text.Encoding.ASCII.GetBytes("ASCI");
stream.Write(data, 0, data.Length);
String responseData = String.Empty;

data = System.Text.Encoding.ASCII.GetBytes("Alearn\r\n");
stream.Write(data, 0, data.Length);
// Buffer to store the response bytes.
data = new Byte[256];

// String to store the response ASCII representation.
responseData = String.Empty;

// Read the first batch of the TcpServer response bytes.
Int32 bytes = stream.Read(data, 0, data.Length);
responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);
Console.WriteLine("Received: {0}", responseData);
}
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: Delete command

Postby IRTrans » Wed 24. Aug 2011, 22:49

Hi,
please note that the TCP ASCII interface is not supported on the irserver - it is only supported for direct communication with the IRTrans LAN/WLAN devices with IRDB.

I will check why learning does not work correctly and will come back to you shortly.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Delete command

Postby IRTrans » Thu 25. Aug 2011, 00:21

Hi,
the problem is, that the "getLearnStatus" call was not supposed to be used in this context.
The simple and short LearnIR calls always close the remote control after learning. Then the status information was lost.

We could, however, fix that with a modified irserver SW.

Please send us an email to support@irtrans.de and we will send you a modified irserver.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Delete command

Postby tiveria » Thu 25. Aug 2011, 12:17

Hello,

thanks for the offer. I already sent out the email.

Taking all my requirements and the possibilites provided by the HW into account, the best solution would be a learning command that returns the complete timing and signal as hex code as it is implemented in the ascii interface and a send command that could use this hexcodes
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: Delete command

Postby tiveria » Thu 25. Aug 2011, 12:26

This would solve all the problems i'm currently facing
tiveria
 
Posts: 20
Joined: Mon 1. Aug 2011, 07:48

Re: Delete command

Postby IRTrans » Thu 25. Aug 2011, 12:32

You can do that if you are talking directly to LAN/WLAN Devices.

Implementing that for the irserver would mean a lot of work.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Next

Return to APIs

Who is online

Users browsing this forum: No registered users and 4 guests

cron