HI,
I've a problem, or maybe a doubt, about the AsyncStreams behaviour: I have to receive an image from a camera (it's a professional industrial camera/sensor with a ARM processor inside), I can ask this camera to give me one image, sending it a 4 bytes command.
So I initially try with a standard approach, but I know that network communications are better handled in Async mode... so I pass to asyncstreams.
The problem is that I don't have any async automatism that told me when all bytes are arrived, and the only way I can use is counting the total bytes received in AStreams_NewData
So if I ask for a 640x480 image plus a header of 15 bytes (total 307215 bytes), after some (and never the same... ) cycles of AStreams_NewData I will be arrived at that total amount of bytes received.
This is true, I can say, 6 times on 10...but sometimes this in not true and I received less bytes than expected, and the event AStreams_NewData not fire anymore.
So my question is: it's an Android problem with network (I write a java routine directly in Eclipese... with similar results) or it's my camera that stops to send me bytes?
If someone need code I can paste it, but it's very simple, similar to AsyncStreams Tutorial.
Let me know what you think about this... Thanx and sorry for my English.
I've a problem, or maybe a doubt, about the AsyncStreams behaviour: I have to receive an image from a camera (it's a professional industrial camera/sensor with a ARM processor inside), I can ask this camera to give me one image, sending it a 4 bytes command.
So I initially try with a standard approach, but I know that network communications are better handled in Async mode... so I pass to asyncstreams.
The problem is that I don't have any async automatism that told me when all bytes are arrived, and the only way I can use is counting the total bytes received in AStreams_NewData
So if I ask for a 640x480 image plus a header of 15 bytes (total 307215 bytes), after some (and never the same... ) cycles of AStreams_NewData I will be arrived at that total amount of bytes received.
This is true, I can say, 6 times on 10...but sometimes this in not true and I received less bytes than expected, and the event AStreams_NewData not fire anymore.
So my question is: it's an Android problem with network (I write a java routine directly in Eclipese... with similar results) or it's my camera that stops to send me bytes?
If someone need code I can paste it, but it's very simple, similar to AsyncStreams Tutorial.
Let me know what you think about this... Thanx and sorry for my English.