- case SR_DF_META_LOGIC:
- g_message("cli: Received SR_DF_META_LOGIC");
- meta_logic = packet->payload;
- num_enabled_probes = 0;
- for (i = 0; i < meta_logic->num_probes; i++) {
- probe = g_slist_nth_data(sdi->probes, i);
- if (probe->enabled)
- logic_probelist[num_enabled_probes++] = probe->index;
- }
- logic_probelist[num_enabled_probes] = -1;
- /* How many bytes we need to store num_enabled_probes bits */
- unitsize = (num_enabled_probes + 7) / 8;
-
- outfile = stdout;
- if (opt_output_file) {
- if (default_output_format) {
- /* output file is in session format, which means we'll
- * dump everything in the datastore as it comes in,
- * and save from there after the session. */
- outfile = NULL;
- ret = sr_datastore_new(unitsize, &singleds);
- if (ret != SR_OK) {
- g_critical("Failed to create datastore.");
- exit(1);
- }
- } else {
- /* saving to a file in whatever format was set
- * with --format, so all we need is a filehandle */
- outfile = g_fopen(opt_output_file, "wb");
- }
- }
- if (opt_pds)
- srd_session_start(num_enabled_probes, unitsize,
- meta_logic->samplerate);
- break;
-