PyGILState_STATE gstate;
i = 1;
- srd_dbg("Creating new %s instance.", decoder_id);
if (!sess)
return NULL;
/* Instance takes input from a frontend by default. */
sess->di_list = g_slist_append(sess->di_list, di);
- srd_dbg("Created new %s instance with ID %s.", decoder_id, di->inst_id);
+ srd_dbg("Creating new %s instance %s.", decoder_id, di->inst_id);
return di;
}
/* Stack on top of source di. */
di_bottom->next_di = g_slist_append(di_bottom->next_di, di_top);
- srd_dbg("Stacked %s onto %s.", di_top->inst_id, di_bottom->inst_id);
+ srd_dbg("Stacking %s onto %s.", di_top->inst_id, di_bottom->inst_id);
return SRD_OK;
}
if (di->old_pins_array)
return;
- srd_dbg("%s: Seeding old pins, %s().", di->inst_id, __func__);
count = di->dec_num_channels;
arr = g_array_sized_new(FALSE, TRUE, sizeof(uint8_t), count);
g_array_set_size(arr, count);
int ret;
PyGILState_STATE gstate;
- srd_dbg("Calling start() method on protocol decoder instance %s.",
- di->inst_id);
+ srd_dbg("Calling start() of instance %s.", di->inst_id);
gstate = PyGILState_Ensure();
* "Regular" termination of the decode() method is not expected.
*/
Py_IncRef(di->py_inst);
- srd_dbg("%s: Calling decode() method.", di->inst_id);
+ srd_dbg("%s: Calling decode().", di->inst_id);
py_res = PyObject_CallMethod(di->py_inst, "decode", NULL);
- srd_dbg("%s: decode() method terminated.", di->inst_id);
+ srd_dbg("%s: decode() terminated.", di->inst_id);
if (!py_res)
di->decoder_state = SRD_ERR;
*/
gstate = PyGILState_Ensure();
if (PyObject_HasAttrString(di->py_inst, "reset")) {
- srd_dbg("Calling .reset() of instance %s", di->inst_id);
+ srd_dbg("Calling reset() of instance %s", di->inst_id);
py_ret = PyObject_CallMethod(di->py_inst, "reset", NULL);
Py_XDECREF(py_ret);
}
/* Keep a list of all sessions, so we can clean up as needed. */
sessions = g_slist_append(sessions, *sess);
- srd_dbg("Created session %d.", (*sess)->session_id);
+ srd_dbg("Creating session %d.", (*sess)->session_id);
return SRD_OK;
}
if (!sess)
return SRD_ERR_ARG;
- srd_dbg("Calling start() on all instances in session %d.", sess->session_id);
+ srd_dbg("Calling start() of all instances in session %d.", sess->session_id);
- /* Run the start() method on all decoders receiving frontend data. */
+ /* Run the start() method of all decoders receiving frontend data. */
ret = SRD_OK;
for (d = sess->di_list; d; d = d->next) {
di = d->data;
/* Upon SRD_OUTPUT_PYTHON for stacked PDs, we have a nicer log message later. */
if (pdo->output_type != SRD_OUTPUT_PYTHON && di->next_di != NULL) {
- srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.",
- di->inst_id, start_sample, end_sample,
- output_type_name(pdo->output_type), output_id);
+ srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on "
+ "oid %d (%s).", di->inst_id, start_sample, end_sample,
+ output_type_name(pdo->output_type), output_id,
+ pdo->proto_id);
}
pdata.start_sample = start_sample;
case SRD_OUTPUT_PYTHON:
for (l = di->next_di; l; l = l->next) {
next_di = l->data;
- srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on "
- "oid %d to instance %s.", di->inst_id, start_sample,
+ srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s "
+ "on oid %d (%s) to instance %s.", di->inst_id,
+ start_sample,
end_sample, output_type_name(pdo->output_type),
- output_id, next_di->inst_id);
+ output_id, pdo->proto_id, next_di->inst_id);
if (!(py_res = PyObject_CallMethod(
next_di->py_inst, "decode", "KKO", start_sample,
end_sample, py_data))) {
return py_new_output_id;
}
- srd_dbg("Instance %s creating new output type %s for %s.",
- di->inst_id, output_type_name(output_type), proto_id);
-
pdo = g_malloc(sizeof(struct srd_pd_output));
/* pdo_id is just a simple index, nothing is deleted from this list anyway. */
PyGILState_Release(gstate);
+ srd_dbg("Instance %s creating new output type %s as oid %d (%s).",
+ di->inst_id, output_type_name(output_type), pdo->pdo_id,
+ proto_id);
+
return py_new_output_id;
err: