8 Commits

Author SHA1 Message Date
Noel Eck
20aa4962f0 SWIG: Moved common SWIG syntax to ${libname}.i
This commit moves common SWIG syntax to a ${libname}.i for sensor
libraries.  Much of the swig content was originally duplicated for
each wrapper language which has lead to inconsistencies between wrappers
over time.  This commit moves all swig syntax to a common file.  Language
specific swig syntax can be added with #ifdef SWIG<LANGUAGE>.

The src/CMakeLists.txt will look first for a language-specific .i file,
then fall back to ${libname}.i.  In this way, it's possible to override
the common ${libname}.i file.  If a fallback .i file does NOT exist,
UPM CMake will generate a simple interface file for all languages.

Example:
    If no src/abp/pyupm_abp.i and no src/abp/abp.i then
    generate ${CMAKE_CURRENT_BINARY_DIR}/abp.i

When src/CMakeLists.txt uses a common ${libname}.i, it adds a -module
<language>upm_${libname} to the swig command line.

In the example below, a -module argument is provided for both Java and
Javascript, while the python module takes all syntax from pyupm_abp.i.

    SWIG FILE              Language       CMake added SWIG args
    ---------------        ----------     ---------------------
    src/abp/abp.i          java           -module javaupm_abp
    src/abp/abp.i          javascript     -module jsupm_abp
    src/abp/pyupm_abp.i    python

This commit removes ~4500 redundant lines for the UPM repository and
helps promote uniformity for the SWIG'ed languages.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-21 10:51:44 -08:00
Noel Eck
922e0cc26b cpp_headers: Renamed C++ headers from .h -> .hpp
To make room for UPM C and C++ sensor code to coexist, all UPM
C++ headers have been renamed from h -> hpp.  This commit contains
updates to documentation, includes, cmake collateral, examples, and
swig interface files.

    * Renamed all cxx/cpp header files which contain the string
    'copyright intel' from .h -> .hpp (if not already hpp).

    * Replaced all references to .h with .hpp in documentation,
    source files, cmake collateral, example code, and swig interface
    files.

    * Replaced cmake variable module_h with module_hpp.

    * Intentionally left upm.h since this file currently does not
    contain code (documentation only).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-04-28 14:00:54 -07:00
Mihai Tudor Panu
e0bc9573d4 docs: updated links to documentation pages from readme.md and for porting example
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-06-03 11:58:13 -07:00
Mihai Tudor Panu
b4c265005f docs: few touch ups and typos fixed
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2015-03-04 11:26:23 -08:00
Brendan Le Foll
6d239b9f63 docs: fix warnings in doc creation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-08-28 17:59:21 +01:00
Brendan Le Foll
2822d63c9c upm.i: add top level interface file which includes std_string.i
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-06-25 14:16:28 +01:00
Thomas Ingleby
36be22cb90 mraa: change all existing code to use libmraa.
* Made CMake depend on 0.4 libmraa

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-06-25 10:05:27 +01:00
Brendan Le Foll
2c1baf66b5 max31855: add sensor and documentation on creation of a UPM sensor
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-06-13 16:45:55 +01:00