Merge pull request #254 from ayyoob/transport

refactored analytics scripts
revert-dabc3590
Milan Perera 9 years ago
commit 8ff9439725

@ -176,14 +176,8 @@ public class DataPublisherService extends Service {
if (!mqttTransportHandler.isConnected()) {
mqttTransportHandler.connect();
}
String topic = "wso2/" + LocalRegistry.getTenantDomain(context) + "/" + SenseConstants
.DEVICE_TYPE + "/" + deviceId + "/data";
mqttTransportHandler.publishDeviceData(user, deviceId, jsonArray.toString(), topic);
String topic = LocalRegistry.getTenantDomain(context) + "/" + SenseConstants.DEVICE_TYPE + "/" + deviceId + "/data";
mqttTransportHandler.publishDeviceData(user, deviceId, jsonArray.toString(), topic);
}
} catch (JSONException e) {
Log.e(TAG, "Json Data Parsing Exception", e);

@ -77,7 +77,7 @@ public abstract class MQTTTransportHandler implements MqttCallback, TransportHan
String username = LocalRegistry.getUsername(context);
String deviceId = LocalRegistry.getDeviceId(context);
this.clientId = deviceId + ":" + SenseConstants.DEVICE_TYPE;
this.subscribeTopic = "wso2/" + LocalRegistry.getTenantDomain(context)+ "/" + SenseConstants.DEVICE_TYPE + "/" +
this.subscribeTopic = LocalRegistry.getTenantDomain(context)+ "/" + SenseConstants.DEVICE_TYPE + "/" +
deviceId + "/command/#";
this.clientWillTopic = DISCONNECTION_WILL_TOPIC_PREFIX + SenseConstants.DEVICE_TYPE;
this.mqttBrokerEndPoint = LocalRegistry.getMqttEndpoint(context);

@ -17,13 +17,14 @@
~ under the License.
-->
<project name="create-sample-sensor-capps" default="zip" basedir=".">
<project name="create-android-sense-capps" default="zip" basedir=".">
<property name="project-name" value="${ant.project.name}"/>
<property name="target-dir" value="target/carbonapps"/>
<property name="src-dir" value="src/main/resources/carbonapps"/>
<property name="Android_Sense_dir" value="Android_Sense"/>
<property name="Android_Sense_dir" value="androidsense"/>
<property name="Wordcounter_dir" value="word_count"/>
<target name="clean">
<delete dir="${target-dir}" />
@ -34,5 +35,8 @@
<zip destfile="${target-dir}/${Android_Sense_dir}.car">
<zipfileset dir="${src-dir}/${Android_Sense_dir}"/>
</zip>
<zip destfile="${target-dir}/${Wordcounter_dir}.car">
<zipfileset dir="${src-dir}/${Wordcounter_dir}"/>
</zip>
</target>
</project>

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="EventExecution_AndroidSense" version="1.0.0" type="event/execution-plan" serverRole="DataAnalyticsServer">
<file>EventExecution_AndroidSense.siddhiql</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="EventPublisher_AndroidSense" version="1.0.0" type="event/publisher" serverRole="DataAnalyticsServer">
<file>EventPublisher_AndroidSense.xml</file>
</artifact>

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifacts>
<artifact name="AndroidSense_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="EventStream_AndroidSense" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="android_sense_mqtt" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="EventPublisher_AndroidSense" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="EventExecution_AndroidSense" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="android_sense_execution" version="1.0.0" type="event/execution-plan" serverRole="DataAnalyticsServer">
<file>android_sense_execution.siddhiql</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventPublisher name="EventPublisher_AndroidSense" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
<eventPublisher name="android_sense_publisher" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
<from streamName="org.wso2.iot.android.sense" version="1.0.0"/>
<mapping customMapping="disable" type="wso2event"/>
<to eventAdapterType="iot-ui"/>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="android_sense_publisher" version="1.0.0" type="event/publisher" serverRole="DataAnalyticsServer">
<file>android_sense_publisher.xml</file>
</artifact>

@ -17,12 +17,13 @@
~ under the License.
-->
<eventReceiver name="android_sense_mqtt" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="android_sense_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-mqtt">
<property name="topic">carbon.super/android_sense/+/data</property>
<property name="username">admin</property>
<property name="contentValidationParams">device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:2</property>
<property name="contentValidation">default</property>
<property name="contentValidatorParams">device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:2</property>
<property name="contentValidator">org.wso2.carbon.device.mgt.iot.input.adapter.mqtt.util.MQTTContentValidator</property>
<property name="contentTransformer">default</property>
<property name="dcrUrl">https://localhost:${carbon.https.port}/dynamic-client-web/register</property>
<property name="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
<property name="cleanSession">true</property>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventreceiver_magnetic" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_magnetic.xml</file>
<artifact name="android_sense_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>android_sense_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="EventStream_AndroidSense" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="android_sense_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.android.sense_1.0.0.json</file>
</artifact>

@ -18,12 +18,10 @@
-->
<artifacts>
<artifact name="ROTATION_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_rotation" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_rotation" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_rotation" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<artifact name="android_sense" version="1.0.0" type="carbon/application">
<dependency artifact="android_sense_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="android_sense_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="android_sense_publisher" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="android_sense_execution" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -18,10 +18,10 @@
-->
<artifacts>
<artifact name="Light_Sensors_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_light" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_light" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_light" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<artifact name="word_count" version="1.0.0" type="carbon/application">
<dependency artifact="word_count_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="word_count_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="word_count_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="word_count_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventreceiver_light" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_light.xml</file>
<artifact name="word_count_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>word_count_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_wordcount" statistics="disable" trace="disable"
<eventReceiver name="word_count_receiver" statistics="disable" trace="disable"
xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="word_count_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>word_count_script.xml</file>
</artifact>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventstore_wordcount" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<artifact name="word_count_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_wordcount.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Eventstream_wordcount" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="word_count_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.wordcount_1.0.0.json</file>
</artifact>

@ -43,7 +43,7 @@ public interface AndroidSenseControllerService {
*/
@Path("device/{deviceId}/words")
@POST
@Feature(code = "keywords", name = "Add Keywords", description = "Send keywords to the device", type = "operation")
@Feature(code = "keywords", name = "Add Keywords", description = "Send keywords to the device")
Response sendKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("keywords") String keywords);
/**
@ -54,14 +54,12 @@ public interface AndroidSenseControllerService {
*/
@Path("device/{deviceId}/words/threshold")
@POST
@Feature(code = "threshold", name = "Add a Threshold", description = "Set a threshold for word in the device",
type = "operation")
@Feature(code = "threshold", name = "Add a Threshold", description = "Set a threshold for word in the device")
Response sendThreshold(@PathParam("deviceId") String deviceId, @QueryParam("threshold") String threshold);
@Path("device/{deviceId}/words")
@DELETE
@Feature(code = "remove", name = "Remove Keywords", description = "Remove the keywords",
type = "operation")
@Feature(code = "remove", name = "Remove Keywords", description = "Remove the keywords")
Response removeKeyWords(@PathParam("deviceId") String deviceId, @QueryParam("words") String words);
/**

@ -17,13 +17,22 @@
~ under the License.
-->
<artifacts>
<artifact name="PROXIMITY_CAPP" version="1.0.0" type="carbon/application">
<project name="create-arduino-capps" default="zip" basedir=".">
<dependency artifact="Eventstream_proximity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_proximity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_proximity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<property name="project-name" value="${ant.project.name}"/>
<property name="target-dir" value="target/carbonapps"/>
<property name="src-dir" value="src/main/resources/carbonapps"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>
<property name="Arduino_dir" value="arduino"/>
<target name="clean">
<delete dir="${target-dir}" />
</target>
<target name="zip" depends="clean">
<mkdir dir="${target-dir}"/>
<zip destfile="${target-dir}/${Arduino_dir}.car">
<zipfileset dir="${src-dir}/${Arduino_dir}"/>
</zip>
</target>
</project>

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>arduino-plugin</artifactId>
<groupId>org.wso2.carbon.devicemgt-plugins</groupId>
<version>2.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.iot.arduino.analytics</artifactId>
<name>WSO2 Carbon - IoT Server Arduino Analytics capp</name>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<target>
<ant antfile="build.xml" target="zip"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version>
<configuration>
<finalName>${project.artifactId}-${carbon.devicemgt.plugins.version}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,36 @@
<!--
~ Copyright (c) 2016, 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.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>src</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>${basedir}/src</baseDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/target/carbonapps</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</assembly>

@ -0,0 +1,17 @@
/* Enter a unique ExecutionPlan */
@Plan:name('arduino_execution')
/* Enter a unique description for ExecutionPlan */
-- @Plan:description('arduino_execution')
/* define streams/tables and write queries here ... */
@Import('org.wso2.iot.arduino:1.0.0')
define stream arduino (meta_owner string, meta_deviceId string, temperature float);
@Export('org.wso2.iot.devices.temperature:1.0.0')
define stream temperature (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, temperature float);
from arduino
select meta_owner, 'arduino' as meta_deviceType, meta_deviceId, time:timestampInMilliseconds() as meta_time, temperature
insert into temperature;

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="arduino_execution" version="1.0.0" type="event/execution-plan" serverRole="DataAnalyticsServer">
<file>arduino_execution.siddhiql</file>
</artifact>

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<eventReceiver name="arduino_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-http">
<property name="maximumHttpConnectionPerHost">2</property>
<property name="username">admin</property>
<property name="contentValidatorParams">device_id_json_path:event.metaData.deviceId</property>
<property name="contentValidator">org.wso2.carbon.device.mgt.iot.input.adapter.http.util.HTTPContentValidator</property>
<property name="contentTransformer">default</property>
<property name="transports">all</property>
<property name="maximumTotalHttpConnection">100</property>
<property name="tokenValidationEndpointUrl">https://localhost:${carbon.https.port}/services/OAuth2TokenValidationService</property>
<property name="password">admin</property>
</from>
<mapping customMapping="disable" type="json"/>
<to streamName="org.wso2.iot.arduino" version="1.0.0"/>
</eventReceiver>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Light_Sensor_Script.xml</file>
<artifact name="arduino_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>arduino_receiver.xml</file>
</artifact>

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name= "arduino_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.arduino_1.0.0.json</file>
</artifact>

@ -0,0 +1,15 @@
{
"name": "org.wso2.iot.arduino",
"version": "1.0.0",
"nickName": "Arduino",
"description": "Temperature data received from the Arduino",
"metaData": [
{"name":"owner","type":"STRING"},
{"name":"deviceId","type":"STRING"}
],
"payloadData": [
{
"name": "temperature","type": "FLOAT"
}
]
}

@ -18,10 +18,9 @@
-->
<artifacts>
<artifact name="PRESSURE_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_pressure" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_pressure" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_pressure" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<artifact name="arduino" version="1.0.0" type="carbon/application">
<dependency artifact="arduino_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="arduino_execution" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="arduino_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -36,7 +36,7 @@ public interface ArduinoControllerService {
@Path("device/{deviceId}/bulb")
@POST
@Feature(code = "bulb", name = "Control Bulb", type = "operation", description = "Control Bulb on Arduino Uno")
@Feature(code = "bulb", name = "Control Bulb", description = "Control Bulb on Arduino Uno")
Response switchBulb(@PathParam("deviceId") String deviceId, @QueryParam("state") String state);
@Path("device/{deviceId}/controls")

@ -37,6 +37,7 @@
<module>org.wso2.carbon.device.mgt.iot.arduino.api</module>
<module>org.wso2.carbon.device.mgt.iot.arduino.plugin</module>
<module>org.wso2.carbon.device.mgt.iot.arduino.ui</module>
<module>org.wso2.carbon.device.mgt.iot.arduino.analytics</module>
</modules>
<build>

@ -17,24 +17,23 @@
~ under the License.
-->
<project name="create-sample-sensor-capps" default="zip" basedir=".">
<project name="create-sensors-capps" default="zip" basedir=".">
<property name="project-name" value="${ant.project.name}"/>
<property name="target-dir" value="target/carbonapps"/>
<property name="src-dir" value="src/main/resources/carbonapps"/>
<property name="GPS_dir" value="GPS"/>
<property name="Light_dir" value="Light"/>
<property name="Battery_dir" value="Battery"/>
<property name="Magnetic_dir" value="Magnetic"/>
<property name="Accelerometer_dir" value="Accelerometer"/>
<property name="Gravity_dir" value="Gravity"/>
<property name="Gyroscope_dir" value="Gyroscope"/>
<property name="Proximity_dir" value="Proximity"/>
<property name="Pressure_dir" value="Pressure"/>
<property name="Rotation_dir" value="Rotation"/>
<property name="Wordcounter_dir" value="WordCount"/>
<property name="Temperature_dir" value="Temperature"/>
<property name="GPS_dir" value="gps_sensor"/>
<property name="Light_dir" value="light_sensor"/>
<property name="Battery_dir" value="battery_sensor"/>
<property name="Magnetic_dir" value="magnetic_sensor"/>
<property name="Accelerometer_dir" value="accelerometer_sensor"/>
<property name="Gravity_dir" value="gravity_sensor"/>
<property name="Gyroscope_dir" value="gyroscope_sensor"/>
<property name="Proximity_dir" value="proximity_sensor"/>
<property name="Pressure_dir" value="pressure_sensor"/>
<property name="Rotation_dir" value="rotation_sensor"/>
<property name="Temperature_dir" value="temperature_sensor"/>
<target name="clean">
<delete dir="${target-dir}" />
@ -72,9 +71,6 @@
<zip destfile="${target-dir}/${Proximity_dir}.car">
<zipfileset dir="${src-dir}/${Proximity_dir}"/>
</zip>
<zip destfile="${target-dir}/${Wordcounter_dir}.car">
<zipfileset dir="${src-dir}/${Wordcounter_dir}"/>
</zip>
<zip destfile="${target-dir}/${Temperature_dir}.car">
<zipfileset dir="${src-dir}/${Temperature_dir}"/>
</zip>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_accelerometer" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_accelerometer.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_gravity" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_gravity.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_gyroscope" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_gyroscope.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Gyroscope_Sensor_Script.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Magnetic_Sensor_Script.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Pressure_Sensor_Script.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_proximity" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_proximity.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Proximity_Sensor_Script.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_rotation" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_rotation.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Rotation_Sensor_Script.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventpublisher_temperature" version="1.0.0" type="event/publisher" serverRole="DataAnalyticsServer">
<file>EventPublisher_temperature.xml</file>
</artifact>

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<eventReceiver name="temperature-http" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-http">
<property name="maximumHttpConnectionPerHost">2</property>
<property name="username">admin</property>
<property name="contentValidationParams">device_id_json_path:event.metaData.deviceId</property>
<property name="contentValidation">default</property>
<property name="transports">all</property>
<property name="maximumTotalHttpConnection">100</property>
<property name="tokenValidationEndpointUrl">https://localhost:${carbon.https.port}/services/OAuth2TokenValidationService</property>
<property name="password">admin</property>
</from>
<mapping customMapping="disable" type="json"/>
<to streamName="org.wso2.iot.devices.temperature" version="1.0.0"/>
</eventReceiver>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_http_temperature" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_http_temperature.xml</file>
</artifact>

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<eventReceiver name="temperature-mqtt" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-mqtt">
<property name="topic">carbon.super/+/+/temperature</property>
<property name="username">admin</property>
<property name="contentValidationParams">device_id_json_path:event.metaData.deviceId,device_id_topic_hierarchy_index:2</property>
<property name="contentValidation">default</property>
<property name="dcrUrl">https://localhost:${carbon.https.port}/dynamic-client-web/register</property>
<property name="clientId">temperatureMqttClient</property>
<property name="url">tcp://${mqtt.broker.host}:${mqtt.broker.port}</property>
<property name="cleanSession">true</property>
</from>
<mapping customMapping="disable" type="json"/>
<to streamName="org.wso2.iot.devices.temperature" version="1.0.0"/>
</eventReceiver>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_mqtt_temperature" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_mqtt_temperature.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_temperature" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_temperature.xml</file>
</artifact>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Temperature_Sensor_Script.xml</file>
</artifact>

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifacts>
<artifact name="Temperature_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_http_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_mqtt_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventpublisher_temperature" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="Eventreceiver_wordcount" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_wordcount.xml</file>
</artifact>

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifacts>
<artifact name="WORD_COUNT_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_wordcount" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_wordcount" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_wordcount" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_accelerometer" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="accelerometer_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventreceiver_pressure" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_pressure.xml</file>
<artifact name="accelerometer_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>accelerometer_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>Accelerometer_Sensor_Script.xml</file>
<artifact name="accelerometer_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>accelerometer_script.xml</file>
</artifact>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventstore_accelerometer" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<artifact name="accelerometer_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_accelerometer.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Eventstream_accelerometer" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="accelerometer_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.accelerometer_1.0.0.json</file>
</artifact>

@ -18,10 +18,10 @@
-->
<artifacts>
<artifact name="Magnetic_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_magnetic" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_magnetic" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_magnetic" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<artifact name="accelerometer" version="1.0.0" type="carbon/application">
<dependency artifact="accelerometer_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="accelerometer_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="accelerometer_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="accelerometer_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -18,12 +18,10 @@
-->
<artifacts>
<artifact name="Battery_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_battery" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_battery" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_battery" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
<artifact name="battery" version="1.0.0" type="carbon/application">
<dependency artifact="battery_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="battery_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="battery_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="battery_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="battery_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>battery_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_battery" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="battery_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>GPS_Sensor_Script.xml</file>
<artifact name="battery_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>battery_script.xml</file>
</artifact>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventstore_battery" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<artifact name="battery_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_battery.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Eventstream_battery" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="battery_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.battery_1.0.0.json</file>
</artifact>

@ -18,10 +18,10 @@
-->
<artifacts>
<artifact name="GRAVITY_CAPP" version="1.0.0" type="carbon/application">
<dependency artifact="Eventstream_gravity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventstore_gravity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Eventreceiver_gravity" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="Sparkscripts" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<artifact name="gps" version="1.0.0" type="carbon/application">
<dependency artifact="gps_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gps_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gps_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gps_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="gps_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>gps_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_gps" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="gps_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="gps_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>gps_script.xml</file>
</artifact>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventstore_gps" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<artifact name="gps_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_gps.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Eventstream_gps" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="gps_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.gps_1.0.0.json</file>
</artifact>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifacts>
<artifact name="gravity" version="1.0.0" type="carbon/application">
<dependency artifact="gravity_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gravity_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gravity_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gravity_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="gravity_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>gravity_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_gravity" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="gravity_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="gravity_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>gravity_script.xml</file>
</artifact>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="Eventstore_gravity" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<artifact name="gravity_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_gravity.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<artifact name="Eventstream_gravity" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<artifact name="gravity_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.gravity_1.0.0.json</file>
</artifact>

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifacts>
<artifact name="gyroscope" version="1.0.0" type="carbon/application">
<dependency artifact="gyroscope_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gyroscope_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gyroscope_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="gyroscope_script" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
</artifact>
</artifacts>

@ -17,6 +17,6 @@
~ under the License.
-->
<artifact name="android_sense_mqtt" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>EventReceiver_AndroidSense.xml</file>
<artifact name="gyroscope_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>gyroscope_receiver.xml</file>
</artifact>

@ -17,7 +17,7 @@
~ under the License.
-->
<eventReceiver name="EventReceiver_gyroscope" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<eventReceiver name="gyroscope_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, 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.
-->
<artifact name="gyroscope_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>gyroscope_script.xml</file>
</artifact>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save