/* List of frontend callbacks to receive decoder output. */
static GSList *callbacks = NULL;
+/** @cond PRIVATE */
+
/* decoder.c */
extern SRD_PRIV GSList *pd_list;
/* type_logic.c */
extern SRD_PRIV PyTypeObject srd_logic_type;
+/** @endcond */
+
/**
* Initialize libsigrokdecode.
*
* be added to the Python sys.path, or NULL.
*
* @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @private
*/
SRD_PRIV int srd_decoder_searchpath_add(const char *path)
{
* @param obj The Python class instantiation.
*
* @return Pointer to struct srd_decoder_inst, or NULL if not found.
+ *
+ * @private
*/
SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj(const GSList *stack,
const PyObject *obj)
return di;
}
+/** @private */
SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di, PyObject *args)
{
PyObject *py_name, *py_res;
* @param inbuflen Length of the buffer. Must be > 0.
*
* @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @private
*/
SRD_PRIV int srd_inst_decode(uint64_t start_samplenum,
const struct srd_decoder_inst *di,
return SRD_OK;
}
+/** @private */
SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di)
{
GSList *l;
g_slist_free(di->pd_output);
}
+/** @private */
SRD_PRIV void srd_inst_free_all(GSList *stack)
{
GSList *l;
return SRD_OK;
}
+/** @private */
SRD_PRIV void *srd_pd_output_callback_find(int output_type)
{
GSList *l;
}
/* This is the backend function to Python sigrokdecode.add() call. */
+/** @private */
SRD_PRIV int srd_inst_pd_output_add(struct srd_decoder_inst *di,
int output_type, const char *proto_id)
{
#include "sigrokdecode-internal.h"
#include <glib.h>
+/** @cond PRIVATE */
+
/* The list of protocol decoders. */
SRD_PRIV GSList *pd_list = NULL;
/* module_sigrokdecode.c */
extern SRD_PRIV PyObject *mod_sigrokdecode;
+/** @endcond */
+
/**
* Returns the list of supported/loaded protocol decoders.
*
#include <glib.h>
#include <frameobject.h> /* Python header not pulled in by default. */
+/** @private */
SRD_PRIV void srd_exception_catch(const char *format, ...)
{
PyObject *etype, *evalue, *etb, *py_str;
static void *srd_log_callback_data = NULL;
/* Log domain (a short string that is used as prefix for all messages). */
+/** @cond PRIVATE */
#define LOGDOMAIN_MAXLEN 30
#define LOGDOMAIN_DEFAULT "srd: "
+/** @endcond */
static char srd_log_domain[LOGDOMAIN_MAXLEN + 1] = LOGDOMAIN_DEFAULT;
/**
return ret;
}
+/** @private */
SRD_PRIV int srd_log(int loglevel, const char *format, ...)
{
int ret;
return ret;
}
+/** @private */
SRD_PRIV int srd_spew(const char *format, ...)
{
int ret;
return ret;
}
+/** @private */
SRD_PRIV int srd_dbg(const char *format, ...)
{
int ret;
return ret;
}
+/** @private */
SRD_PRIV int srd_info(const char *format, ...)
{
int ret;
return ret;
}
+/** @private */
SRD_PRIV int srd_warn(const char *format, ...)
{
int ret;
return ret;
}
+/** @private */
SRD_PRIV int srd_err(const char *format, ...)
{
int ret;
#include "sigrokdecode-internal.h"
#include "config.h"
+/** @cond PRIVATE */
+
/* type_decoder.c */
extern SRD_PRIV PyTypeObject srd_Decoder_type;
*/
SRD_PRIV PyObject *mod_sigrokdecode = NULL;
+/** @endcond */
+
static struct PyModuleDef sigrokdecode_module = {
PyModuleDef_HEAD_INIT,
.m_name = "sigrokdecode",
.m_size = -1,
};
+/** @cond PRIVATE */
/* FIXME: SRD_PRIV causes issues on MinGW. Investigate. */
PyMODINIT_FUNC PyInit_sigrokdecode(void)
{
return mod;
}
+/** @endcond */
{NULL, NULL, 0, NULL}
};
+/** @cond PRIVATE */
SRD_PRIV PyTypeObject srd_Decoder_type = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "sigrokdecode.Decoder",
.tp_doc = "sigrok Decoder base class",
.tp_methods = Decoder_methods,
};
+/** @endcond */
return logic->sample;
}
+/** @cond PRIVATE */
SRD_PRIV PyTypeObject srd_logic_type = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "srd_logic",
.tp_iter = srd_logic_iter,
.tp_iternext = srd_logic_iternext,
};
+/** @endcond */
*
* @return SRD_OK upon success, a (negative) error code otherwise.
* The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
*/
SRD_PRIV int py_attr_as_str(const PyObject *py_obj, const char *attr,
char **outstr)
*
* @return SRD_OK upon success, a (negative) error code otherwise.
* The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
*/
SRD_PRIV int py_dictitem_as_str(const PyObject *py_obj, const char *key,
char **outstr)
*
* @return SRD_OK upon success, a (negative) error code otherwise.
* The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
*/
SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr)
{
*
* @return SRD_OK upon success, a (negative) error code otherwise.
* The 'outstr' argument points to a g_malloc()ed char** upon success.
+ *
+ * @private
*/
SRD_PRIV int py_strlist_to_char(const PyObject *py_strlist, char ***outstr)
{