Thanks Gerhard for your thoughts.

- As a fallback, instead of repeating the last value, I opted for
inserting a single value of -1.0 to signal the change of recording.
This helps aligning the measurements with timestamps times printed by
sr_err().

- I did some further experiments but dBA/dBC seems to be the only
useful flag that can be recovered.

So, here's the commit on github:

https://github.com/mguillau/libsigrok/commit/8cc328fdee3f98ad7ae85e1e2cc57f947bb3f6e9

Happy to receive some feedback,
Matthieu

On Mon, Nov 28, 2016 at 2:50 PM, Matthieu Guillaumin
<[email protected]> wrote:
> Hi,
>
> I finally had some time to play with my pce-322a and now I'm almost
> done with a first implementation of recovering its memory. I have a
> few questions though:
>
> - The memory is a sequence of recordings that start with a header
> (containing some flags and a timestamp). This timestamp is obviously a
> very important piece of information about past recorded measurements,
> but I haven't found any way to provide them to the sr_session_send()
> function. Right now I can only print the timestamps on stderr using
> something like sr_info(), so it's pretty lame, since stderr and stdout
> need not be synced. Do you have any suggestion on how to handle this
> before I submit a patch?
>
> - I still haven't fully figured out all the semantics of the header
> flags. Is it ok to submit a patch with only partial support?
> (currently, it only supports the dBA/dBC flag of recordings, not fast
> vs. slow nor measurement ranges)
>
> - Experimenting with my pce-322a device has unearthed some minor
> differences with what is currently described on the wiki page [*]. I'd
> be happy to update the page if you gave me an account. It could be
> interesting to see if the differences are due to variations of the
> model or incomplete reverse-engineering by the original author (in
> CC).
>
> Matthieu
>
> [*] https://sigrok.org/wiki/PCE_PCE-322A
>
> On Sat, Oct 1, 2016 at 12:24 PM, Uwe Hermann <[email protected]> wrote:
>> Hi,
>>
>> On Thu, Sep 29, 2016 at 08:16:45AM +0200, Matthieu Guillaumin wrote:
>>> Hi,
>>>
>>> I'm a happy user of sigrok with my pce-322a SPL logger (I use it with a
>>> imx6-based cubox device with debian jessie, and it's working great). So
>>> first of all, thanks a lot for this library!
>>>
>>> There's one thing though that I haven't been able to do yet, which is,
>>> download the internal memory of the pce-322a (which contains recordings
>>> that I made on the go). Looking at the support wiki page (
>>> https://sigrok.org/wiki/PCE_PCE-322A ), it seems that there is support for
>>> reading the memory, but I cannot seem to find how to invoke this
>>> functionality via sigrok-cli.
>>
>> The driver currently doesn't seem to have support for that. It's usually
>> done using the SR_CONF_DATA_SOURCE key, see e.g. uni-t-ut32x or
>> kecheng-kc-330b for examples, which you can use from sigrok-cli via the
>> "data_source" option (to specify whether you want live data or data from
>> an internal memory of the device usually).
>>
>> The protocol seems documented in the wiki indeed, so it should be doable
>> to create a patch to add support for this to the pce-322a driver if you
>> want to give it a try.
>>
>>
>> Cheers, Uwe.
>> --
>> http://hermann-uwe.de | http://randomprojects.org | http://sigrok.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to