On Thu, 16 Sep 2010 13:20:58 +0200, Marek Kvas <[email protected]> wrote:

> I am considering using of sigrok as "analytic software" for my hardware. 
> I had a quick look at the API for HW plug-in and if I understand it 
> well, if I have sampling frequency 100 kHz, HW plug-in has to provide 
> 100.000 samples for every second of record. What I need to do is 
> monitoring of events which occur seldom relatively to sampling rate. 
> Let’s say I have sample rate 100 MSample/s and there are only thousands

> (maximum) of events per second. I would prefer providing data in format 
> "timestamp : input state" rather than all samples. All samples can take 
> easily gigabytes of memory even for very short record and I would like 
> to be able to record minutes or hours. Is it possible to use somehow 
> this "compressed" format? If not, can you estimate and describe somehow 
> how many changes to sigrok would have to be done to implement this 
> possibility?

Right now sigrok does indeed work with fixed sample rates, meaning a
100Khz rate will expect that many samples/sec, like you said.

However that's just a function of the current set of drivers and
frontends. The way data transfer between drivers and a frontend
is implemented is through a bus. The frontend sets up the bus and starts
acquisition, the hardware-specific driver shoots packets in it, and the
frontend gets those and does whatever (save, display, etc). The packet
stream is basically a header packet, data packets, and an "end" packet.
The current data packets are all of the form DF_LOGIC8, DF_LOGIC32 and
so on. This refers to logic analyzer data, and the number of bits
per sample in the packet's payload.

What you want is a packet type that holds a set of timestamp/value
pairs, or perhaps one timestamp and a set of consecutive values.

So it's a matter of implementing your driver (obviously), defining
those packets and a struct for the payload, and extending the
frontend to do something interesting with your data.

To summarize, sigrok can't do what you want right now but can be
extended to do it without too much trouble. Whether it gets you
anything more than what you'd have if you just wrote your own
thing from scratch, is for you to decide :-)


-- 
Bert Vermeulen
[email protected]

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to