Hello,
    This is used for extending Tiny TP credits among the IR enabled units.
Since there does not exist any TTP credit policy at the offcial level hence
I suppose that this is exposed for the developers who wish to implement
their own (I used it for the same purpose). Various OS are following their
own credit policies. For example Epoc sends 127 credits in one go, Win CE
sends one credit for every packet it receives. Try sending zero credits to
an Epoc based device, it will reboot (now don't use it for DOS attack ;-)
against your friend), so it's a quite important. However, I'll advise to use
Exchange Manager. It's quite robust and it'll take away the burden of doing
all the low level stuff.

Regards,
Khurram

----- Original Message -----
From: Fred Dujardin <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 5:06 PM
Subject: What's with this IrAdvanceCredit thing ?


> Hi
>
> I had asked this on comm-dev-forum and got no answer.
> Then I asked Palm Developer Support, where I got a nice reference
> number but no answer (after more than 3 weeks)
>
> So I'm asking on this forum now, sorry for the inconvenience & this
> will be the last time before I decide to change and sell pizzas or
> whatever... :)
> I would appreciate it if someone could at least point me in the right
> direction. (I have read everything I could find, including the Palm
> docs and the stuff at irda.org)
>
> ==========
>
> So the question is : when using a TinyTP connection, when should
> IrAdvanceCredit be called ?
>
> This is totally unclear in the docs.
>
> There's a PowerPoint presentation by Bruce Thompson floating around on
> the net, saying that :
>
> - the receiver advances credit to the sender
> - IrAdvanceCredit should be called "when buffers become available"
> - sending packets consumes credit
>
> Ok, but:
>
> 1) when do "buffers become available"? Are these buffers my app's, or
> are they internal IR stack buffers? If the latter, how do I know about
> their becoming available?
>
> 2) The presentation by Bruce Thompson definitely says IrAdvanceCredit
> SHOULD be called. But it does not say exactly when:
> -do I call it upon sending data ? After or before sending ?
> -do I call it on Packet Handled ?
> -do I call it upon receiving data ?
>
> 3) The credit tells the remote how much packets it can send.
> This corresponds to some space I have available for receiving on the
> Palm. Who manages this space ? If the IR stack, how do I know how much
> space it has ?
>
> 4) What are reasonable values for credit?
> The doc states that credit should not exceed 127. Is the credit
> cumulated every time I call IrAdvanceCredit ? How do I know how much
> credit there currently is, so I can be sure not to exceed 127?
>
> 5) IrAdvanceCredit is a macro that simply increments availCredit in
> the IrConnect structure. Therefore, it cannot really advance the
> credit to the remote, as this requires sending a packet over the IR
> link.
> I have observed this:
> -call IrAdvanceCredit
> -note that availCredit has been incremented
> -give control back to the system
> -note that availCredit is now 0 ??
> Does that mean that the system polls availCredit and sends an IR
> packet behind the scenes when I change it ?
>
> Thanks
> Fred
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to