* single column mode and enables single column mode. Multi
* column mode is used if this parameter is omitted.
*
* single column mode and enables single column mode. Multi
* column mode is used if this parameter is omitted.
*
- * numprobes: Specifies the number of probes to use. In multi column mode
- * the number of probes are the number of columns and in single
+ * numchannels: Specifies the number of channels to use. In multi column mode
+ * the number of channels are the number of columns and in single
*
* delimiter: Specifies the delimiter for columns. Must be at least one
* character. Comma is used as default delimiter.
*
* delimiter: Specifies the delimiter for columns. Must be at least one
* character. Comma is used as default delimiter.
- * first-probe: Column number of the first probe in multi column mode and
- * position of the bit for the first probe in single column mode.
+ * first-channel: Column number of the first channel in multi column mode and
+ * position of the bit for the first channel in single column mode.
- * and used for probe names in multi column mode. Empty header
- * names will be replaced by the probe number. If enabled in
+ * and used for channel names in multi column mode. Empty header
+ * names will be replaced by the channel number. If enabled in
- * Column number of the first probe in multi column mode and position of
- * the bit for the first probe in single column mode.
+ * Column number of the first channel in multi column mode and position of
+ * the bit for the first channel in single column mode.
/* Line number to start processing. */
gsize start_line;
/*
* Determines if the first line should be treated as header and used for
/* Line number to start processing. */
gsize start_line;
/*
* Determines if the first line should be treated as header and used for
if (str[length - i - 1] == '1') {
ctx->sample_buffer[j / 8] |= (1 << (j % 8));
} else if (str[length - i - 1] != '0') {
if (str[length - i - 1] == '1') {
ctx->sample_buffer[j / 8] |= (1 << (j % 8));
} else if (str[length - i - 1] != '0') {
if (columns[i][0] == '1') {
ctx->sample_buffer[i / 8] |= (1 << (i % 8));
} else if (!strlen(columns[i])) {
sr_err("Column %zu in line %zu is empty.",
if (columns[i][0] == '1') {
ctx->sample_buffer[i / 8] |= (1 << (i % 8));
} else if (!strlen(columns[i])) {
sr_err("Column %zu in line %zu is empty.",
return SR_ERR;
} else if (columns[i][0] != '0') {
sr_err("Invalid value '%s' in column %zu in line %zu.",
return SR_ERR;
} else if (columns[i][0] != '0') {
sr_err("Invalid value '%s' in column %zu in line %zu.",
- * Enable auto-detection of the number of probes in multi column mode
- * and enforce the specification of the number of probes in single
+ * Enable auto-detection of the number of channels in multi column mode
+ * and enforce the specification of the number of channels in single
/* Set default delimiter. */
if (!(ctx->delimiter = g_string_new(","))) {
/* Set default delimiter. */
if (!(ctx->delimiter = g_string_new(","))) {
* In multi column mode start parsing sample data at the first column
* and in single column mode at the first bit.
*/
* In multi column mode start parsing sample data at the first column
* and in single column mode at the first bit.
*/
- if ((param = g_hash_table_lookup(in->param, "numprobes")))
- ctx->num_probes = g_ascii_strtoull(param, NULL, 10);
+ if ((param = g_hash_table_lookup(in->param, "numchannels")))
+ ctx->num_channels = g_ascii_strtoull(param, NULL, 10);
- if ((param = g_hash_table_lookup(in->param, "first-probe")))
- ctx->first_probe = g_ascii_strtoull(param, NULL, 10);
+ if ((param = g_hash_table_lookup(in->param, "first-channel")))
+ ctx->first_channel = g_ascii_strtoull(param, NULL, 10);
if ((param = g_hash_table_lookup(in->param, "startline"))) {
ctx->start_line = g_ascii_strtoull(param, NULL, 10);
if ((param = g_hash_table_lookup(in->param, "startline"))) {
ctx->start_line = g_ascii_strtoull(param, NULL, 10);
- if (!ctx->multi_column_mode && !ctx->num_probes) {
- sr_err("Number of probes needs to be specified in single column mode.");
+ if (!ctx->multi_column_mode && !ctx->num_channels) {
+ sr_err("Number of channels needs to be specified in single column mode.");
- if (!ctx->num_probes) {
- ctx->num_probes = num_columns;
- sr_info("Number of auto-detected probes: %zu.",
- ctx->num_probes);
+ if (!ctx->num_channels) {
+ ctx->num_channels = num_columns;
+ sr_info("Number of auto-detected channels: %zu.",
+ ctx->num_channels);
- if (num_columns < ctx->num_probes) {
- sr_err("Not enough columns for desired number of probes in line %zu.",
+ if (num_columns < ctx->num_channels) {
+ sr_err("Not enough columns for desired number of channels in line %zu.",
- snprintf(probe_name, sizeof(probe_name), "%s",
+ snprintf(channel_name, sizeof(channel_name), "%s",
- snprintf(probe_name, sizeof(probe_name), "%zu", i);
+ snprintf(channel_name, sizeof(channel_name), "%zu", i);
- probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, probe_name);
+ ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, channel_name);
if (!(ctx->sample_buffer = g_try_malloc(ctx->sample_buffer_size))) {
sr_err("Sample buffer malloc failed.");
if (!(ctx->sample_buffer = g_try_malloc(ctx->sample_buffer_size))) {
sr_err("Sample buffer malloc failed.");
- if (ctx->multi_column_mode && num_columns < ctx->num_probes) {
- sr_err("Not enough columns for desired number of probes in line %zu.",
+ if (ctx->multi_column_mode && num_columns < ctx->num_channels) {
+ sr_err("Not enough columns for desired number of channels in line %zu.",