summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-02-06Python decoders: Add more metadata.Uwe Hermann
Make the list of metadata info match the spec in the wiki more closely.
2011-02-04Revert FIRMWARE_DIR / DECODERS_DIR method for now.Uwe Hermann
There were several issues with the other method, revert for now.
2011-02-02Fix build when no libusb-LA is compiled.Uwe Hermann
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.
2011-01-30Consistently use _exit prefix for functions.Uwe Hermann
2011-01-30Change SIGROKDECODE_ prefix to SRD_.Uwe Hermann
Do the same for sigrokdecode_ -> srd_ in struct names and function names.
2011-01-28Properly free all memory upon sigrokdecode_shutdown().Uwe Hermann
2011-01-28libsigrokdecode: Always load all decoders upon init.Uwe Hermann
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.
2011-01-27Fix some compiler warnings.Uwe Hermann
2011-01-27decode.c: Simplify the import code.Uwe Hermann
Use PyImport_ImportModule() instead of PyImport_Import(), so we don't have to temporarily create a py_name object.
2011-01-27Some more simplifications in decode.c.Uwe Hermann
2011-01-27Use Py_XINCREF/Py_XDECREF, not Py_INCREF/Py_DECREF.Uwe Hermann
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.
2011-01-27decode.c: Simplify sigrokdecode_run_decoder().Uwe Hermann
2011-01-27Bugfix: Add missing Py_INCREF()s.Uwe Hermann
This should fix an error/segfault when running a decoder on bigger datasets.
2011-01-27decode.c: Better documentation.Uwe Hermann
Mark all Python/C API functions returning a new reference with "NEWREF", and those that steal references with "STEAL".
2011-01-27decode.c: Fix typos.Uwe Hermann
2011-01-27Bugfix: PyTuple_SetItem() "steals" a reference.Uwe Hermann
2011-01-24configure.ac: Fix firmware/decoders dir variables.Uwe Hermann
FIRMWARE_DIR and DECODERS_DIR as defined in config.h need some magic applied to resolve the $prefix/$data variable to an absolute path.
2011-01-23Introduce proper libtool versioning for the libs.Uwe Hermann
2011-01-20lib headers: Add 'extern "C"' for C++ usage.Uwe Hermann
2011-01-20Re-enable stuff we temporarily disabled for 0.1.Uwe Hermann
2011-01-19Disable decoders and session CLI options for 0.1.Uwe Hermann
2011-01-19Don't install libs and headers in the 0.1 release.Uwe Hermann
The library APIs are not yet usable or finalized, so don't expose the libs for now. Instead, only install sigrok-cli, the manpages, and the decoders.
2011-01-15libsigrokdecode fix to handle unusual dirnames.Uwe Hermann
Windows paths such as c:\... and/or those with spaces in them were problematic.
2011-01-15Only load decoders from $(datadir)/sigrok/decoders.Uwe Hermann
Drop convenience locations which were supposed to allow running ./cli/sigrok-cli in the build directory. That will not really work fine due to some other reasons. We only support running sigrok-cli after an installation (into /usr/local or /opt or $HOME/sigrokinst or whatever).
2011-01-15Don't print .py suffix in protocol decoder names.Uwe Hermann
2011-01-15Bugfix: Use only .py decoders, ignore .pyc files.Uwe Hermann
2011-01-15Don't expose libsigrokdecode's interal GSList.Uwe Hermann
Instead, add a libsigrokdecode_list_decoders() API call which gives you the list of known protocol decoders.
2011-01-15Install decoders into a decoders/ subdir.Uwe Hermann
Use $(datadir)/sigrok/decoders as subdirectory for the protocol decoders (instead of installing them in the top-level $(datadir)/sigrok), just as we do for $(datadir)/sigrok/firmware.
2011-01-15CLI: Support for running protocol decoders.Uwe Hermann
Add a new -A | --list-protocol-decoders option to show the list of protocol decoders we could find. Add -a | --protocol-decoders to specify a list of decoders that shall be applied to the datastream. Currently only works for one decoder. Define DECODERS_DIR, which is the directory where the decoders will be installed upon 'make install', and where libsigrokdecode_init() will search for them. Thanks Olivier Fauchon <olivier@aixmarseille.com> for the initial patch, merged in slightly different form.
2011-01-10Rename the scripts/ directory to decoders/.Uwe Hermann
2011-01-08Fix compile for Python >= 3.0.Uwe Hermann
Python docs tells us more about string functions: "These functions have been renamed to PyBytes_* in Python 3.x. Unless otherwise noted, the PyBytes functions available in 3.x are aliased to their PyString_* equivalents to help porting." (http://docs.python.org/c-api/string.html) Use #defines to map the new names and fix the compile for Python >= 3.0. Thanks Olivier Fauchon <olivier@aixmarseille.com> for the patch.
2010-05-20libsigrokdecode: Use SIGROKDECODE_OK.Uwe Hermann
2010-05-11pkg-config: Add libsigrokdecode.pc.Uwe Hermann
2010-05-11Use CLEANFILES instead of extra target.Uwe Hermann
2010-05-09scripts: Add clean-local target for *.pyc.Uwe Hermann
2010-05-05I2C: Convert output to more usable format.Uwe Hermann
2010-04-27i2c.py: Fix typo resulting in a nonworking script.Uwe Hermann
2010-04-27Add Python decoder for the Wii Nunchuk.Uwe Hermann
Untested, unfinished.
2010-04-24I2C decoder format draft (unfinished).Uwe Hermann
2010-04-24Various small decoder script fixes.Uwe Hermann
2010-04-24dist_pkgdata_SCRIPTS: Add i2c.py.Uwe Hermann
2010-04-24Various Python decoder infrastructure improvements.Uwe Hermann
- Introduce 'struct sigrokdecode_decoder'. - Decoders are now handled via two C functions: - sigrokdecode_load_decoder(): Fills a 'struct sigrokdecode_decoder'. - sigrokdecode_run_decoder(): Runs a decoder function. - There are now two decoder API functions a script needs to implement: - register(): Returns a Python dict with certain metadata. - decode(): Runs the actual decoder code. - libsigrokdecode: Add and use some more #defines for errors: - SIGROKDECODE_ERR_ARGS - SIGROKDECODE_ERR_PYTHON - Various other smaller Python decode script infrastructure issues.
2010-04-23sigrokdecode.h: Add struct sigrokdecode_decoder_info.unknown
2010-04-23Rename sigrokdecode_register_i2c() to register().unknown
2010-04-23transitioncounter: Add register() function.unknown
2010-04-23sigrokdecode_run_decoder(): Pass in the module name.unknown
2010-04-21Python: Use "enums" as states, not strings.Uwe Hermann
Also, fix a typo.
2010-04-18Python: Bugfixes (True/False != 1/0).Uwe Hermann
2010-04-18Python: Use range instead of xrange.Uwe Hermann
For small numbers range seems to be faster, and xramge is being removed anyway in Python 3 AFAIK.
2010-04-18sigrokdecode_init: Add more Python search paths.Uwe Hermann