]> sigrok.org Git - libsigrokdecode.git/blobdiff - type_decoder.c
can: decode CAN-FD DLC
[libsigrokdecode.git] / type_decoder.c
index 2ce7fc15740a74573f52d2a33e57be51ee9c4919..b04747e8f784716074b46462fbe5faa628cc8fca 100644 (file)
@@ -355,9 +355,10 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
 
        /* 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;
@@ -384,10 +385,11 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
        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))) {
@@ -519,9 +521,6 @@ static PyObject *Decoder_register(PyObject *self, PyObject *args,
                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. */
@@ -541,6 +540,10 @@ static PyObject *Decoder_register(PyObject *self, PyObject *args,
 
        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: