Difference between revisions of "Sending data sequences to devices"
Jump to navigation
Jump to search
(Created page with "We need a way to send a sequence of data from a libsigrok client to hardware. The following use cases are immediately apparent in already-supported hardware: * replaying logi...") |
|||
Line 13: | Line 13: | ||
* The data types in a sequence will be uniform throughout that sequence, so meta information on e.g the MQ for the sequence need only be passed once, not included in every data point. | * The data types in a sequence will be uniform throughout that sequence, so meta information on e.g the MQ for the sequence need only be passed once, not included in every data point. | ||
* Our existing MQ/unit system is by definition good enough to represent the meta data and data types, since it's the sort of thing you capture from one device and play back on another. | * Our existing MQ/unit system is by definition good enough to represent the meta data and data types, since it's the sort of thing you capture from one device and play back on another. | ||
* | * The structure of the actual data depends on the data type(s): | ||
** logic data can be packed exactly as it is coming out of hardware: one bit per channel in as many bytes as needed (lowest-channel byte first), all channels the device can handle represented. | |||
** analog values could be just float or double in local-endian order. | |||
** sets like voltage/current simply have two floats per data point i.e. the MQs are interleaved. | |||
* Basic SR_DF_* packets are entirely suitable for this, simply sent in the other direction. |
Latest revision as of 13:47, 10 October 2014
We need a way to send a sequence of data from a libsigrok client to hardware. The following use cases are immediately apparent in already-supported hardware:
- replaying logic data on a logic analyzer, supported by several FX2-based logic analyzers
- TODO: list of hardware that supports this
- uploading waveforms to an arbitrary waveform generator
- uploading a series of voltage/current sets to a PPS or DC load
Some observations on the structure of these sequences:
- The length of the sequence could range from a few hundred data points (PPS) to several million (logic analyzer).
- The data type in these sequences ranges from boolean (logic), basic analog value (AWG) to analog tuples (PPS).
- High-precision analog isn't really relevant in this case: basic floating point values will do.
- The data types in a sequence will be uniform throughout that sequence, so meta information on e.g the MQ for the sequence need only be passed once, not included in every data point.
- Our existing MQ/unit system is by definition good enough to represent the meta data and data types, since it's the sort of thing you capture from one device and play back on another.
- The structure of the actual data depends on the data type(s):
- logic data can be packed exactly as it is coming out of hardware: one bit per channel in as many bytes as needed (lowest-channel byte first), all channels the device can handle represented.
- analog values could be just float or double in local-endian order.
- sets like voltage/current simply have two floats per data point i.e. the MQs are interleaved.
- Basic SR_DF_* packets are entirely suitable for this, simply sent in the other direction.