MicroOcpp icon indicating copy to clipboard operation
MicroOcpp copied to clipboard

Get timeout status in every request

Open HaninMoAnwar opened this issue 1 year ago • 2 comments

I want to check if timeout occurred in any request in my application layer. I didn't find any API does that. So, I was enforced to add a flag inside RequestQueue::loop to be fired when timeout occurs. image

I want to know if the library doesn't support an API for timeout detection or not. In addition, I wander about how library handle the timeout exception, does it print on serial only or take an action ? Thanks in advance.

HaninMoAnwar avatar Aug 20 '24 14:08 HaninMoAnwar

I've found that timeout is handled by onTimeoutListener callback only for authorize , startTransaction, and stopTransaction requests. image Do other requests have this callback or not ? I yes, how can I use it in my project ?

HaninMoAnwar avatar Aug 21 '24 07:08 HaninMoAnwar

We as EvFlash Compony, handled this issue by setting onTimeoutListener, onReceiveConfListener callbacks for each request and pass App handler functions to these listeners, just to track connectivity status in our application layer . And here is an example : image If you're @matth-x interested in our handling to this issue, please don't hesitate to contact with me.

HaninMoAnwar avatar Aug 21 '24 14:08 HaninMoAnwar