mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
sensortemplate: Added a template sensor
The purpose of the templatesensor is to get contributors up and running faster when adding a new sensor. * Created library named 'sensortemplate' * Added C++ source * Added swig interface files for java, javascript, and python * Added sensortemplate image file * Added examples for c++, java, javascript, and python * Updated contributions.md with steps to create a new sensor from the sensortemplate library. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
17
src/sensortemplate/javaupm_sensortemplate.i
Normal file
17
src/sensortemplate/javaupm_sensortemplate.i
Normal file
@ -0,0 +1,17 @@
|
||||
/* Specify the name of the target JAVA module */
|
||||
%module javaupm_sensortemplate
|
||||
|
||||
/* Include the base sensor interface file */
|
||||
%include "common.i"
|
||||
|
||||
/* Add the JAVA code to load the module */
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_sensortemplate");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
Reference in New Issue
Block a user