Bug 729

Summary: Analog metadata does not include range of measurable values.
Product: libsigrok Reporter: Martin Ling <martin-sigrokbugs>
Component: APIAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Martin Ling 2016-01-03 23:47:08 CET
Stefan BrĂ¼ns made a good point on bug #17:

> Although the current metadata for analog samples is quite good already, I miss one attribute: range or min/max
> 
> Multimeters provide data as integers, but both an 22000 and an 6000 count DMM will output an int16_t.
> 
> Scopes output 8 to 16 bit of sample data, but an 14 bit value may be left or right aligned, thus range may be either 0...65532 or 0...16383.
> 
> Float samples are typically in a -1.0 ... +1.0 range, but may as well be outside of this range.
> 
> This is an attribute mostly useful for visualization, it does not affect physical interpretation. It should be specified as either two integers (min/max) or two doubles, depending on is_float, and refer to the raw sample value.

In my view it would make sense to add this to struct sr_analog_spec, but the variant nature of the type needs some consideration.