Age | Commit message (Collapse) | Author |
|
|
|
This is not really finished, or tested, or working. It's also a decoder
which stacks on top of the I2C decoder, and the infrastructure for
stacking decoders is not yet usable.
|
|
Functions changed to srd_session_start() to initialise the session,
and srd_session_feed() to feed sample data to the decoders.
|
|
|
|
The psyco module seems to be mostly unmaintained at this point, it does
not support Python 2.7 or higher at all, it only supports x86, it doesn't
support 64 bit systems at all, etc. etc.
We should try to find other ways to optimize our decoders for speed.
|
|
|
|
This is the most commonly used and recommended method for docstrings.
|
|
|
|
This should be working OK for most use-cases now, though there certainly
are a few TODOs left. The output format is just a quick hack and will
change.
|
|
Before this was passed to the decoder's constuctor, but the parameters
may not all be known at construction. Decoders now have a method start()
which is called at the start of the capture, and metadata is passed as
an arg to this function.
|
|
This decoder is probably not fully converted yet, and doesn't really
successfully decode I2C, yet. It's work in progress.
|
|
|
|
This is still work-in-progress, but at least it runs and outputs stuff now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There is currently no way to configure options or probes, so they'll
always be the same, but it's a start.
|
|
|
|
|
|
|
|
to work with this.
|
|
|
|
|
|
|
|
|
|
|
|
Disable decoders, disable lib building.
|
|
The .py decoder files are not technically scripts and should not be
executable and can not be invoked on the command line
(via ./foo.py --help or similar).
|
|
|
|
|
|
|
|
|
|
Get the following string fields from the .py decoders' register()
function and store them in the respective 'struct srd_decoder':
- longname
- longdesc
- author
- email
- license
|
|
Make the list of metadata info match the spec in the wiki more closely.
|
|
There were several issues with the other method, revert for now.
|
|
Until now the build would break if the user doesn't enable at least one
of the libusb1.0-based LAs. I.e., you could not compile only OLS, or
only the demo driver.
|
|
|
|
Do the same for sigrokdecode_ -> srd_ in struct names and function names.
|
|
|
|
Let sigrokdecode_init() always load all decoders it can find in the
decoders directory, i.e., the user doesn't need to manually load decoders.
Instead he can just look up the list via sigrokdecode_list_decoders()
after sigrokdecode_init() has run.
This is not a problem, as sigrokdecode_init() is only run once per
sigrok-cli or sigrok-gui invocation, and even with many decoders this
should not take too long.
The list of decoders within libsigrokdecode is no longer a string, but
rather a list of 'struct sigrokdecode_decoder *' pointers.
Add sigrokdecode_get_decoder_by_id() API function which returns the
decoder with the specified ID (file name without ".py" suffix, for now),
or NULL if it cannot be found.
sigrokdecode_load_decoder() is now a private function and not exported
via the lib, i.e. not available to users of libsigrokdecode.
|
|
|
|
Use PyImport_ImportModule() instead of PyImport_Import(), so we don't
have to temporarily create a py_name object.
|
|
|
|
They're defined like this in Python.h:
/* Macros to use in case the object pointer may be NULL: */
#define Py_XINCREF(op) if ((op) == NULL) ; else Py_INCREF(op)
#define Py_XDECREF(op) if ((op) == NULL) ; else Py_DECREF(op)
I.e., the performance penalty we take by using Py_XINCREF/Py_XDECREF is
pretty much non-existant.
|
|
|
|
This should fix an error/segfault when running a decoder on bigger
datasets.
|
|
Mark all Python/C API functions returning a new reference with "NEWREF",
and those that steal references with "STEAL".
|