Page 1 of 2

SendRemoteCommand() timing

PostPosted: Fri 6. Apr 2012, 14:15
by jbroeker
Hi,

Did not find any detailed documentation on the timing of the SendRemoteCommand() (C DLL): When does the function return? After the command was transmitted on the IR channel or earlier?

In other words: If I want to put the maximum load on the IR channel, do I just call SendRemoteCommand() as fast as possible or do I have to add delays to ensure no commands are lost?

Best regards,

Jörg

Re: SendRemoteCommand() timing

PostPosted: Fri 6. Apr 2012, 17:00
by IRTrans
Hi,
in general you will need to wait for the acknowledge before you can send the next command.

After you send the first command the call will return immediately, for further commands it will return after sending of the command has started.

As long as you wait for the acknowledge no command will be lost. There is no need add any additional delay.

IRTrans

Re: SendRemoteCommand() timing

PostPosted: Sun 8. Apr 2012, 13:01
by jbroeker
Hi,

Thanx for the quick response.

One more question. How do I wait for the ack? I apologize if this is a stupid question (I do not have any IRTrans documentation at hand right now).

Best regards,

Jörg

Re: SendRemoteCommand() timing

PostPosted: Mon 9. Apr 2012, 09:42
by IRTrans
The ACK is the result code that is sent back when doing the call.

IRTrans

Re: SendRemoteCommand() timing

PostPosted: Tue 10. Apr 2012, 08:48
by jbroeker
Hi IRTrans,

Sorry, but I am afraid I do not understand. Do I have to do anything special to wait for the ACK or does the SendRemoteCommand() function return after receiving the ACK anyways?

Best regards,

Jörg

Re: SendRemoteCommand() timing

PostPosted: Tue 10. Apr 2012, 09:13
by IRTrans
The ACK is the result code that is returned by the call. If you wait for the function to return before sending a new code everything will be fine.

IRTrans

Re: SendRemoteCommand() timing

PostPosted: Tue 10. Apr 2012, 09:25
by jbroeker
Hi IRTrans,

One more question: If I check the return code of SendRemoteCommand() like in your example (of course with the correct rem and com)

stat = SendRemoteCommand (irt_server,"sony","play",0,0,0);
if (stat) {
printf ("Error: %s\n",stat->message);
}

I always get a value stat != 0 returned (the IR command seems to be transmitted ok). The stat->message is an empty string. Is this an error or is the example missleading? Is there a documentation on the NETWORKSTATUS structure?

Best regards,

Jörg

Re: SendRemoteCommand() timing

PostPosted: Tue 10. Apr 2012, 16:59
by IRTrans
Hmm, that is strange, normally stat should be NULL if there is no error.

I will need to check that.

IRTrans

Re: SendRemoteCommand() timing

PostPosted: Thu 12. Apr 2012, 10:03
by jbroeker
Hi IRTrans,

any news on this topic?

Best regards,

Jörg

Re: SendRemoteCommand() timing

PostPosted: Thu 12. Apr 2012, 16:10
by IRTrans
Hi,
we have tested it here and it works as it should.

Which version of the .NET DLL are you using?

IRTrans