* The requested unit size must be big enough to hold as
* much data as is specified by the number of enabled
* probes in 'probelist'.
* The requested unit size must be big enough to hold as
* much data as is specified by the number of enabled
* probes in 'probelist'.
- * @param probelist Pointer to a list of probe numbers, numbered starting
- * from 0. The list is terminated with -1.
+ * @param probe_array Pointer to a list of probe numbers, numbered starting
+ * from 0. The list is terminated with -1.
* @param data_in Pointer to the input data buffer. Must not be NULL.
* @param length_in The input data length (>= 1), in number of bytes.
* @param data_out Variable which will point to the newly allocated buffer
* @param data_in Pointer to the input data buffer. Must not be NULL.
* @param length_in The input data length (>= 1), in number of bytes.
* @param data_out Variable which will point to the newly allocated buffer
* or SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, the values of
* out_unitsize, data_out, and length_out are undefined.
* or SR_ERR_ARG upon invalid arguments.
* If something other than SR_OK is returned, the values of
* out_unitsize, data_out, and length_out are undefined.
-SR_API int sr_filter_probes(int in_unitsize, int out_unitsize,
- const int *probelist, const uint8_t *data_in,
+SR_API int sr_filter_probes(unsigned int in_unitsize, unsigned int out_unitsize,
+ const GArray *probe_array, const uint8_t *data_in,
uint64_t length_in, uint8_t **data_out,
uint64_t *length_out)
{
unsigned int in_offset, out_offset;
uint64_t length_in, uint8_t **data_out,
uint64_t *length_out)
{
unsigned int in_offset, out_offset;
- "size (%d)", __func__, num_enabled_probes, out_unitsize);
+ "size (%d)", __func__, probe_array->len, out_unitsize);
/* All probes are used -- no need to compress anything. */
memcpy(*data_out, data_in, length_in);
*length_out = length_in;
/* All probes are used -- no need to compress anything. */
memcpy(*data_out, data_in, length_in);
*length_out = length_in;
while (in_offset <= length_in - in_unitsize) {
memcpy(&sample_in, data_in + in_offset, in_unitsize);
sample_out = out_bit = 0;
while (in_offset <= length_in - in_unitsize) {
memcpy(&sample_in, data_in + in_offset, in_unitsize);
sample_out = out_bit = 0;