From a524a8dee51b090eb3673d2bf82ea192795f3ff9 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Wed, 3 May 2017 16:36:42 +0530 Subject: [PATCH 01/11] Adding android sense ui feature. --- .../pom.xml | 163 ++++++++++++++++++ .../src/main/resources/build.properties | 1 + .../datasources/androidsense-datasources.xml | 46 +++++ .../src/main/resources/dbscripts/h2.sql | 8 + .../src/main/resources/dbscripts/mssql.sql | 8 + .../src/main/resources/dbscripts/mysql.sql | 12 ++ .../src/main/resources/dbscripts/oracle.sql | 8 + .../main/resources/dbscripts/postgresql.sql | 8 + .../resources/devicetypes/android_sense.xml | 71 ++++++++ .../src/main/resources/p2.inf | 22 +++ .../androidsense-plugin-feature/pom.xml | 2 +- 11 files changed, 348 insertions(+), 1 deletion(-) create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml new file mode 100644 index 000000000..9d27465fa --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml @@ -0,0 +1,163 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + androidsense-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.androidsense.ui.feature + 3.0.32-SNAPSHOT + pom + WSO2 Carbon - IoT Server Android Sense UI Feature + http://wso2.org + This feature contains the Android Sense Device type UI specific implementations for the IoT Server + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.androidsense.ui + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt + + **/* + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-android-sense-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.androidsense + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/build.properties b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/build.properties new file mode 100644 index 000000000..93c4b1070 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml new file mode 100644 index 000000000..9a1374b09 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/datasources/androidsense-datasources.xml @@ -0,0 +1,46 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + AndroidSenseDM_DB + The datasource used for the Android Sense database + + jdbc/AndroidSenseDM_DB + + + + jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 000000000..ee3bfa73a --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 000000000..cf677ff07 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 000000000..4637b4daf --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 000000000..6f8537eb8 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 000000000..987f4992b --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID)); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml new file mode 100644 index 000000000..764aa311a --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/devicetypes/android_sense.xml @@ -0,0 +1,71 @@ + + + + + + + Add Keywords + Send keywords to the device + + + + + + + + Add Threshold + Send Threshold to the device + + + + + + + + Remove words + Remove Threshold from the device + + + + + + + + + + true + + + + true + + + androidsense.mqtt.adapter + 0 + true + + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..90429a5c2 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf @@ -0,0 +1,22 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml index 4e5ea1be0..bd59256e2 100644 --- a/features/device-types-feature/androidsense-plugin-feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml @@ -33,7 +33,7 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.androidsense.feature + org.wso2.carbon.device.mgt.iot.androidsense.ui.feature From ef84791510e70bfdca5775b258075c59ae353f6d Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 15:21:24 +0530 Subject: [PATCH 02/11] Finishing the android sense feature into sub features UI/BE/Analytics. --- .../pom.xml | 172 +++++++++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/p2.inf | 6 + .../pom.xml | 226 ++++++++++++++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/cloud.p2.inf | 21 ++ .../datasources/androidsense-datasources.xml | 46 ++++ .../src/main/resources/dbscripts/h2.sql | 8 + .../src/main/resources/dbscripts/mssql.sql | 8 + .../src/main/resources/dbscripts/mysql.sql | 12 + .../src/main/resources/dbscripts/oracle.sql | 8 + .../main/resources/dbscripts/postgresql.sql | 8 + .../src/main/resources/default.p2.inf | 19 ++ .../resources/devicetypes/android_sense.xml | 71 ++++++ .../src/main/resources/default.p2.inf | 2 +- .../pom.xml | 64 ++++- .../src/main/resources/cloud.p2.inf | 24 ++ .../src/main/resources/default.p2.inf | 22 ++ .../src/main/resources/p2.inf | 8 +- .../androidsense-plugin-feature/pom.xml | 3 + .../pom.xml | 149 ++++++++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/p2.inf | 6 + .../pom.xml | 136 +++++++++++ .../src/main/resources/build.properties | 1 + .../main/resources/devicetypes/arduino.xml | 43 ++++ .../src/main/resources/p2.inf | 12 + .../pom.xml | 135 +++++++++++ .../main/resources/agent/ArduinoBoardSketch.h | 77 ++++++ .../resources/agent/ArduinoBoardSketch.ino | 83 +++++++ .../src/main/resources/agent/Connect.ino | 163 +++++++++++++ .../src/main/resources/agent/PollServer.ino | 82 +++++++ .../src/main/resources/agent/PushData.ino | 133 +++++++++++ .../src/main/resources/agent/deviceType.png | Bin 0 -> 10418 bytes .../main/resources/agent/sketch.properties | 20 ++ .../src/main/resources/build.properties | 1 + .../main/resources/devicetypes/arduino.xml | 43 ++++ .../src/main/resources/p2.inf | 20 ++ .../arduino-plugin-feature/pom.xml | 5 +- 39 files changed, 1833 insertions(+), 7 deletions(-) create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/deviceType.png create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/sketch.properties create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/devicetypes/arduino.xml create mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml new file mode 100644 index 000000000..4bd0e3f5b --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml @@ -0,0 +1,172 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + androidsense-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature + 3.0.32-SNAPSHOT + pom + WSO2 Carbon - IoT Server Android Sense Analytics Feature + http://wso2.org + This feature contains the Android Sense Device type specific analytics implementations for the IoT Server + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.androidsense.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + unpack-analytics + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.analytics + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + unpack-geo + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.iot.geo.dashboard + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.androidsense.analytics + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} + + + + + + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/build.properties b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/build.properties new file mode 100644 index 000000000..93c4b1070 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..f3bf580fa --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf @@ -0,0 +1,6 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml new file mode 100644 index 000000000..855e0e4f1 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/pom.xml @@ -0,0 +1,226 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + androidsense-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.androidsense.backend.feature + 3.0.32-SNAPSHOT + pom + WSO2 Carbon - IoT Server Android Sense Backend Feature + http://wso2.org + This feature contains the Android Sense Device type specific backend implementations for the IoT Server + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.androidsense.api + war + + + com.h2database.wso2 + h2-database-engine + + + + + + + default-profile + + true + + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + + cloud + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.androidsense.api + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + android_sense.war + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-android-sense-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.androidsense.backend + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/build.properties b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/build.properties new file mode 100644 index 000000000..93c4b1070 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf new file mode 100644 index 000000000..9c796aaa0 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/cloud.p2.inf @@ -0,0 +1,21 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml new file mode 100644 index 000000000..9a1374b09 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/datasources/androidsense-datasources.xml @@ -0,0 +1,46 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + AndroidSenseDM_DB + The datasource used for the Android Sense database + + jdbc/AndroidSenseDM_DB + + + + jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 000000000..ee3bfa73a --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 000000000..cf677ff07 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 000000000..4637b4daf --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 000000000..6f8537eb8 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 000000000..987f4992b --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `ANDROID_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( + ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (ANDROID_DEVICE_ID)); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf new file mode 100644 index 000000000..b04588644 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf @@ -0,0 +1,19 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml new file mode 100644 index 000000000..764aa311a --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/devicetypes/android_sense.xml @@ -0,0 +1,71 @@ + + + + + + + Add Keywords + Send keywords to the device + + + + + + + + Add Threshold + Send Threshold to the device + + + + + + + + Remove words + Remove Threshold from the device + + + + + + + + + + true + + + + true + + + androidsense.mqtt.adapter + 0 + true + + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf index e8ab4aeea..5423fc55d 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf @@ -5,7 +5,7 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../../resources/devicetypes/android_sense/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml index 9d27465fa..928cfca4b 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml @@ -36,6 +36,68 @@ This feature contains the Android Sense Device type UI specific implementations for the IoT Server + + + com.h2database.wso2 + h2-database-engine + + + + + + default-profile + + true + + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + + cloud + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + @@ -141,7 +203,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.androidsense + org.wso2.carbon.device.mgt.iot.androidsense.ui ../../../features/etc/feature.properties diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf new file mode 100644 index 000000000..bbdc137a0 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf @@ -0,0 +1,24 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf new file mode 100644 index 000000000..d269b678e --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf @@ -0,0 +1,22 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf index 90429a5c2..d269b678e 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf @@ -2,12 +2,12 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml index bd59256e2..01b2f146b 100644 --- a/features/device-types-feature/androidsense-plugin-feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml @@ -33,7 +33,10 @@ http://wso2.org + org.wso2.carbon.device.mgt.iot.androidsense.ui.feature + org.wso2.carbon.device.mgt.iot.androidsense.backend.feature + org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml new file mode 100644 index 000000000..7b7d734b3 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml @@ -0,0 +1,149 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + arduino-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.arduino.analytics.feature + pom + WSO2 Carbon - IoT Server Arduino Analytics Feature + http://wso2.org + This feature contains the Arduino Device type specific anaytics implementations for the IoT Server + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.arduino.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + unpack-analytics + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.analytics + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.arduino + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} + + + + + + + + + + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/build.properties b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..032418230 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf @@ -0,0 +1,6 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps//arduino.car);\ \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml new file mode 100644 index 000000000..f615c9a12 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml @@ -0,0 +1,136 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + arduino-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.arduino.backend.feature + pom + WSO2 Carbon - IoT Server Arduino Backend Feature + http://wso2.org + This feature contains the Arduino Device type backend specific implementations for the IoT Server + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.arduino.api + war + + + com.h2database.wso2 + h2-database-engine + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.arduino.api + + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + + arduino.war + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.arduino + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/build.properties b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml new file mode 100644 index 000000000..7871e1d42 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/devicetypes/arduino.xml @@ -0,0 +1,43 @@ + + + + + + + Control Bulb + Control Bulb on Arduino Uno + + + state + + + + + + + false + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..6c09044b9 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf @@ -0,0 +1,12 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml new file mode 100644 index 000000000..e65857bd9 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/pom.xml @@ -0,0 +1,135 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + arduino-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.arduino.ui.feature + pom + WSO2 Carbon - IoT Server Arduino UI Feature + http://wso2.org + This feature contains the Arduino Device type UI specific implementations for the IoT Server + + + + + com.h2database.wso2 + h2-database-engine + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.arduino.ui + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt + + **/* + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.arduino + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h new file mode 100644 index 000000000..b6955cf79 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.h @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +**/ + +#ifndef ArduinoWifiAgent_H +#define ArduinoWifiAgent_H + +#include "Arduino.h" + +// These are the interrupt and control pins +#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin! +// These can be any two pins +#define ADAFRUIT_CC3000_VBAT 5 +#define ADAFRUIT_CC3000_CS 10 + +#define WLAN_SSID "ssid" // Your wifi network SSID (cannot be longer than 32 characters!) +#define WLAN_PASS "password" // Your wifi network password + +#define WLAN_SECURITY WLAN_SEC_WPA2 +// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 +#define IDLE_TIMEOUT_MS 3000 + +#define DEVICE_OWNER "${DEVICE_OWNER}" +#define DEVICE_ID "${DEVICE_ID}" +#define DEVICE_TOKEN "${DEVICE_TOKEN}" +#define REFRESH_DEVICE_TOKEN "${DEVICE_REFRESH_TOKEN}" +#define DEVICE_TYPE "arduino" +#define TIME 0 +#define SUPER_TENANT "carbon.super" + +#define DAS_SERVICE_EPOINT "/endpoints${TENANT_DOMAIN}/arduino_receiver?deviceId=${DEVICE_ID}" + +#define IOT_SERVICE_EPOINT "/arduino/device/${DEVICE_ID}/controls" + +#define POLL_INTERVAL 1000 +#define PUSH_INTERVAL 10000 +#define DEBUG true +#define CON_DEBUG true + +#define SERVICE_PORT ${SERVER_EP_PORT} //http port of iot server + +byte server[4] = {${SERVER_EP_IP}}; //Ip address of iot server + +//set static Ip +/** +byte deviceIP[4] = { 192, 168, 1,110 }; //Ststic ip address of arduino +byte dns2[] = { 8, 8, 8, 8 }; //Ststic dns of arduino +byte subnet[] = { 255, 255, 255, 0 }; //Ststic subnet of arduino +byte gateway[] = { 192, 168, 1, 1 }; //Ststic gateway of arduino +*/ + +String host, jsonPayLoad, replyMsg; +String responseMsg, subStrn; +double cpuTemperature = 0; +static unsigned long pushTimestamp = 0; +static unsigned long pollTimestamp = 0; +char charBuf[10]; +String payLoad; + + +#endif + + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino new file mode 100644 index 000000000..7f0e6941a --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/ArduinoBoardSketch.ino @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +**/ + + +#include "ArduinoBoardSketch.h" +#include +#include +#include +Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, + SPI_CLOCK_DIVIDER); // you can change this clock speed + +Adafruit_CC3000_Client client; + +uint32_t sserver; + + +void setup() +{ + Serial.begin(115200); + Serial.println(F("Internal Temperature Sensor")); + pinMode(6, OUTPUT); + pinMode(13, OUTPUT); + connectHttp(); + setupResource(); + wdt_enable(WDTO_8S); + +} + +void loop() +{ + wdt_reset(); + while( !cc3000.checkConnected() ){ + connectHttp(); + + } + + + cpuTemperature=getBoardTemp(); + + + if(millis() - pushTimestamp > PUSH_INTERVAL){ + while (!client.connected()) { + setupClient(); + } + pushData(); + + pushTimestamp = millis(); + } + + //Serial.println("PUSHED"); + + + wdt_reset(); + + if(millis() - pollTimestamp > POLL_INTERVAL){ + while (!client.connected()) { + setupClient(); + } + Serial.println("Read Controls"); + readControls(); + + pollTimestamp = millis(); + + } + +// //Serial.println("LOOPING"); + wdt_reset(); +} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino new file mode 100644 index 000000000..ba3785325 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/Connect.ino @@ -0,0 +1,163 @@ +/** + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +**/ + +#include "ArduinoBoardSketch.h" +/********************************************************************************************** + Use the below variables when required to set a static IP for the WifiSheild + ***********************************************************************************************/ + + uint32_t ip, ddns, ssubnet, ggateway; + +String connecting = "connecting.... "; + +void connectHttp() { + /* Initialise the module */ + if(DEBUG) Serial.println(F("\nInitializing...")); + if (!cc3000.begin()) + { + if(DEBUG) Serial.println(F("Couldn't begin()! Check your wiring?")); + while(1); + } + + /********************************************************************************************** + Only required if using static IP for the WifiSheild + ***********************************************************************************************/ + + /** + ip = cc3000.IP2U32(deviceIP[0], deviceIP[1], deviceIP[2], deviceIP[3]); + ddns = cc3000.IP2U32(dns2[0], dns2[1], dns2[2], dns2[3]); + ssubnet = cc3000.IP2U32(subnet[0], subnet[1], subnet[2], subnet[3]); + ggateway = cc3000.IP2U32(gateway[0], gateway[1], gateway[2], gateway[3]); + cc3000.setStaticIPAddress(ip, ssubnet, ggateway, ddns); + */ + // required for setting static IP + + /***********************************************************************************************/ + + + sserver = cc3000.IP2U32(server[0], server[1], server[2], server[3]); + + if(CON_DEBUG) { + Serial.print(F("\nAttempting to connect to ")); + Serial.println(WLAN_SSID); + } + + cc3000.deleteProfiles(); + + if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) { + if(CON_DEBUG) Serial.println(F("Failed!")); + while(1); + } + + if(CON_DEBUG) Serial.println(F("Connected to Wifi network!")); + + if(CON_DEBUG) Serial.println(F("Request DHCP")); + while (!cc3000.checkDHCP()) + { + delay(100); + } + + /* Display the IP address DNS, Gateway, etc. */ + while (! displayConnectionDetails()) { + delay(1000); + } + + if (cc3000.checkConnected()) { + Serial.println("client Connected to AP"); + client = cc3000.connectTCP(sserver, SERVICE_PORT); + if (client.connected()) { + if(CON_DEBUG) Serial.println("client Connected to server"); + } else { + if(CON_DEBUG) Serial.println(F("client Connection failed")); + } + } else { + Serial.println(F("client Connection to AP failed")); + } + + if(CON_DEBUG) Serial.println(F("-------------------------------------")); +} + + +void setupResource(){ + String hostIP = getHostIP(server); + String port = String(SERVICE_PORT); + + host = "Host: " + hostIP + ":" + port; + if(DEBUG) Serial.println(host); + + jsonPayLoad = "{\"event\":{\"metaData\":"; + jsonPayLoad += "{\"owner\":\""; + jsonPayLoad += String(DEVICE_OWNER); + jsonPayLoad += "\",\"deviceId\":\""; + jsonPayLoad += String(DEVICE_ID); + jsonPayLoad += "\"}, \"payloadData\":{"; + + if(DEBUG) { + Serial.print("JSON Payload: "); + Serial.println(jsonPayLoad); + Serial.println("-------------------------------"); + } +} + +String getHostIP(byte server[4]){ + String hostIP = String(server[0]); + + for ( int index = 1; index < 4; index++) { + hostIP += "." + String(server[index]); + } + + return hostIP; +} + + +bool displayConnectionDetails(void) +{ + uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv; + + if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv)) + { + if(DEBUG) Serial.println(F("Unable to retrieve the IP Address!\r\n")); + return false; + } + else + { + if(CON_DEBUG) { + Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress); + Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask); + Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway); + Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv); + Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv); + Serial.println(); + } + return true; + } +} + +void setupClient(){ + client = cc3000.connectTCP(sserver, SERVICE_PORT); //SERVICE_PORT + if (client.connected()) { + if(CON_DEBUG) Serial.println("client Connected to server"); + } else { + while( !cc3000.checkConnected() ){ + connectHttp(); + + } + if(CON_DEBUG) Serial.println(F("client Connection failed")); + } +} + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino new file mode 100644 index 000000000..040790f2d --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PollServer.ino @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +**/ + +#include "ArduinoBoardSketch.h" +void readControls() { + // String responseMsg; + + Serial.println("Started.."); + + client.fastrprint(F("GET ")); + client.fastrprint(IOT_SERVICE_EPOINT); + client.fastrprint(F(" HTTP/1.1")); + client.fastrprint(F("\n")); + client.fastrprint(host.c_str());client.fastrprint(F("\n")); + client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); + client.fastrprint(F("\n")); + client.fastrprint(F("protocol: HTTP\n")); + + client.println(); + + if(DEBUG) { + Serial.print("GET "); + Serial.print(IOT_SERVICE_EPOINT); + Serial.print(" HTTP/1.1"); Serial.println(); + Serial.print(host); Serial.println(); + Serial.print("Content-Type: application/json"); Serial.println(); + Serial.println(); + } + + delay(1000); + + while (client.available()) { + char response = client.read(); + if(DEBUG) Serial.print(response); + responseMsg += response; + + } + Serial.println(); + Serial.println("Ended.."); + int index = responseMsg.lastIndexOf(":"); + int newLine = responseMsg.lastIndexOf("\n"); + subStrn = responseMsg.substring(index + 1); + responseMsg = responseMsg.substring(newLine + 1, index); + + if(DEBUG) { + Serial.print("Polling Response: "); + Serial.print(responseMsg); + Serial.println(); + Serial.println("-------------------------------"); + } + + if (subStrn.equals("ON")) { + Serial.println("ITS ON"); + digitalWrite(13, HIGH); + digitalWrite(6, HIGH); + } else if (subStrn.equals("OFF")){ + + Serial.println("ITS OFF"); + digitalWrite(13, LOW); + digitalWrite(6, LOW); + + } + responseMsg = ""; + +} + + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino new file mode 100644 index 000000000..c5879b0fe --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/PushData.ino @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. +**/ + +#include "ArduinoBoardSketch.h" + +/********************************************************************************************** + This method will traverse the array of digital pins and batch the data from the those pins together. + It makes a single call to the server and sends all pin values as a batch. + Server dis-assembles it accordingly and makes multiple publish calls for each sensor type. + ***********************************************************************************************/ + +void pushData(){ + + payLoad = "\"temperature\":"; + payLoad += dtostrf(cpuTemperature, 3, 2, charBuf); + payLoad += "}}}"; + + client.fastrprint(F("POST ")); + client.fastrprint(DAS_SERVICE_EPOINT); + client.fastrprint(F(" HTTP/1.1")); client.fastrprint(F("\n")); + client.fastrprint(host.c_str()); client.fastrprint(F("\n")); + client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); + client.fastrprint(F("Content-Type: application/json")); client.fastrprint(F("\n")); + client.fastrprint(F("Accept: application/json")); client.fastrprint(F("\n")); + client.fastrprint(F("Content-Length: ")); + + int payLength = jsonPayLoad.length() + payLoad.length(); + + client.fastrprint(String(payLength).c_str()); client.fastrprint(F("\n")); + client.fastrprint(F("\n")); + + if(DEBUG) { + Serial.print("POST "); + Serial.print(DAS_SERVICE_EPOINT); + Serial.print(" HTTP/1.1"); Serial.println(); + Serial.print(host); Serial.println(); + Serial.print("Content-Type: application/json"); Serial.println(); + Serial.print("Content-Length: "); + Serial.print(payLength); Serial.println(); + Serial.println(); + } + + + int chunkSize = 50; + + for (int i = 0; i < jsonPayLoad.length(); i++) { + if ( (i+1)*chunkSize > jsonPayLoad.length()) { + client.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); + if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); + i = jsonPayLoad.length(); + } else { + client.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); + if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); + } + } + + for (int i = 0; i < payLoad.length(); i++) { + if ( (i+1)*chunkSize > payLoad.length()) { + client.print(payLoad.substring(i*chunkSize, payLoad.length())); + if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, payLoad.length())); + i = payLoad.length(); + } else { + client.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); + if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); + } + } + + client.fastrprint(F("\n")); + if(DEBUG) Serial.println(); + + delay(1000); + + + while (client.available()) { + char response = client.read(); + if(DEBUG) Serial.print(response); + } + + + if(DEBUG) { + Serial.println(); + Serial.println("-------------------------------"); + } + + payLoad = ""; +} + + +double getBoardTemp(void) +{ + unsigned int wADC; + double t; + + // The internal temperature has to be used + // with the internal reference of 1.1V. + // Channel 8 can not be selected with + // the analogRead function yet. + + // Set the internal reference and mux. + ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3)); + ADCSRA |= _BV(ADEN); // enable the ADC + + delay(20); // wait for voltages to become stable. + + ADCSRA |= _BV(ADSC); // Start the ADC + + // Detect end-of-conversion + while (bit_is_set(ADCSRA,ADSC)); + + // Reading register "ADCW" takes care of how to read ADCL and ADCH. + wADC = ADCW; + + // The offset of 324.31 could be wrong. It is just an indication. + t = (wADC - 324.31 ) / 1.22; + + // The returned temperature is in degrees Celcius. + return (t); +} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/deviceType.png b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/agent/deviceType.png new file mode 100644 index 0000000000000000000000000000000000000000..766cd2baa01859403bbf14a82d8ff5bc2acb5aea GIT binary patch literal 10418 zcmbVy1yt1E+U^k2gOs9xfPe@h3^l+YJ#-FT(hOa~(9(@aBhn$#(ujnhG}171N{6&` z-Jkz+{^#Cr-E+SCt;<@onAv;3JKkOI^E^8Op)3O?pdtW)KwvppNi`4%!|=}s4--g{ zkXuv&{yjuV>7djdEl}Tl;QBOcLJ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z4Q$K!LbcCA0z7 zH!Sw(N9;`BKQf#N6=Zwl#99A{)p-alRRewPyK)#n|Cqv}EV=7Ie+=ZzSMQO>y}dI1 ztJx(7B2tBl5R)eY0QuDMcHg7(2!VKcKRG_M3MeZMFqlaqP9^lG5>xPPAyHcx>eko-@Et%WOS1xUy8yQfLG()^hExLX$*mhqe3cL#iLKdIPF=Ewy3BWC`JE8 zk83Izd@PCp + + + + + + Control Bulb + Control Bulb on Arduino Uno + + + state + + + + + + + false + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..ecc9c40a2 --- /dev/null +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf @@ -0,0 +1,20 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.device-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.type-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.realtime.analytics-view);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.arduino.platform.configuration);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/arduino.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/arduino.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml index a024a3d98..d4df856ae 100644 --- a/features/device-types-feature/arduino-plugin-feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/pom.xml @@ -33,7 +33,10 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.arduino.feature + + org.wso2.carbon.device.mgt.iot.arduino.ui.feature + org.wso2.carbon.device.mgt.iot.arduino.backend.feature + org.wso2.carbon.device.mgt.iot.arduino.analytics.feature From d720fa1db6e06d3e40d012be0a1d64cee5e2a4bb Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 15:22:07 +0530 Subject: [PATCH 03/11] Removing the obsolete android sense aggregated feature. --- .../pom.xml | 305 ------------------ .../src/main/resources/build.properties | 1 - .../src/main/resources/cloud.p2.inf | 31 -- .../datasources/androidsense-datasources.xml | 46 --- .../src/main/resources/dbscripts/h2.sql | 8 - .../src/main/resources/dbscripts/mssql.sql | 8 - .../src/main/resources/dbscripts/mysql.sql | 12 - .../src/main/resources/dbscripts/oracle.sql | 8 - .../main/resources/dbscripts/postgresql.sql | 8 - .../src/main/resources/default.p2.inf | 29 -- .../resources/devicetypes/android_sense.xml | 71 ---- .../src/main/resources/p2.inf | 31 -- .../receiver/android_sense_receiver.xml | 30 -- .../org.wso2.iot.android.sense_1.0.0.json | 63 ---- .../androidsense-plugin-feature/pom.xml | 1 - 15 files changed, 652 deletions(-) delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/pom.xml delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/build.properties delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/cloud.p2.inf delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/datasources/androidsense-datasources.xml delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mysql.sql delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/devicetypes/android_sense.xml delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/receiver/android_sense_receiver.xml delete mode 100755 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/pom.xml deleted file mode 100644 index c009a3841..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/pom.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - org.wso2.carbon.devicemgt-plugins - androidsense-plugin-feature - 3.0.32-SNAPSHOT - ../pom.xml - - - 4.0.0 - org.wso2.carbon.device.mgt.iot.androidsense.feature - 3.0.32-SNAPSHOT - pom - WSO2 Carbon - IoT Server Android Sense Feature - http://wso2.org - This feature contains the Android Sense Device type specific implementations for the IoT Server - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.androidsense.api - war - - - - - - - default-profile - - true - - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - cloud - - - - maven-antrun-plugin - - - test - - run - - - - - - - - - - - - - - - - - - maven-resources-plugin - - - copy-resources - generate-resources - - copy-resources - - - src/main/resources - - - resources - - build.properties - p2.inf - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.androidsense.analytics - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.androidsense.ui - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt - - **/* - - - - - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - - - unpack-geo - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.iot.geo.dashboard - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.androidsense.api - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - android_sense.war - - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - - create-android-sense-plugin-mgt-schema - package - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - org.wso2.maven - carbon-p2-plugin - ${carbon.p2.plugin.version} - - - p2-feature-generation - package - - p2-feature-gen - - - org.wso2.carbon.device.mgt.iot.androidsense - ../../../features/etc/feature.properties - - - org.wso2.carbon.p2.category.type:server - org.eclipse.equinox.p2.type.group:true - - - - org.wso2.carbon.core.server:${carbon.kernel.version} - org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} - - - - - - - - - - diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/build.properties b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/build.properties deleted file mode 100644 index 93c4b1070..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/build.properties +++ /dev/null @@ -1 +0,0 @@ -custom = true \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/cloud.p2.inf deleted file mode 100644 index 565901c76..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/cloud.p2.inf +++ /dev/null @@ -1,31 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/datasources/androidsense-datasources.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/datasources/androidsense-datasources.xml deleted file mode 100644 index 9a1374b09..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/datasources/androidsense-datasources.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader - - - - AndroidSenseDM_DB - The datasource used for the Android Sense database - - jdbc/AndroidSenseDM_DB - - - - jdbc:h2:repository/database/AndroidSenseDM_DB;DB_CLOSE_ON_EXIT=FALSE - - wso2carbon - wso2carbon - org.h2.Driver - 50 - 60000 - true - SELECT 1 - 30000 - - - - - diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql deleted file mode 100644 index ee3bfa73a..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/h2.sql +++ /dev/null @@ -1,8 +0,0 @@ - --- ----------------------------------------------------- --- Table `ANDROID_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( - `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , - `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (`ANDROID_DEVICE_ID`) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql deleted file mode 100644 index cf677ff07..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mssql.sql +++ /dev/null @@ -1,8 +0,0 @@ - --- ----------------------------------------------------- --- Table `ANDROID_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( - ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , - DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mysql.sql deleted file mode 100644 index 4637b4daf..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/mysql.sql +++ /dev/null @@ -1,12 +0,0 @@ --- ----------------------------------------------------- --- Table `ANDROID_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `ANDROID_SENSE_DEVICE` ( - `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , - `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (`ANDROID_DEVICE_ID`) ) -ENGINE = InnoDB; - - - - diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql deleted file mode 100644 index 6f8537eb8..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/oracle.sql +++ /dev/null @@ -1,8 +0,0 @@ - --- ----------------------------------------------------- --- Table `ANDROID_DEVICE` --- ----------------------------------------------------- -CREATE TABLE ANDROID_SENSE_DEVICE ( - ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , - DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (ANDROID_DEVICE_ID) ); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql deleted file mode 100644 index 987f4992b..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/dbscripts/postgresql.sql +++ /dev/null @@ -1,8 +0,0 @@ - --- ----------------------------------------------------- --- Table `ANDROID_DEVICE` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS ANDROID_SENSE_DEVICE ( - ANDROID_DEVICE_ID VARCHAR(45) NOT NULL , - DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, - PRIMARY KEY (ANDROID_DEVICE_ID)); diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf deleted file mode 100644 index 5423fc55d..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/default.p2.inf +++ /dev/null @@ -1,29 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/carbonapps/android_sense.car);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/devicetypes/android_sense.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/devicetypes/android_sense.xml deleted file mode 100644 index 764aa311a..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/devicetypes/android_sense.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - Add Keywords - Send keywords to the device - - - - - - - - Add Threshold - Send Threshold to the device - - - - - - - - Remove words - Remove Threshold from the device - - - - - - - - - - true - - - - true - - - androidsense.mqtt.adapter - 0 - true - - - - - en_US - 1.0.0 - This is license text - - - \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf deleted file mode 100644 index 565901c76..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,31 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/webapps/,target:${installFolder}/../../deployment/server/webapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/jaggeryapps/,target:${installFolder}/../../deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../database/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/database/,target:${installFolder}/../../database/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/devicetypes/,target:${installFolder}/../../deployment/server/devicetypes/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/webapps/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../resources/sketches/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/androidsense-datasources.xml);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/AndroidSenseDM_DB.h2.db);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/receiver/android_sense_receiver.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/receiver/android_sense_receiver.xml deleted file mode 100644 index ee62d1c56..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/receiver/android_sense_receiver.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - ${tenant-domain}/android_sense/+/data - iot-mqtt - true - android_sense_receiver-${tenant-domain} - - - - - diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json deleted file mode 100755 index 878b4b63d..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "org.wso2.iot.android.sense", - "version": "1.0.0", - "nickName": "android_sense_stream", - "description": "This hold the device type stream of android sense", - "metaData": [ - {"name": "owner", "type": "STRING"}, - {"name": "deviceId", "type": "STRING"}, - {"name": "type", "type": "STRING"}, - {"name": "timestamp", "type": "LONG"} - ], - "payloadData": [ - {"name": "battery", "type": "INT"}, - {"name": "battery_state", "type": "STRING"}, - {"name": "battery_status", "type": "STRING"}, - {"name": "battery_temperature", "type": "INT"}, - {"name": "gps_lat", "type": "DOUBLE"}, - {"name": "gps_long", "type": "DOUBLE"}, - {"name": "accelerometer_x", "type": "FLOAT"}, - {"name": "accelerometer_y", "type": "FLOAT"}, - {"name": "accelerometer_z", "type": "FLOAT"}, - {"name": "speed_limit", "type": "FLOAT"}, - {"name": "turn_way", "type": "STRING"}, - {"name": "magnetic_x", "type": "FLOAT"}, - {"name": "magnetic_y", "type": "FLOAT"}, - {"name": "magnetic_z", "type": "FLOAT"}, - {"name": "gyroscope_x", "type": "FLOAT"}, - {"name": "gyroscope_y", "type": "FLOAT"}, - {"name": "gyroscope_z", "type": "FLOAT"}, - {"name": "light", "type": "FLOAT"}, - {"name": "pressure", "type": "FLOAT"}, - {"name": "proximity", "type": "FLOAT"}, - {"name": "gravity_x", "type": "FLOAT"}, - {"name": "gravity_y", "type": "FLOAT"}, - {"name": "gravity_z", "type": "FLOAT"}, - {"name": "rotation_x", "type": "FLOAT"}, - {"name": "rotation_y", "type": "FLOAT"}, - {"name": "rotation_z", "type": "FLOAT"}, - {"name": "word", "type": "STRING"}, - {"name": "word_sessionId", "type": "STRING"}, - {"name": "word_status", "type": "STRING"}, - {"name": "beacon_major", "type": "INT"}, - {"name": "beacon_minor", "type": "INT"}, - {"name": "beacon_proximity", "type": "STRING"}, - {"name": "beacon_uuid", "type": "INT"}, - {"name": "call_number", "type": "STRING"}, - {"name": "call_type", "type": "STRING"}, - {"name": "call_start_time", "type": "LONG"}, - {"name": "call_end_time", "type": "LONG"}, - {"name": "screen_state", "type": "STRING"}, - {"name": "audio_playing", "type": "BOOL"}, - {"name": "headset_on", "type": "BOOL"}, - {"name": "music_volume", "type": "INT"}, - {"name": "activity_type", "type": "INT"}, - {"name": "confidence", "type": "INT"}, - {"name": "sms_number", "type": "STRING"}, - {"name": "application_name", "type": "STRING"}, - {"name": "action", "type": "STRING"}, - {"name": "data_type", "type": "STRING"}, - {"name": "data_sent", "type": "LONG"}, - {"name": "data_received", "type": "LONG"} - ] -} diff --git a/features/device-types-feature/androidsense-plugin-feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/pom.xml index 01b2f146b..5b0b52d89 100644 --- a/features/device-types-feature/androidsense-plugin-feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/pom.xml @@ -33,7 +33,6 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.androidsense.ui.feature org.wso2.carbon.device.mgt.iot.androidsense.backend.feature org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature From 1cfef0cd9b865ea97b1245d48f9697f7760bc47a Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 15:33:56 +0530 Subject: [PATCH 04/11] Adding cloud p2.inf for the analytics features as well. --- .../pom.xml | 55 +++++++++++++++++++ .../src/main/resources/cloud.p2.inf | 6 ++ .../src/main/resources/default.p2.inf | 6 ++ .../pom.xml | 2 +- .../src/main/resources/p2.inf | 6 +- 5 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml index 4bd0e3f5b..8ebf0c7e0 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/pom.xml @@ -36,6 +36,61 @@ This feature contains the Android Sense Device type specific analytics implementations for the IoT Server + + + default-profile + + true + + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + + cloud + + + + maven-antrun-plugin + + + test + + run + + + + + + + + + + + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf new file mode 100644 index 000000000..7afe8e919 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf @@ -0,0 +1,6 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf new file mode 100644 index 000000000..f3bf580fa --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf @@ -0,0 +1,6 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\ diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml index 7b7d734b3..2e2ef2b74 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/pom.xml @@ -126,7 +126,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.arduino.analytics ../../../features/etc/feature.properties diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf index 032418230..8d76931bf 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.analytics.feature/src/main/resources/p2.inf @@ -1,6 +1,6 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps//arduino.car);\ \ No newline at end of file +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps//arduino.car);\ \ No newline at end of file From 485ddfc53d84453921ab472cfc6c95bb4b40fa09 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 16:30:14 +0530 Subject: [PATCH 05/11] Fixing the ardino and raspberry device types. --- .../pom.xml | 2 +- .../src/main/resources/p2.inf | 4 +- .../main/resources/agent/ArduinoBoardSketch.h | 77 -------- .../resources/agent/ArduinoBoardSketch.ino | 83 --------- .../src/main/resources/agent/Connect.ino | 163 ----------------- .../src/main/resources/agent/PollServer.ino | 82 --------- .../src/main/resources/agent/PushData.ino | 133 -------------- .../src/main/resources/agent/deviceType.png | Bin 10418 -> 0 bytes .../main/resources/agent/sketch.properties | 20 -- .../src/main/resources/p2.inf | 26 --- .../pom.xml | 2 +- .../src/main/resources/p2.inf | 6 +- .../arduino-plugin-feature/pom.xml | 1 - .../pom.xml | 64 +------ .../src/main/resources/build.properties | 0 .../src/main/resources/p2.inf | 3 + .../pom.xml | 172 ++++++++++++++++++ .../src/main/resources/build.properties | 0 .../datasources/raspberrypi-datasources.xml | 0 .../src/main/resources/dbscripts/h2.sql | 0 .../src/main/resources/dbscripts/mssql.sql | 0 .../src/main/resources/dbscripts/mysql.sql | 0 .../src/main/resources/dbscripts/oracle.sql | 0 .../main/resources/dbscripts/postgresql.sql | 0 .../resources/devicetypes/raspberrypi.xml | 0 .../src/main/resources/p2.inf | 24 +++ .../pom.xml | 72 +------- .../resources/agent/Adafruit_Python_DHT.zip | Bin .../src/main/resources/agent/README.md | 0 .../main/resources/agent/RaspberryService.sh | 0 .../resources/agent/deviceConfig.properties | 0 .../agent/org.eclipse.paho.mqtt.python.tar | Bin .../main/resources/agent/sketch.properties | 0 .../resources/agent/src/RaspberryAgent.py | 0 .../resources/agent/src/RaspberryStats.log | 0 .../main/resources/agent/src/httpServer.py | 0 .../src/main/resources/agent/src/iotUtils.py | 0 .../main/resources/agent/src/mqttConnector.py | 0 .../main/resources/agent/src/running_mode.py | 0 .../src/main/resources/agent/startService.sh | 0 .../src/main/resources/agent/testAgent.sh | 0 .../src/main/resources/build.properties | 1 + .../datasources/raspberrypi-datasources.xml | 48 +++++ .../src/main/resources/dbscripts/h2.sql | 9 + .../src/main/resources/dbscripts/mssql.sql | 9 + .../src/main/resources/dbscripts/mysql.sql | 12 ++ .../src/main/resources/dbscripts/oracle.sql | 9 + .../main/resources/dbscripts/postgresql.sql | 9 + .../resources/devicetypes/raspberrypi.xml} | 16 +- .../src/main/resources/p2.inf | 18 +- .../raspberrypi-plugin-feature/pom.xml | 4 +- 51 files changed, 336 insertions(+), 733 deletions(-) delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/sketch.properties delete mode 100644 features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/p2.inf rename features/device-types-feature/{arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature => raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature}/pom.xml (64%) rename features/device-types-feature/{arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature => raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature}/src/main/resources/build.properties (100%) create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/build.properties (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/datasources/raspberrypi-datasources.xml (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/dbscripts/h2.sql (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/dbscripts/mssql.sql (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/dbscripts/mysql.sql (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/dbscripts/oracle.sql (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/dbscripts/postgresql.sql (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature}/src/main/resources/devicetypes/raspberrypi.xml (100%) create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/pom.xml (70%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/Adafruit_Python_DHT.zip (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/README.md (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/RaspberryService.sh (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/deviceConfig.properties (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/sketch.properties (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/RaspberryAgent.py (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/RaspberryStats.log (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/httpServer.py (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/iotUtils.py (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/mqttConnector.py (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/src/running_mode.py (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/startService.sh (100%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/agent/testAgent.sh (100%) create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql rename features/device-types-feature/{arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml => raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml} (63%) rename features/device-types-feature/raspberrypi-plugin-feature/{org.wso2.carbon.device.mgt.iot.raspberrypi.feature => org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature}/src/main/resources/p2.inf (59%) diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml index f615c9a12..7b1dfcf2d 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/pom.xml @@ -113,7 +113,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.arduino.backend ../../../features/etc/feature.properties diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf index 6c09044b9..2bd7898bd 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.backend.feature/src/main/resources/p2.inf @@ -2,9 +2,9 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/arduino.war);\ diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h deleted file mode 100644 index b6955cf79..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#ifndef ArduinoWifiAgent_H -#define ArduinoWifiAgent_H - -#include "Arduino.h" - -// These are the interrupt and control pins -#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin! -// These can be any two pins -#define ADAFRUIT_CC3000_VBAT 5 -#define ADAFRUIT_CC3000_CS 10 - -#define WLAN_SSID "ssid" // Your wifi network SSID (cannot be longer than 32 characters!) -#define WLAN_PASS "password" // Your wifi network password - -#define WLAN_SECURITY WLAN_SEC_WPA2 -// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 -#define IDLE_TIMEOUT_MS 3000 - -#define DEVICE_OWNER "${DEVICE_OWNER}" -#define DEVICE_ID "${DEVICE_ID}" -#define DEVICE_TOKEN "${DEVICE_TOKEN}" -#define REFRESH_DEVICE_TOKEN "${DEVICE_REFRESH_TOKEN}" -#define DEVICE_TYPE "arduino" -#define TIME 0 -#define SUPER_TENANT "carbon.super" - -#define DAS_SERVICE_EPOINT "/endpoints${TENANT_DOMAIN}/arduino_receiver?deviceId=${DEVICE_ID}" - -#define IOT_SERVICE_EPOINT "/arduino/device/${DEVICE_ID}/controls" - -#define POLL_INTERVAL 1000 -#define PUSH_INTERVAL 10000 -#define DEBUG true -#define CON_DEBUG true - -#define SERVICE_PORT ${SERVER_EP_PORT} //http port of iot server - -byte server[4] = {${SERVER_EP_IP}}; //Ip address of iot server - -//set static Ip -/** -byte deviceIP[4] = { 192, 168, 1,110 }; //Ststic ip address of arduino -byte dns2[] = { 8, 8, 8, 8 }; //Ststic dns of arduino -byte subnet[] = { 255, 255, 255, 0 }; //Ststic subnet of arduino -byte gateway[] = { 192, 168, 1, 1 }; //Ststic gateway of arduino -*/ - -String host, jsonPayLoad, replyMsg; -String responseMsg, subStrn; -double cpuTemperature = 0; -static unsigned long pushTimestamp = 0; -static unsigned long pollTimestamp = 0; -char charBuf[10]; -String payLoad; - - -#endif - - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino deleted file mode 100644 index 7f0e6941a..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/ArduinoBoardSketch.ino +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - - -#include "ArduinoBoardSketch.h" -#include -#include -#include -Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, - SPI_CLOCK_DIVIDER); // you can change this clock speed - -Adafruit_CC3000_Client client; - -uint32_t sserver; - - -void setup() -{ - Serial.begin(115200); - Serial.println(F("Internal Temperature Sensor")); - pinMode(6, OUTPUT); - pinMode(13, OUTPUT); - connectHttp(); - setupResource(); - wdt_enable(WDTO_8S); - -} - -void loop() -{ - wdt_reset(); - while( !cc3000.checkConnected() ){ - connectHttp(); - - } - - - cpuTemperature=getBoardTemp(); - - - if(millis() - pushTimestamp > PUSH_INTERVAL){ - while (!client.connected()) { - setupClient(); - } - pushData(); - - pushTimestamp = millis(); - } - - //Serial.println("PUSHED"); - - - wdt_reset(); - - if(millis() - pollTimestamp > POLL_INTERVAL){ - while (!client.connected()) { - setupClient(); - } - Serial.println("Read Controls"); - readControls(); - - pollTimestamp = millis(); - - } - -// //Serial.println("LOOPING"); - wdt_reset(); -} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino deleted file mode 100644 index ba3785325..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/Connect.ino +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" -/********************************************************************************************** - Use the below variables when required to set a static IP for the WifiSheild - ***********************************************************************************************/ - - uint32_t ip, ddns, ssubnet, ggateway; - -String connecting = "connecting.... "; - -void connectHttp() { - /* Initialise the module */ - if(DEBUG) Serial.println(F("\nInitializing...")); - if (!cc3000.begin()) - { - if(DEBUG) Serial.println(F("Couldn't begin()! Check your wiring?")); - while(1); - } - - /********************************************************************************************** - Only required if using static IP for the WifiSheild - ***********************************************************************************************/ - - /** - ip = cc3000.IP2U32(deviceIP[0], deviceIP[1], deviceIP[2], deviceIP[3]); - ddns = cc3000.IP2U32(dns2[0], dns2[1], dns2[2], dns2[3]); - ssubnet = cc3000.IP2U32(subnet[0], subnet[1], subnet[2], subnet[3]); - ggateway = cc3000.IP2U32(gateway[0], gateway[1], gateway[2], gateway[3]); - cc3000.setStaticIPAddress(ip, ssubnet, ggateway, ddns); - */ - // required for setting static IP - - /***********************************************************************************************/ - - - sserver = cc3000.IP2U32(server[0], server[1], server[2], server[3]); - - if(CON_DEBUG) { - Serial.print(F("\nAttempting to connect to ")); - Serial.println(WLAN_SSID); - } - - cc3000.deleteProfiles(); - - if (!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY)) { - if(CON_DEBUG) Serial.println(F("Failed!")); - while(1); - } - - if(CON_DEBUG) Serial.println(F("Connected to Wifi network!")); - - if(CON_DEBUG) Serial.println(F("Request DHCP")); - while (!cc3000.checkDHCP()) - { - delay(100); - } - - /* Display the IP address DNS, Gateway, etc. */ - while (! displayConnectionDetails()) { - delay(1000); - } - - if (cc3000.checkConnected()) { - Serial.println("client Connected to AP"); - client = cc3000.connectTCP(sserver, SERVICE_PORT); - if (client.connected()) { - if(CON_DEBUG) Serial.println("client Connected to server"); - } else { - if(CON_DEBUG) Serial.println(F("client Connection failed")); - } - } else { - Serial.println(F("client Connection to AP failed")); - } - - if(CON_DEBUG) Serial.println(F("-------------------------------------")); -} - - -void setupResource(){ - String hostIP = getHostIP(server); - String port = String(SERVICE_PORT); - - host = "Host: " + hostIP + ":" + port; - if(DEBUG) Serial.println(host); - - jsonPayLoad = "{\"event\":{\"metaData\":"; - jsonPayLoad += "{\"owner\":\""; - jsonPayLoad += String(DEVICE_OWNER); - jsonPayLoad += "\",\"deviceId\":\""; - jsonPayLoad += String(DEVICE_ID); - jsonPayLoad += "\"}, \"payloadData\":{"; - - if(DEBUG) { - Serial.print("JSON Payload: "); - Serial.println(jsonPayLoad); - Serial.println("-------------------------------"); - } -} - -String getHostIP(byte server[4]){ - String hostIP = String(server[0]); - - for ( int index = 1; index < 4; index++) { - hostIP += "." + String(server[index]); - } - - return hostIP; -} - - -bool displayConnectionDetails(void) -{ - uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv; - - if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv)) - { - if(DEBUG) Serial.println(F("Unable to retrieve the IP Address!\r\n")); - return false; - } - else - { - if(CON_DEBUG) { - Serial.print(F("\nIP Addr: ")); cc3000.printIPdotsRev(ipAddress); - Serial.print(F("\nNetmask: ")); cc3000.printIPdotsRev(netmask); - Serial.print(F("\nGateway: ")); cc3000.printIPdotsRev(gateway); - Serial.print(F("\nDHCPsrv: ")); cc3000.printIPdotsRev(dhcpserv); - Serial.print(F("\nDNSserv: ")); cc3000.printIPdotsRev(dnsserv); - Serial.println(); - } - return true; - } -} - -void setupClient(){ - client = cc3000.connectTCP(sserver, SERVICE_PORT); //SERVICE_PORT - if (client.connected()) { - if(CON_DEBUG) Serial.println("client Connected to server"); - } else { - while( !cc3000.checkConnected() ){ - connectHttp(); - - } - if(CON_DEBUG) Serial.println(F("client Connection failed")); - } -} - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino deleted file mode 100644 index 040790f2d..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PollServer.ino +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" -void readControls() { - // String responseMsg; - - Serial.println("Started.."); - - client.fastrprint(F("GET ")); - client.fastrprint(IOT_SERVICE_EPOINT); - client.fastrprint(F(" HTTP/1.1")); - client.fastrprint(F("\n")); - client.fastrprint(host.c_str());client.fastrprint(F("\n")); - client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); - client.fastrprint(F("\n")); - client.fastrprint(F("protocol: HTTP\n")); - - client.println(); - - if(DEBUG) { - Serial.print("GET "); - Serial.print(IOT_SERVICE_EPOINT); - Serial.print(" HTTP/1.1"); Serial.println(); - Serial.print(host); Serial.println(); - Serial.print("Content-Type: application/json"); Serial.println(); - Serial.println(); - } - - delay(1000); - - while (client.available()) { - char response = client.read(); - if(DEBUG) Serial.print(response); - responseMsg += response; - - } - Serial.println(); - Serial.println("Ended.."); - int index = responseMsg.lastIndexOf(":"); - int newLine = responseMsg.lastIndexOf("\n"); - subStrn = responseMsg.substring(index + 1); - responseMsg = responseMsg.substring(newLine + 1, index); - - if(DEBUG) { - Serial.print("Polling Response: "); - Serial.print(responseMsg); - Serial.println(); - Serial.println("-------------------------------"); - } - - if (subStrn.equals("ON")) { - Serial.println("ITS ON"); - digitalWrite(13, HIGH); - digitalWrite(6, HIGH); - } else if (subStrn.equals("OFF")){ - - Serial.println("ITS OFF"); - digitalWrite(13, LOW); - digitalWrite(6, LOW); - - } - responseMsg = ""; - -} - - diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino deleted file mode 100644 index c5879b0fe..000000000 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/PushData.ino +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * WSO2 Inc. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. -**/ - -#include "ArduinoBoardSketch.h" - -/********************************************************************************************** - This method will traverse the array of digital pins and batch the data from the those pins together. - It makes a single call to the server and sends all pin values as a batch. - Server dis-assembles it accordingly and makes multiple publish calls for each sensor type. - ***********************************************************************************************/ - -void pushData(){ - - payLoad = "\"temperature\":"; - payLoad += dtostrf(cpuTemperature, 3, 2, charBuf); - payLoad += "}}}"; - - client.fastrprint(F("POST ")); - client.fastrprint(DAS_SERVICE_EPOINT); - client.fastrprint(F(" HTTP/1.1")); client.fastrprint(F("\n")); - client.fastrprint(host.c_str()); client.fastrprint(F("\n")); - client.fastrprint(F("Authorization: Bearer ")); client.fastrprint(F(DEVICE_TOKEN)); client.fastrprint(F("\n")); - client.fastrprint(F("Content-Type: application/json")); client.fastrprint(F("\n")); - client.fastrprint(F("Accept: application/json")); client.fastrprint(F("\n")); - client.fastrprint(F("Content-Length: ")); - - int payLength = jsonPayLoad.length() + payLoad.length(); - - client.fastrprint(String(payLength).c_str()); client.fastrprint(F("\n")); - client.fastrprint(F("\n")); - - if(DEBUG) { - Serial.print("POST "); - Serial.print(DAS_SERVICE_EPOINT); - Serial.print(" HTTP/1.1"); Serial.println(); - Serial.print(host); Serial.println(); - Serial.print("Content-Type: application/json"); Serial.println(); - Serial.print("Content-Length: "); - Serial.print(payLength); Serial.println(); - Serial.println(); - } - - - int chunkSize = 50; - - for (int i = 0; i < jsonPayLoad.length(); i++) { - if ( (i+1)*chunkSize > jsonPayLoad.length()) { - client.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); - if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, jsonPayLoad.length())); - i = jsonPayLoad.length(); - } else { - client.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); - if(DEBUG) Serial.print(jsonPayLoad.substring(i*chunkSize, (i+1)*chunkSize)); - } - } - - for (int i = 0; i < payLoad.length(); i++) { - if ( (i+1)*chunkSize > payLoad.length()) { - client.print(payLoad.substring(i*chunkSize, payLoad.length())); - if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, payLoad.length())); - i = payLoad.length(); - } else { - client.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); - if(DEBUG) Serial.print(payLoad.substring(i*chunkSize, (i+1)*chunkSize)); - } - } - - client.fastrprint(F("\n")); - if(DEBUG) Serial.println(); - - delay(1000); - - - while (client.available()) { - char response = client.read(); - if(DEBUG) Serial.print(response); - } - - - if(DEBUG) { - Serial.println(); - Serial.println("-------------------------------"); - } - - payLoad = ""; -} - - -double getBoardTemp(void) -{ - unsigned int wADC; - double t; - - // The internal temperature has to be used - // with the internal reference of 1.1V. - // Channel 8 can not be selected with - // the analogRead function yet. - - // Set the internal reference and mux. - ADMUX = (_BV(REFS1) | _BV(REFS0) | _BV(MUX3)); - ADCSRA |= _BV(ADEN); // enable the ADC - - delay(20); // wait for voltages to become stable. - - ADCSRA |= _BV(ADSC); // Start the ADC - - // Detect end-of-conversion - while (bit_is_set(ADCSRA,ADSC)); - - // Reading register "ADCW" takes care of how to read ADCL and ADCH. - wADC = ADCW; - - // The offset of 324.31 could be wrong. It is just an indication. - t = (wADC - 324.31 ) / 1.22; - - // The returned temperature is in degrees Celcius. - return (t); -} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/agent/deviceType.png deleted file mode 100644 index 766cd2baa01859403bbf14a82d8ff5bc2acb5aea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10418 zcmbVy1yt1E+U^k2gOs9xfPe@h3^l+YJ#-FT(hOa~(9(@aBhn$#(ujnhG}171N{6&` z-Jkz+{^#Cr-E+SCt;<@onAv;3JKkOI^E^8Op)3O?pdtW)KwvppNi`4%!|=}s4--g{ zkXuv&{yjuV>7djdEl}Tl;QBOcLJR!qkW?r^tFmnb`5qcpHL7)PAB+7)|!`{xpMbJZ-;jelHf$x8kAq@0?6+zhwGyJ1d zI!Xw7xT7n*vK-}HkIox?T9Gxv8Tre06!pRNc=4J;jRD{N_YM6i2=qo!#n~E| z6cam1M>AJ@qytJ$QkVhA;V`#07ld(}Ai0rH9(GQ1P9(bpl$VnoW@>864zu8b@gaFl zO}Y34{;ucW*-LRkxdiy7;8I-DQe0e8P;p)ukAS2!j}$+@G!Hja;%{3y2N#rygBkMg zwylA-|7k1n-`WbooslLeM`sO3N4vjQ0m8}=<>+GN=tK{P)3az>JD5AVyRiP5p??fm z66tL1hBTLUcC@Ge%f*7$|E75^E+i6$Hg;@x2nwfK& zn=t&--u(a9br7IakU#6>|5!JFCjpD`&)0wL0^rB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JZ;(q~0NqXQ& zQ*QjPtEIx=0$@IK-oNOXBiEm)skjclw=sIJXgU|Meq-REx;WOzBISF;xrt1(0piXe zDoK3&U{KAc&@RZdQ0LS%O+X-(zXxf;>}RTUuRjQggr_i6Kdsm8gm+k5HC_hjfj?iz zExlP=X=bagflDV1Jarem<~fY4lsI=+0<8BR%Cnqz*|8b&|WHmS|1Eg zqA9Xc=P$Spow+k+Bd7t<*`5GUREH68GB6a_Ykyi>QX5H~N&T^lriQR)5AMW3VPhuil$%bwg5O`-}H3B zokDTqoZ%RSA0;FQ=!ep9D*$Z^#KxOvotYHn zlrguEZ{-(wn$IkayU*USLV(mJ8!ZO9#fbyu-q`4}^z_bqzK^Q-Fb)d0xJmpu`W2Uu zy92=Ov{-heo`76SICf~%VjQ_RI#=No8H`PM5Jm;c>7(5P;vM!g6uVNR^6!n9GdS2^ z(mXG(Ieq23#+Ge!I{lLf9|u6)r6rg7J)x#;^2`+&14R7T2eS~PCaBy;D5c*&x#W>N z;0E)brjApi?fz3j9>4d3zVZNi`hBgnxd($mk@2r@MT8Oe5m@wiqh-@f=4KV@j)`{w zoxHVOEG*a#;B<1H|Iwp6aU{`HH7VXwnAtc(WY(;55^kkvEp4g4^z4Q$K!LbcCA0z7 zH!Sw(N9;`BKQf#N6=Zwl#99A{)p-alRRewPyK)#n|Cqv}EV=7Ie+=ZzSMQO>y}dI1 ztJx(7B2tBl5R)eY0QuDMcHg7(2!VKcKRG_M3MeZMFqlaqP9^lG5>xPPAyHcx>eko-@Et%WOS1xUy8yQfLG()^hExLX$*mhqe3cL#iLKdIPF=Ewy3BWC`JE8 zk83Izd@PCpp2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.arduino.ui ../../../features/etc/feature.properties diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf index ecc9c40a2..2b8e74a8a 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf @@ -3,11 +3,11 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/arduino/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/arduino/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\ diff --git a/features/device-types-feature/arduino-plugin-feature/pom.xml b/features/device-types-feature/arduino-plugin-feature/pom.xml index d4df856ae..d630b4914 100644 --- a/features/device-types-feature/arduino-plugin-feature/pom.xml +++ b/features/device-types-feature/arduino-plugin-feature/pom.xml @@ -33,7 +33,6 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.arduino.ui.feature org.wso2.carbon.device.mgt.iot.arduino.backend.feature org.wso2.carbon.device.mgt.iot.arduino.analytics.feature diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml similarity index 64% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml index 686057603..61bc593ef 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/pom.xml @@ -22,31 +22,19 @@ org.wso2.carbon.devicemgt-plugins - arduino-plugin-feature + raspberrypi-plugin-feature 3.0.32-SNAPSHOT ../pom.xml 4.0.0 - org.wso2.carbon.device.mgt.iot.arduino.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature pom - WSO2 Carbon - IoT Server Arduino Feature + WSO2 Carbon - IoT Server RaspberryPi Analytics Feature http://wso2.org - This feature contains the Arduino Device type specific implementations for the IoT Server + This feature contains the RaspberryPi Device type specific analytics implementations for the IoT Server - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.api - war - - - com.h2database.wso2 - h2-database-engine - - - @@ -88,7 +76,7 @@ org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.analytics + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics ${project.version} zip @@ -98,18 +86,6 @@ **/* - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.ui - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/jaggeryapps/devicemgt - - **/* - @@ -135,29 +111,9 @@ - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.arduino.api - - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - - arduino.war - - - - + org.wso2.maven carbon-p2-plugin @@ -170,7 +126,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.arduino + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics ../../../features/etc/feature.properties @@ -178,12 +134,6 @@ org.eclipse.equinox.p2.type.group:true - - org.wso2.carbon.core.server:${carbon.kernel.version} - - org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/build.properties similarity index 100% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/build.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/build.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..8f06fe31a --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/,overwrite:true);\ diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml new file mode 100644 index 000000000..9069fb9ca --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/pom.xml @@ -0,0 +1,172 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + raspberrypi-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature + pom + WSO2 Carbon - IoT Server RaspberryPi Backend Feature + http://wso2.org + This feature contains the RaspberryPi Device type specific backend implementations for the IoT Server + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.raspberrypi.api + war + + + com.h2database.wso2 + h2-database-engine + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.raspberrypi.api + + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + raspberrypi.war + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-raspberrypi-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.raspberrypi.backend + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/build.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/build.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/build.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/datasources/raspberrypi-datasources.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/datasources/raspberrypi-datasources.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/h2.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/h2.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mssql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mssql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/mysql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/mysql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/oracle.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/oracle.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/dbscripts/postgresql.sql rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/dbscripts/postgresql.sql diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/devicetypes/raspberrypi.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/devicetypes/raspberrypi.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/devicetypes/raspberrypi.xml diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..5aba54fd9 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature/src/main/resources/p2.inf @@ -0,0 +1,24 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/RaspberryPiDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/devicetypes/raspberrypi.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/raspberrypi.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml similarity index 70% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml index e1a9a98da..00e1114dc 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/pom.xml @@ -28,19 +28,14 @@ 4.0.0 - org.wso2.carbon.device.mgt.iot.raspberrypi.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature pom - WSO2 Carbon - IoT Server RaspberryPi Feature + WSO2 Carbon - IoT Server RaspberryPi UI Feature http://wso2.org - This feature contains the RaspberryPi Device type specific implementations for the IoT Server + This feature contains the RaspberryPi Device type specific UI implementations for the IoT Server - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.raspberrypi.api - war - com.h2database.wso2 h2-database-engine @@ -86,18 +81,6 @@ - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.raspberrypi.analytics - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.iot.raspberrypi.ui @@ -113,48 +96,6 @@ - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.raspberrypi.api - - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - raspberrypi.war - - - - - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - @@ -205,7 +146,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.raspberrypi + org.wso2.carbon.device.mgt.iot.raspberrypi.ui ../../../features/etc/feature.properties @@ -219,11 +160,6 @@ org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} - - diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/Adafruit_Python_DHT.zip b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/Adafruit_Python_DHT.zip rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/Adafruit_Python_DHT.zip diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/README.md rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/README.md diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/RaspberryService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/RaspberryService.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/RaspberryService.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/deviceConfig.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/deviceConfig.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/org.eclipse.paho.mqtt.python.tar diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/sketch.properties rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/sketch.properties diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryAgent.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryAgent.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryAgent.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryStats.log b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/RaspberryStats.log rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/RaspberryStats.log diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/httpServer.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/httpServer.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/httpServer.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/iotUtils.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/iotUtils.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/iotUtils.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/mqttConnector.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/mqttConnector.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/mqttConnector.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/running_mode.py b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/src/running_mode.py rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/src/running_mode.py diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/startService.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/startService.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/startService.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh similarity index 100% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/agent/testAgent.sh rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/agent/testAgent.sh diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml new file mode 100644 index 000000000..62982ef29 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/datasources/raspberrypi-datasources.xml @@ -0,0 +1,48 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + RaspberryPi_DB + The datasource used for the RaspberryPi database + + jdbc/RaspberryPiDM_DB + + + + jdbc:h2:repository/database/RaspberryPiDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 000000000..67e702ec9 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` ( + `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 000000000..a944f4cb2 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 000000000..ad0ec54b7 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `RASPBERRYPI_DEVICE` ( + `RASPBERRYPI_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`RASPBERRYPI_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 000000000..b72ecb564 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 000000000..a944f4cb2 --- /dev/null +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,9 @@ + +-- ----------------------------------------------------- +-- Table `RASPBERRYPI_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS RASPBERRYPI_DEVICE ( + RASPBERRYPI_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (RASPBERRYPI_DEVICE_ID) ); + diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml similarity index 63% rename from features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml index 7871e1d42..85db147c6 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.feature/src/main/resources/devicetypes/arduino.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/devicetypes/raspberrypi.xml @@ -17,12 +17,12 @@ ~ specific language governing permissions and limitations ~ under the License. --> - + Control Bulb - Control Bulb on Arduino Uno - + Control Bulb on Raspberrypi + state @@ -34,6 +34,16 @@ false + + true + + + raspberrypi.mqtt.adapter + 0 + true + + + en_US 1.0.0 diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf similarity index 59% rename from features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf rename to features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf index 935c08882..86bcd6364 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf @@ -1,26 +1,20 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/raspberrypi/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/raspberrypi/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/raspberrypi);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/raspberrypi-datasources.xml);\ diff --git a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml index 5ee8dff85..09271a19c 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/pom.xml +++ b/features/device-types-feature/raspberrypi-plugin-feature/pom.xml @@ -33,7 +33,9 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.raspberrypi.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.backend.feature + org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature From ff6b1e32b2b2c8741079341198064e4a42d76b0f Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 21:41:34 +0530 Subject: [PATCH 06/11] Fixing the virtual fire alarm device types. --- .../src/main/resources/p2.inf | 4 +- .../pom.xml | 150 +++++++++++++++ .../src/main/resources/build.properties | 0 .../src/main/resources/p2.inf | 6 + .../pom.xml | 173 ++++++++++++++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/certs/wso2certs.jks | Bin .../virtual_firealarm-datasources.xml | 0 .../src/main/resources/dbscripts/h2.sql | 0 .../src/main/resources/dbscripts/mssql.sql | 0 .../src/main/resources/dbscripts/mysql.sql | 0 .../src/main/resources/dbscripts/oracle.sql | 0 .../main/resources/dbscripts/postgresql.sql | 0 .../devicetypes/virtual_firealarm.xml | 0 .../src/main/resources/p2.inf | 25 +++ .../pom.xml | 74 +------- .../resources/advanced_agent/cep_query.txt | 0 .../advanced_agent/deviceConfig.properties | 0 .../advanced_agent/sketch.properties | 0 .../resources/advanced_agent/start-device.sh | 0 .../resources/agent/deviceConfig.properties | 0 .../main/resources/agent/sketch.properties | 0 .../src/main/resources/agent/start-device.sh | 0 .../resources/agent/virtual_firealarm.jks | Bin .../src/main/resources/build.properties | 1 + .../src/main/resources/certs/wso2certs.jks | Bin 0 -> 11731 bytes .../virtual_firealarm-datasources.xml | 48 +++++ .../src/main/resources/dbscripts/h2.sql | 8 + .../src/main/resources/dbscripts/mssql.sql | 8 + .../src/main/resources/dbscripts/mysql.sql | 12 ++ .../src/main/resources/dbscripts/oracle.sql | 8 + .../main/resources/dbscripts/postgresql.sql | 8 + .../devicetypes/virtual_firealarm.xml | 67 +++++++ .../src/main/resources/p2.inf | 27 +-- .../virtual-fire-alarm-plugin-feature/pom.xml | 4 +- 35 files changed, 533 insertions(+), 91 deletions(-) create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature}/src/main/resources/build.properties (100%) create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/certs/wso2certs.jks (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/datasources/virtual_firealarm-datasources.xml (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/dbscripts/h2.sql (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/dbscripts/mssql.sql (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/dbscripts/mysql.sql (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/dbscripts/oracle.sql (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/dbscripts/postgresql.sql (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature}/src/main/resources/devicetypes/virtual_firealarm.xml (100%) create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/pom.xml (72%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/advanced_agent/cep_query.txt (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/advanced_agent/deviceConfig.properties (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/advanced_agent/sketch.properties (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/advanced_agent/start-device.sh (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/agent/deviceConfig.properties (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/agent/sketch.properties (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/agent/start-device.sh (100%) rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/agent/virtual_firealarm.jks (100%) create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/build.properties create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql create mode 100644 features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml rename features/device-types-feature/virtual-fire-alarm-plugin-feature/{org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature => org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature}/src/main/resources/p2.inf (66%) diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf index 8f06fe31a..ae6c92537 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics.feature/src/main/resources/p2.inf @@ -1,3 +1,3 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml new file mode 100644 index 000000000..dadfdc49d --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/pom.xml @@ -0,0 +1,150 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + virtual-fire-alarm-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature + pom + WSO2 Carbon - IoT Server VirtualFireAlarm Analytics Feature + http://wso2.org + This feature contains the VirtualFireAlarm Device type specific analytics implementations for the IoT Server + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + unpack-analytics + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.analytics + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} + + + + + + + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/build.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/build.properties similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/build.properties rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/build.properties diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..f65b61a17 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature/src/main/resources/p2.inf @@ -0,0 +1,6 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/carbonapps/virtualfirealarm.car);\ \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml new file mode 100644 index 000000000..c54d1cdd5 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/pom.xml @@ -0,0 +1,173 @@ + + + + + + + + org.wso2.carbon.devicemgt-plugins + virtual-fire-alarm-plugin-feature + 3.0.32-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature + pom + WSO2 Carbon - IoT Server VirtualFireAlarm Backend Feature + http://wso2.org + This feature contains the VirtualFireAlarm Device type specific backend implementations for the IoT Server + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + war + + + com.h2database.wso2 + h2-database-engine + + + + + + + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + copy-jaxrs-war + package + + copy + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.virtualfirealarm.api + + war + true + ${project.build.directory}/maven-shared-archive-resources/webapps/ + virtual_firealarm.war + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + create-virtual-firealarm-plugin-mgt-schema + package + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:true + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + + org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} + + + + + + + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/certs/wso2certs.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/certs/wso2certs.jks similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/certs/wso2certs.jks rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/certs/wso2certs.jks diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/h2.sql similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/h2.sql rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/h2.sql diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mssql.sql similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mssql.sql rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mssql.sql diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mysql.sql similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/mysql.sql rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/mysql.sql diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/oracle.sql similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/oracle.sql rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/oracle.sql diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/postgresql.sql similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/dbscripts/postgresql.sql rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/dbscripts/postgresql.sql diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/devicetypes/virtual_firealarm.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/devicetypes/virtual_firealarm.xml rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/devicetypes/virtual_firealarm.xml diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf new file mode 100644 index 000000000..fc574d82f --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature/src/main/resources/p2.inf @@ -0,0 +1,25 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/security/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/certs/,target:${installFolder}/../../../repository/resources/security/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/device-types/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ + +instructions.unconfigure = \ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep.war);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../conf/datasources/virtual_firealarm-datasources.xml);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/virtualfirealarmDM_DB.h2.db);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/security/wso2certs.jks);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml similarity index 72% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml index e045ac5f5..fe66630fe 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/pom.xml @@ -28,19 +28,14 @@ 4.0.0 - org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature + org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature pom - WSO2 Carbon - IoT Server VirtualFireAlarm Feature + WSO2 Carbon - IoT Server VirtualFireAlarm UI Feature http://wso2.org - This feature contains the VirtualFireAlarm Device type specific implementations for the IoT Server + This feature contains the VirtualFireAlarm Device type specific UI implementations for the IoT Server - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.api - war - com.h2database.wso2 h2-database-engine @@ -87,18 +82,6 @@ - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics - - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui @@ -114,27 +97,6 @@ - - copy-jaxrs-war - package - - copy - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.virtualfirealarm.api - - war - true - ${project.build.directory}/maven-shared-archive-resources/webapps/ - virtual_firealarm.war - - - - - copy-agent-jar package @@ -162,29 +124,6 @@ - - unpack-analytics - package - - unpack - - - - - org.wso2.carbon.devicemgt-plugins - org.wso2.carbon.device.mgt.iot.analytics - ${project.version} - zip - true - - ${project.build.directory}/maven-shared-archive-resources/carbonapps - - **/* - - - - - @@ -235,7 +174,7 @@ p2-feature-gen - org.wso2.carbon.device.mgt.iot.virtualfirealarm + org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui ../../../features/etc/feature.properties @@ -249,11 +188,6 @@ org.wso2.carbon.device.mgt.server:${carbon.devicemgt.version} - - - org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.iot.analytics.feature:${carbon.devicemgt.plugins.version} - - diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/cep_query.txt b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/cep_query.txt similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/cep_query.txt rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/cep_query.txt diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/deviceConfig.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/deviceConfig.properties similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/deviceConfig.properties rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/deviceConfig.properties diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/sketch.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/sketch.properties similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/sketch.properties rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/sketch.properties diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/start-device.sh b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/start-device.sh similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/advanced_agent/start-device.sh rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/advanced_agent/start-device.sh diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/deviceConfig.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/deviceConfig.properties similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/deviceConfig.properties rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/deviceConfig.properties diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/sketch.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/sketch.properties similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/sketch.properties rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/sketch.properties diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/start-device.sh b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/start-device.sh similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/start-device.sh rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/start-device.sh diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/virtual_firealarm.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/virtual_firealarm.jks similarity index 100% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/agent/virtual_firealarm.jks rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/agent/virtual_firealarm.jks diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/build.properties b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/build.properties new file mode 100644 index 000000000..9c86577d7 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/certs/wso2certs.jks new file mode 100644 index 0000000000000000000000000000000000000000..00589cdf0d75c0f87bdf9dc63d601d58abb3e0d1 GIT binary patch literal 11731 zcmd6M1yEgGmnHAv?ry;)$i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*MWR!_Yyx z8ENs?sWRZ@45222f6g=TW{GoUaFC8uqVb}-O7bVS>@slmF{;7)oQ=G=z*5(DvleV) zqe4m7_hV+H>N12-s`31C4R-ZRZ{z#is-Qq1Pdi*SMf#F~XhQmCy5u)V3b?lYQg}Ma zqTMu@VgKRdJo&tZ;yV~rbKLzsjlPyVk%)Ar%nO{+G6VWll5XjySQ?pw@jAK^);`}i zIuWkpTk)cN>4;zBfS=}v^oyM`-VKJ;ROp`_jO< z56qYOvX`VyRJn3+eWI@N;Z>4^TQ{Ylh^Ge)FdvnV*t(`l8GqbkRogt#C(eABADXlt zYObyCbs1CN&i=`8B&sOSdHg`$%KqLh)bv1^Kk#^kC0d;QLp}7)!E;FREyv`M0Zre4 zO$gS!1}vNpv;SM*;e7D?r*iri1|Al+x0U?~Jbx$tUjxqxI0mIfr0@s0m{WMNk6ucZ!ObhcjLXS&p1Uw0sKf<3O};4<57SkzGS7x6B!XMg zroo+5Muq=n^%X8Xx6g5kGvnLH0fkzlrxG9aM@8A2oMV-h_loWwuXgi_)8Z-E)yg3( zw~Gm`kYpADUx|$@0>tJpRi7hZjZ77W>sh^aKAawos8gXhOJNWsi(t)>h0SOU0$SsaJtCn&Kc>I`S*vNDMZLfip2LSy^MBcZwjHOr4xq( z)y!4w0+kwIYSllE{Md}pZWua7{FvWXr`VuMoRK&VPGuz!g{;y z;CF}i_4Tn@0EYcukpG3NEwuib0RK^-M(HNkD;~IBYH;Q$IRUO@G{{rWhCgJR%&?@9 zr9z5~`#vJ<+x_-IQE_MzG*szOI_^yW_t)z^le26n55Gp@rqW@aw&j=HTXcCs!j&ua zZLezWic(ye#N6-GCS}fi$qctZK537-8C4B&dn=^WmHi;RA0O48Bo&6LVsaEM{|%CH BICB61 literal 0 HcmV?d00001 diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml new file mode 100644 index 000000000..a724d94d1 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/datasources/virtual_firealarm-datasources.xml @@ -0,0 +1,48 @@ + + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + VirtualFireAlarmDM_DB + The datasource used for the Virtual-Firealarm database + + jdbc/VirtualFireAlarmDM_DB + + + + jdbc:h2:repository/database/VirtualFireAlarmDM_DB;DB_CLOSE_ON_EXIT=FALSE + + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql new file mode 100644 index 000000000..160b437cb --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/h2.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` ( + `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) ); diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql new file mode 100644 index 000000000..41b7e4848 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mssql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) ); diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql new file mode 100644 index 000000000..432ecbb0e --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/mysql.sql @@ -0,0 +1,12 @@ +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `VIRTUAL_FIREALARM_DEVICE` ( + `VIRTUAL_FIREALARM_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`VIRTUAL_FIREALARM_DEVICE_ID`) ) +ENGINE = InnoDB; + + + + diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql new file mode 100644 index 000000000..5583d1694 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/oracle.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) ); diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql new file mode 100644 index 000000000..41b7e4848 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/dbscripts/postgresql.sql @@ -0,0 +1,8 @@ + +-- ----------------------------------------------------- +-- Table `FIREALARM_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS VIRTUAL_FIREALARM_DEVICE ( + VIRTUAL_FIREALARM_DEVICE_ID VARCHAR(45) NOT NULL , + DEVICE_NAME VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (VIRTUAL_FIREALARM_DEVICE_ID) ); diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml new file mode 100644 index 000000000..1fcfec4c6 --- /dev/null +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/devicetypes/virtual_firealarm.xml @@ -0,0 +1,67 @@ + + + + + + + Control buzzer + Control buzzer on Virtual Firealarm + + + state + + + + + + + true + + + + true + + + virtualfirealarm.mqtt.adapter + 0 + true + + + + + + + + + + + + + + + + + + + en_US + 1.0.0 + This is license text + + + \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf similarity index 66% rename from features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/p2.inf rename to features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf index 1f77296c2..cd5dbd62b 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf @@ -1,33 +1,25 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/advanced_agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/advanced_agent/,target:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/datasources/,target:${installFolder}/../../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/database/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/security/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/certs/,target:${installFolder}/../../../repository/resources/security/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/certs/,target:${installFolder}/../../../repository/resources/security/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/device-types/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep.war);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/webapps/virtual_firealarm_scep);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/virtual_firealarm);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/virtual_firealarm_advanced);\ @@ -42,5 +34,4 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.realtime.analytics-view);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.policy-wizard);\ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/security/wso2certs.jks);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/carbonapps/virtualfirealarm.car);\ \ No newline at end of file +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/virtual_firealarm.xml);\ \ No newline at end of file diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml index 2c2d514cd..fa95c5dcd 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/pom.xml @@ -33,7 +33,9 @@ http://wso2.org - org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature + org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature + org.wso2.carbon.device.mgt.iot.virtualfirealarm.backend.feature + org.wso2.carbon.device.mgt.iot.virtualfirealarm.analytics.feature From bbc8c8efceb1ef7697e8221401b9677b6c42c686 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 4 May 2017 22:15:36 +0530 Subject: [PATCH 07/11] Fixing the issue in consuming the events for carbon.super from mqtt. --- .../mqtt/util/MQTTAdapterListener.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java index f7ea4d254..7635155d3 100644 --- a/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java +++ b/components/extensions/cdmf-transport-adapters/input/org.wso2.carbon.device.mgt.input.adapter.mqtt/src/main/java/org/wso2/carbon/device/mgt/input/adapter/mqtt/util/MQTTAdapterListener.java @@ -46,6 +46,7 @@ import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo; import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException; import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService; import org.wso2.carbon.user.api.UserStoreException; +import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.io.IOException; import java.net.MalformedURLException; @@ -79,7 +80,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { InputEventAdapterListener inputEventAdapterListener) { String mqttClientId = inputEventAdapterConfiguration.getProperties() .get(MQTTEventAdapterConstants.ADAPTER_CONF_CLIENTID); - if(mqttClientId == null || mqttClientId.trim().isEmpty()){ + if (mqttClientId == null || mqttClientId.trim().isEmpty()) { mqttClientId = MqttClient.generateClientId(); } this.inputEventAdapterConfiguration = inputEventAdapterConfiguration; @@ -110,7 +111,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { if (contentValidatorType == null || contentValidatorType.equals(MQTTEventAdapterConstants.DEFAULT)) { contentValidator = InputAdapterServiceDataHolder.getInputAdapterExtensionService() .getDefaultContentValidator(); - } else { + } else { contentValidator = InputAdapterServiceDataHolder.getInputAdapterExtensionService() .getContentValidator(contentValidatorType); } @@ -150,12 +151,12 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { registrationProfile.setTokenScope(MQTTEventAdapterConstants.TOKEN_SCOPE); if (!mqttBrokerConnectionConfiguration.isGlobalCredentailSet()) { registrationProfile.setClientName(MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX - + mqttBrokerConnectionConfiguration.getAdapterName() + - "_" + tenantDomain); + + mqttBrokerConnectionConfiguration.getAdapterName() + + "_" + tenantDomain); registrationProfile.setIsSaasApp(false); } else { registrationProfile.setClientName(MQTTEventAdapterConstants.APPLICATION_NAME_PREFIX - + mqttBrokerConnectionConfiguration.getAdapterName()); + + mqttBrokerConnectionConfiguration.getAdapterName()); registrationProfile.setIsSaasApp(true); } String jsonString = registrationProfile.toJSON(); @@ -163,8 +164,8 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { postMethod.setEntity(requestEntity); String basicAuth = getBase64Encode(username, password); postMethod.setHeader(new BasicHeader(MQTTEventAdapterConstants.AUTHORIZATION_HEADER_NAME, - MQTTEventAdapterConstants.AUTHORIZATION_HEADER_VALUE_PREFIX + - basicAuth)); + MQTTEventAdapterConstants.AUTHORIZATION_HEADER_VALUE_PREFIX + + basicAuth)); HttpResponse httpResponse = httpClient.execute(postMethod); if (httpResponse != null) { String response = MQTTUtil.getResponseString(httpResponse); @@ -183,9 +184,9 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { } } catch (MalformedURLException e) { log.error("Invalid dcrUrl : " + dcrUrlString); - } catch (JWTClientException | UserStoreException e) { + } catch (JWTClientException | UserStoreException e) { log.error("Failed to create an oauth token with jwt grant type.", e); - } catch (NoSuchAlgorithmException |KeyManagementException |KeyStoreException | IOException e) { + } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException | IOException e) { log.error("Failed to create a http connection.", e); } } @@ -204,7 +205,7 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { mqttClient.disconnect(3000); } catch (MqttException e) { log.error("Can not unsubscribe from the destination " + topic + - " with the event adapter " + adapterName, e); + " with the event adapter " + adapterName, e); } } connectionSucceeded = true; @@ -226,11 +227,13 @@ public class MQTTAdapterListener implements MqttCallback, Runnable { } PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true); - TenantAxisUtils.getTenantConfigurationContext(tenantDomain,InputAdapterServiceDataHolder.getMainServerConfigContext()); + if (!tenantDomain.equalsIgnoreCase(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) { + TenantAxisUtils.getTenantConfigurationContext(tenantDomain, InputAdapterServiceDataHolder.getMainServerConfigContext()); + } InputEventAdapterListener inputEventAdapterListener = InputAdapterServiceDataHolder - .getInputEventAdapterService().getInputAdapterRuntime(PrivilegedCarbonContext.getThreadLocalCarbonContext() - .getTenantId(), inputEventAdapterConfiguration.getName()); + .getInputEventAdapterService().getInputAdapterRuntime(PrivilegedCarbonContext.getThreadLocalCarbonContext() + .getTenantId(), inputEventAdapterConfiguration.getName()); if (log.isDebugEnabled()) { log.debug("Event received in MQTT Event Adapter - " + msgText); From 6b3992261a858906168b3bc2eca22a660e15ab4a Mon Sep 17 00:00:00 2001 From: sinthuja Date: Fri, 5 May 2017 23:45:26 +0530 Subject: [PATCH 08/11] Fixing the issues in the android sense device type. --- .../src/main/resources/cloud.p2.inf | 3 +- .../src/main/resources/default.p2.inf | 3 + .../src/main/resources/p2.inf | 3 + .../android_sense_receiver-carbon.super.xml | 29 +++ .../pom.xml | 56 +++++ .../src/main/resources/cloud.p2.inf | 3 + .../src/main/resources/default.p2.inf | 9 +- .../src/main/resources/p2.inf | 9 +- .../receiver/android_sense_receiver.xml | 29 +++ .../org.wso2.iot.android.sense_1.0.0.json | 222 ++++++++++++++++++ 10 files changed, 359 insertions(+), 7 deletions(-) create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml create mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf index 7afe8e919..92e6dd61e 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf @@ -1,6 +1,7 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf index f3bf580fa..6b3219771 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/default.p2.inf @@ -1,6 +1,9 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/eventreceivers/android_sense_receiver-carbon.super.xml);\ + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf index f3bf580fa..6b3219771 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf @@ -1,6 +1,9 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\ +org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/eventreceivers/android_sense_receiver-carbon.super.xml);\ + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml new file mode 100644 index 000000000..be92cf45b --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/receiver/android_sense_receiver-carbon.super.xml @@ -0,0 +1,29 @@ + + + + + + carbon.super/android_sense/+/data + iot-mqtt + true + android_sense_receiver-carbon.super + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml index 928cfca4b..522d2f5bc 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/pom.xml @@ -138,6 +138,18 @@ + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.androidsense.analytics + + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + org.wso2.carbon.devicemgt-plugins org.wso2.carbon.device.mgt.iot.androidsense.ui @@ -153,6 +165,50 @@ + + unpack-analytics + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.iot.analytics + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + + + unpack-geo + package + + unpack + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.iot.geo.dashboard + ${project.version} + zip + true + + ${project.build.directory}/maven-shared-archive-resources/carbonapps + + **/* + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf index bbdc137a0..530879010 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/cloud.p2.inf @@ -2,6 +2,9 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../resources/devicetypes/android_sense/receiver/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../resources/devicetypes/android_sense/streams/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/jaggeryapps/);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf index d269b678e..6239a598f 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/default.p2.inf @@ -1,7 +1,10 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/receiver/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/streams/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf index d269b678e..6239a598f 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf @@ -1,7 +1,10 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/receiver/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/streams/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml new file mode 100644 index 000000000..8261acc13 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/receiver/android_sense_receiver.xml @@ -0,0 +1,29 @@ + + + + + + ${tenant-domain}/android_sense/+/data + iot-mqtt + true + android_sense_receiver-${tenant-domain} + + + + diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json new file mode 100644 index 000000000..4a33c4321 --- /dev/null +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/streams/org.wso2.iot.android.sense_1.0.0.json @@ -0,0 +1,222 @@ +{ + "name": "org.wso2.iot.android.sense", + "version": "1.0.0", + "nickName": "android_sense_stream", + "description": "This hold the device type stream of android sense", + "metaData": [ + { + "name": "owner", + "type": "STRING" + }, + { + "name": "deviceId", + "type": "STRING" + }, + { + "name": "type", + "type": "STRING" + }, + { + "name": "timestamp", + "type": "LONG" + } + ], + "payloadData": [ + { + "name": "battery", + "type": "INT" + }, + { + "name": "battery_state", + "type": "STRING" + }, + { + "name": "battery_status", + "type": "STRING" + }, + { + "name": "battery_temperature", + "type": "INT" + }, + { + "name": "gps_lat", + "type": "DOUBLE" + }, + { + "name": "gps_long", + "type": "DOUBLE" + }, + { + "name": "accelerometer_x", + "type": "FLOAT" + }, + { + "name": "accelerometer_y", + "type": "FLOAT" + }, + { + "name": "accelerometer_z", + "type": "FLOAT" + }, + { + "name": "speed_limit", + "type": "FLOAT" + }, + { + "name": "turn_way", + "type": "STRING" + }, + { + "name": "magnetic_x", + "type": "FLOAT" + }, + { + "name": "magnetic_y", + "type": "FLOAT" + }, + { + "name": "magnetic_z", + "type": "FLOAT" + }, + { + "name": "gyroscope_x", + "type": "FLOAT" + }, + { + "name": "gyroscope_y", + "type": "FLOAT" + }, + { + "name": "gyroscope_z", + "type": "FLOAT" + }, + { + "name": "light", + "type": "FLOAT" + }, + { + "name": "pressure", + "type": "FLOAT" + }, + { + "name": "proximity", + "type": "FLOAT" + }, + { + "name": "gravity_x", + "type": "FLOAT" + }, + { + "name": "gravity_y", + "type": "FLOAT" + }, + { + "name": "gravity_z", + "type": "FLOAT" + }, + { + "name": "rotation_x", + "type": "FLOAT" + }, + { + "name": "rotation_y", + "type": "FLOAT" + }, + { + "name": "rotation_z", + "type": "FLOAT" + }, + { + "name": "word", + "type": "STRING" + }, + { + "name": "word_sessionId", + "type": "STRING" + }, + { + "name": "word_status", + "type": "STRING" + }, + { + "name": "beacon_major", + "type": "INT" + }, + { + "name": "beacon_minor", + "type": "INT" + }, + { + "name": "beacon_proximity", + "type": "STRING" + }, + { + "name": "beacon_uuid", + "type": "INT" + }, + { + "name": "call_number", + "type": "STRING" + }, + { + "name": "call_type", + "type": "STRING" + }, + { + "name": "call_start_time", + "type": "LONG" + }, + { + "name": "call_end_time", + "type": "LONG" + }, + { + "name": "screen_state", + "type": "STRING" + }, + { + "name": "audio_playing", + "type": "BOOL" + }, + { + "name": "headset_on", + "type": "BOOL" + }, + { + "name": "music_volume", + "type": "INT" + }, + { + "name": "activity_type", + "type": "INT" + }, + { + "name": "confidence", + "type": "INT" + }, + { + "name": "sms_number", + "type": "STRING" + }, + { + "name": "application_name", + "type": "STRING" + }, + { + "name": "action", + "type": "STRING" + }, + { + "name": "data_type", + "type": "STRING" + }, + { + "name": "data_sent", + "type": "LONG" + }, + { + "name": "data_received", + "type": "LONG" + } + ] +} \ No newline at end of file From 5195e4144c0dc2b877884db132cd65f8d116c11b Mon Sep 17 00:00:00 2001 From: sinthuja Date: Fri, 5 May 2017 23:52:50 +0530 Subject: [PATCH 09/11] Removing unwanted p2.inf. --- .../src/main/resources/p2.inf | 9 ------- .../src/main/resources/p2.inf | 25 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf delete mode 100644 features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf deleted file mode 100644 index 6b3219771..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,9 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../analytics/repository/deployment/server/carbonapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../analytics/repository/deployment/server/carbonapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/carbonapps/android_sense.car);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../analytics/repository/deployment/server/eventreceivers/android_sense_receiver-carbon.super.xml);\ - diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf deleted file mode 100644 index 6239a598f..000000000 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.ui.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,25 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/receiver/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/receiver/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/streams/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/streams/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/android_sense/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/datasources/,target:${installFolder}/../../../repository/conf/datasources/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ - -instructions.unconfigure = \ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/android_sense);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/conf/datasources/androidsense-datasources.xml);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/database/AndroidSenseDM_DB.h2.db);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.type-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.platform.configuration);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.realtime.analytics-view);\ -org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/deployment/server/devicetypes/android_sense.xml);\ \ No newline at end of file From 778bbe3cc6f2f1223d101d587f7a37c36a5517e4 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Fri, 5 May 2017 23:59:14 +0530 Subject: [PATCH 10/11] Fixing the issue in the resource paths. --- .../src/main/resources/cloud.p2.inf | 2 +- .../src/main/resources/default.p2.inf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf index 92e6dd61e..b3363450a 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.analytics.feature/src/main/resources/cloud.p2.inf @@ -1,7 +1,7 @@ instructions.configure = \ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/carbonapps/,target:${installFolder}/../../resources/devicetypes/android_sense/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.analytics_${feature.version}/receiver/,target:${installFolder}/../../../../analytics/repository/deployment/server/eventreceivers/,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_sense.car);\ \ No newline at end of file diff --git a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf index b04588644..0f300a1e9 100644 --- a/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf +++ b/features/device-types-feature/androidsense-plugin-feature/org.wso2.carbon.device.mgt.iot.androidsense.backend.feature/src/main/resources/default.p2.inf @@ -1,7 +1,7 @@ instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../resources/devicetypes/android_sense/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/);\ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/devicetypes/android_sense/);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/webapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/webapps/,target:${installFolder}/../../../repository/deployment/server/webapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.androidsense.backend_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts/cdm/plugins/android_sense,overwrite:true);\ From 7f5af71e4a91ff76bd4e4c90c21c98c59e76a915 Mon Sep 17 00:00:00 2001 From: sinthuja Date: Sun, 7 May 2017 23:09:23 +0530 Subject: [PATCH 11/11] Making the UI features to copy the capps to resources dir. --- .../src/main/resources/p2.inf | 1 + .../src/main/resources/p2.inf | 1 + .../src/main/resources/p2.inf | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf index 2b8e74a8a..859afd9c4 100644 --- a/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/arduino-plugin-feature/org.wso2.carbon.device.mgt.iot.arduino.ui.feature/src/main/resources/p2.inf @@ -8,6 +8,7 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/jaggeryapps/,target:${installFolder}/../../../repository/deployment/server/jaggeryapps/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.arduino.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/arduino,overwrite:true);\ instructions.unconfigure = \ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../repository/resources/sketches/arduino);\ diff --git a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf index c5e556762..0e1ba6717 100644 --- a/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/raspberrypi-plugin-feature/org.wso2.carbon.device.mgt.iot.raspberrypi.ui.feature/src/main/resources/p2.inf @@ -13,6 +13,7 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/database/,target:${installFolder}/../../../repository/database/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.raspberrypi.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/raspberrypi,overwrite:true);\ instructions.unconfigure = \ diff --git a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf index f9f4d8f30..d92250b09 100644 --- a/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf +++ b/features/device-types-feature/virtual-fire-alarm-plugin-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui.feature/src/main/resources/p2.inf @@ -19,7 +19,6 @@ org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../r org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/devicetypes/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm_${feature.version}/devicetypes/,target:${installFolder}/../../../repository/deployment/server/devicetypes/,overwrite:true);\ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/deployment/server/carbonapps/);\ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui_${feature.version}/carbonapps/,target:${installFolder}/../../../repository/resources/devicetypes/virtual_firealarm/,overwrite:true);\