From fdedb70f8003a5c781a57ddbab65319250acbbd6 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Mon, 6 Jun 2016 21:18:00 +0530 Subject: [PATCH] adding analytics scripts --- .../component/analytics/build.xml | 34 ++++ .../droneanalyzer/component/analytics/pom.xml | 86 ++++++++++ .../component/analytics/src/assembly/src.xml | 36 ++++ .../EventPublisher_droneStats.xml | 25 +++ .../artifact.xml | 22 +++ .../EventReceiver_mqtt_droneStats.xml | 32 ++++ .../artifact.xml | 22 +++ .../Eventstore_droneStats_1.0.0/artifact.xml | 22 +++ .../org_wso2_iot_devices_droneStats.xml | 159 ++++++++++++++++++ .../Eventstream_droneStats_1.0.0/artifact.xml | 23 +++ ...org.wso2.iot.devices.droneStats_1.0.0.json | 29 ++++ .../Sparkscripts_1.0.0/artifact.xml | 22 +++ .../Sparkscripts_1.0.0/droneStats_Script.xml | 28 +++ .../carbonapps/droneStats/artifacts.xml | 28 +++ 14 files changed, 568 insertions(+) create mode 100644 modules/samples/droneanalyzer/component/analytics/build.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/pom.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/assembly/src.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/EventPublisher_droneStats.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/artifact.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/EventReceiver_mqtt_droneStats.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/artifact.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/artifact.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/org_wso2_iot_devices_droneStats.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/artifact.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/org.wso2.iot.devices.droneStats_1.0.0.json create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/artifact.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/droneStats_Script.xml create mode 100644 modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/artifacts.xml diff --git a/modules/samples/droneanalyzer/component/analytics/build.xml b/modules/samples/droneanalyzer/component/analytics/build.xml new file mode 100644 index 00000000..ea9894bc --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/build.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + diff --git a/modules/samples/droneanalyzer/component/analytics/pom.xml b/modules/samples/droneanalyzer/component/analytics/pom.xml new file mode 100644 index 00000000..fb4ce39e --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/pom.xml @@ -0,0 +1,86 @@ + + + + org.homeautomation + droneanalyzer-component + 1.0.0 + ../pom.xml + + 4.0.0 + ${groupId}.droneanalyzer.analytics + 1.0.0 + pom + ${groupId}.droneanalyzer.analytics + http://wso2.org + + + + maven-clean-plugin + ${maven-clean-plugin.version} + + + auto-clean + initialize + + clean + + + + + + maven-antrun-plugin + ${wso2.maven.compiler.source} + + + process-resources + + + + + + + run + + + + + + maven-assembly-plugin + ${maven-assembly-plugin.version} + + ${project.artifactId}-1.0.0 + false + + src/assembly/src.xml + + + + + create-archive + package + + single + + + + + + + \ No newline at end of file diff --git a/modules/samples/droneanalyzer/component/analytics/src/assembly/src.xml b/modules/samples/droneanalyzer/component/analytics/src/assembly/src.xml new file mode 100644 index 00000000..a5a37501 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/assembly/src.xml @@ -0,0 +1,36 @@ + + + + src + + zip + + false + ${basedir}/src + + + ${basedir}/target/carbonapps + / + true + + + \ No newline at end of file diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/EventPublisher_droneStats.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/EventPublisher_droneStats.xml new file mode 100644 index 00000000..e69f305e --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/EventPublisher_droneStats.xml @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/artifact.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/artifact.xml new file mode 100644 index 00000000..2a5159af --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventpublisher_droneStats_1.0.0/artifact.xml @@ -0,0 +1,22 @@ + + + + + EventPublisher_droneStats.xml + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/EventReceiver_mqtt_droneStats.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/EventReceiver_mqtt_droneStats.xml new file mode 100644 index 00000000..8da41ac5 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/EventReceiver_mqtt_droneStats.xml @@ -0,0 +1,32 @@ + + + + + carbon.super/drone/+/publisher + admin + device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:2 + org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.MQTTContentValidator + default + https://localhost:${carbon.https.port}/dynamic-client-web/register + tcp://${mqtt.broker.host}:${mqtt.broker.port} + true + + + + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/artifact.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/artifact.xml new file mode 100644 index 00000000..74cbd66a --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventreceiver_mqtt_droneStats_1.0.0/artifact.xml @@ -0,0 +1,22 @@ + + + + + EventReceiver_mqtt_droneStats.xml + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/artifact.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/artifact.xml new file mode 100644 index 00000000..724730c8 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/artifact.xml @@ -0,0 +1,22 @@ + + + + + org_wso2_iot_devices_droneStats.xml + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/org_wso2_iot_devices_droneStats.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/org_wso2_iot_devices_droneStats.xml new file mode 100644 index 00000000..a3159f6b --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstore_droneStats_1.0.0/org_wso2_iot_devices_droneStats.xml @@ -0,0 +1,159 @@ + + + + + org.wso2.iot.devices.droneStats:1.0.0 + + EVENT_STORE + + + meta_owner + true + true + false + STRING + + + meta_deviceType + true + true + false + STRING + + + meta_deviceId + true + true + false + STRING + + + meta_time + true + true + false + LONG + + + quatanium_val_q1 + false + false + false + DOUBLE + + + quatanium_val_q2 + false + false + false + DOUBLE + + + quatanium_val_q3 + false + false + false + DOUBLE + + + quatanium_val_q4 + false + false + false + DOUBLE + + + velocity_x + false + false + false + DOUBLE + + + velocity_y + false + false + false + DOUBLE + + + velocity_z + false + false + false + DOUBLE + + + global_location_lat + false + false + false + DOUBLE + + + global_location_alt + false + false + false + DOUBLE + + + global_location_lon + false + false + false + DOUBLE + + + battery_level + false + false + false + DOUBLE + + + battery_voltage + false + false + false + DOUBLE + + + pitch + false + false + false + DOUBLE + + + roll + false + false + false + DOUBLE + + + yaw + false + false + false + DOUBLE + + + \ No newline at end of file diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/artifact.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/artifact.xml new file mode 100644 index 00000000..b1855954 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/artifact.xml @@ -0,0 +1,23 @@ + + + + + org.wso2.iot.devices.droneStats_1.0.0.json + + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/org.wso2.iot.devices.droneStats_1.0.0.json b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/org.wso2.iot.devices.droneStats_1.0.0.json new file mode 100644 index 00000000..746e60d8 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Eventstream_droneStats_1.0.0/org.wso2.iot.devices.droneStats_1.0.0.json @@ -0,0 +1,29 @@ +{ + "name": "org.wso2.iot.devices.droneStats", + "version": "1.0.0", + "nickName": "droneStats", + "description": "droneStats data received from the Device", + "metaData": [ + {"name":"owner","type":"STRING"}, + {"name":"deviceType","type":"STRING"}, + {"name":"deviceId","type":"STRING"}, + {"name":"time","type":"LONG"} + ], + "payloadData": [ + {"name": "quatanium_val_q1", "type": "DOUBLE"}, + {"name": "quatanium_val_q2", "type": "DOUBLE"}, + {"name": "quatanium_val_q3", "type": "DOUBLE"}, + {"name": "quatanium_val_q4", "type": "DOUBLE"}, + {"name": "velocity_x", "type": "DOUBLE"}, + {"name": "velocity_y", "type": "DOUBLE"}, + {"name": "velocity_z", "type": "DOUBLE"}, + {"name": "global_location_lat", "type": "DOUBLE"}, + {"name": "global_location_alt", "type": "DOUBLE"}, + {"name": "global_location_lon", "type": "DOUBLE"}, + {"name": "battery_level", "type": "DOUBLE"}, + {"name": "battery_voltage", "type": "DOUBLE"}, + {"name": "pitch", "type": "DOUBLE"}, + {"name": "roll", "type": "DOUBLE"}, + {"name": "yaw", "type": "DOUBLE"} + ] +} \ No newline at end of file diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/artifact.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/artifact.xml new file mode 100644 index 00000000..6c34aea9 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/artifact.xml @@ -0,0 +1,22 @@ + + + + + droneStats_Script.xml + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/droneStats_Script.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/droneStats_Script.xml new file mode 100644 index 00000000..7536c8e4 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/Sparkscripts_1.0.0/droneStats_Script.xml @@ -0,0 +1,28 @@ + + + + + IoTServer_Sensor_Script + + 0 * * * * ? + diff --git a/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/artifacts.xml b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/artifacts.xml new file mode 100644 index 00000000..76675ae7 --- /dev/null +++ b/modules/samples/droneanalyzer/component/analytics/src/main/resources/carbonapps/droneStats/artifacts.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + +