On Thu, Apr 23, 2015 at 9:06 AM, Martin Ling <martin-sig...@earth.li> wrote:
> On Thu, Apr 23, 2015 at 12:20:49PM +0100, D Haley wrote:
>>
>> Is there any way I can have the read function return when a delimiter is
>> reached?

I ran into this same thing recently when starting to write a program
using libserialport.

Do note that the lack of posix-like blocking behavior (ie: read at
least 1 byte but up to N bytes) means one must either read one byte at
a time or wire up the sp_event_set infra to do "read until X".

The former is probably massively inefficient, and the latter takes
quite a bit of code just to get efficiency (and has increased amounts
of code, which leads to other efficiency and clarity concerns)

Personally, I ended up just doing repeated single byte reads.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to