Merge pull request #287 from Anushkasandaruwan/master

Merging changes related to generation of emails based on accelarometer input.
revert-dabc3590
Ruwan 9 years ago
commit bbe631d3f2

@ -5,3 +5,5 @@ WSO2 MOBILE DEVICE MANAGER
WSO2 Mobile Device Manager (WSO2 MDM) is a comprehensive platform that helps solve mobile computing challenges enterprises face today when dealing with both corporate owned, personally enabled (COPE) devices and employee owned devices as part of a bring your own device (BYOD) program. WSO2 Mobile Device Manager (WSO2 MDM) is a comprehensive platform that helps solve mobile computing challenges enterprises face today when dealing with both corporate owned, personally enabled (COPE) devices and employee owned devices as part of a bring your own device (BYOD) program.
Whether it is device provisioning, device configuration management, policy enforcement, mobile application management, device data security, or compliance monitoring, WSO2 MDM offers a single enterprise-grade platform. Whether it is device provisioning, device configuration management, policy enforcement, mobile application management, device data security, or compliance monitoring, WSO2 MDM offers a single enterprise-grade platform.

@ -39,8 +39,22 @@ define stream battery (meta_owner string, meta_deviceType string, meta_deviceId
@Export('org.wso2.iot.devices.accelerometer:1.0.0') @Export('org.wso2.iot.devices.accelerometer:1.0.0')
define stream accelerometer (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, x float, y float, z float); define stream accelerometer (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, x float, y float, z float);
@Export("org.wso2.iot.devices.speed:1.0.0")
define stream speed (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, limit float);
@Export("org.wso2.iot.devices.turn:1.0.0")
define stream turn (meta_owner string, meta_deviceType string, meta_deviceId string, meta_time long, turn string);
@Import('org.wso2.iot.android.sense:1.0.0') @Import('org.wso2.iot.android.sense:1.0.0')
define stream androidsense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, gps_lat double, gps_long double, accelerometer_x float, accelerometer_y float, accelerometer_z float, magnetic_x float, magnetic_y float, magnetic_z float, gyroscope_x float, gyroscope_y float, gyroscope_z float, light float, pressure float, proximity float, gravity_x float, gravity_y float, gravity_z float, rotation_x float, rotation_y float, rotation_z float, word string, word_sessionId string, word_status string); define stream androidsense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, gps_lat double, gps_long double, accelerometer_x float, accelerometer_y float, accelerometer_z float,speed_limit float,turn_way string, magnetic_x float, magnetic_y float, magnetic_z float, gyroscope_x float, gyroscope_y float, gyroscope_z float, light float, pressure float, proximity float, gravity_x float, gravity_y float, gravity_z float, rotation_x float, rotation_y float, rotation_z float, word string, word_sessionId string, word_status string);
from androidsense[meta_type == 'speed']
select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, speed_limit as limit
insert into speed;
from androidsense[meta_type == 'turn']
select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, turn_way as turn
insert into turn;
from androidsense[meta_type == 'accelerometer'] from androidsense[meta_type == 'accelerometer']
select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, accelerometer_x as x, accelerometer_y as y, accelerometer_z as z select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, accelerometer_x as x, accelerometer_y as y, accelerometer_z as z
@ -84,4 +98,4 @@ insert into rotation;
from androidsense[meta_type == 'word'] from androidsense[meta_type == 'word']
select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, word_sessionId as sessionId, word as word, word_status as status select meta_owner, 'android_sense' as meta_deviceType, meta_deviceId, meta_timestamp as meta_time, word_sessionId as sessionId, word as word, word_status as status
insert into words; insert into words;

@ -16,6 +16,8 @@
{"name": "accelerometer_x", "type": "FLOAT"}, {"name": "accelerometer_x", "type": "FLOAT"},
{"name": "accelerometer_y", "type": "FLOAT"}, {"name": "accelerometer_y", "type": "FLOAT"},
{"name": "accelerometer_z", "type": "FLOAT"}, {"name": "accelerometer_z", "type": "FLOAT"},
{"name": "speed_limit", "type": "FLOAT"},
{"name": "turn_way", "type": "STRING"},
{"name": "magnetic_x", "type": "FLOAT"}, {"name": "magnetic_x", "type": "FLOAT"},
{"name": "magnetic_y", "type": "FLOAT"}, {"name": "magnetic_y", "type": "FLOAT"},
{"name": "magnetic_z", "type": "FLOAT"}, {"name": "magnetic_z", "type": "FLOAT"},
@ -35,4 +37,4 @@
{"name": "word_sessionId", "type": "STRING"}, {"name": "word_sessionId", "type": "STRING"},
{"name": "word_status", "type": "STRING"} {"name": "word_status", "type": "STRING"}
] ]
} }

@ -34,6 +34,8 @@
<property name="Pressure_dir" value="pressure_sensor"/> <property name="Pressure_dir" value="pressure_sensor"/>
<property name="Rotation_dir" value="rotation_sensor"/> <property name="Rotation_dir" value="rotation_sensor"/>
<property name="Temperature_dir" value="temperature_sensor"/> <property name="Temperature_dir" value="temperature_sensor"/>
<property name="Speed_dir" value="speed_sensor"/>
<property name="Turn_dir" value="turn_sensor"/>
<target name="clean"> <target name="clean">
<delete dir="${target-dir}" /> <delete dir="${target-dir}" />
@ -74,5 +76,12 @@
<zip destfile="${target-dir}/${Temperature_dir}.car"> <zip destfile="${target-dir}/${Temperature_dir}.car">
<zipfileset dir="${src-dir}/${Temperature_dir}"/> <zipfileset dir="${src-dir}/${Temperature_dir}"/>
</zip> </zip>
<zip destfile="${target-dir}/${Speed_dir}.car">
<zipfileset dir="${src-dir}/${Speed_dir}"/>
</zip>
<zip destfile="${target-dir}/${Turn_dir}.car">
<zipfileset dir="${src-dir}/${Turn_dir}"/>
</zip>
</target> </target>
</project> </project>

@ -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="speed" version="1.0.0" type="carbon/application">
<dependency artifact="speed_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="speed_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="speed_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="speed_publisher" 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.EventExecution_ConnectedLap_1.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.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="speed_publisher" version="1.0.0" type="event/publisher" serverRole="DataAnalyticsServer">
<file>speed_publisher.xml</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.EventExecution_ConnectedLap_1.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.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.
-->
<eventPublisher name="speed_publisher" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
<from streamName="org.wso2.iot.devices.speed" version="1.0.0"/>
<mapping customMapping="disable" type="text"/>
<to eventAdapterType="email">
<property name="email.subject">Email Alerts Speed</property>
<property name="email.address"></property>
<property name="email.type">text/html</property>
</to>
</eventPublisher>

@ -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="speed_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>speed_receiver.xml</file>
</artifact>

@ -0,0 +1,26 @@
<?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="speed_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
<to streamName="org.wso2.iot.devices.speed" version="1.0.0"/>
</eventReceiver>

@ -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="speed_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_speed.xml</file>
</artifact>

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
~ 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.
-->
<EventStoreConfiguration>
<Source>
<StreamId>org.wso2.iot.devices.speed:1.0.0</StreamId>
</Source>
<RecordStoreName>EVENT_STORE</RecordStoreName>
<TableSchema>
<ColumnDefinition>
<Name>meta_owner</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceType</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceId</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_time</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>LONG</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>limit</Name>
<EnableIndexing>false</EnableIndexing>
<IsPrimaryKey>false</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>LONG</Type>
</ColumnDefinition>
</TableSchema>
</EventStoreConfiguration>

@ -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="speed_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.speed_1.0.0.json</file>
</artifact>

@ -0,0 +1,30 @@
{
"name": "org.wso2.iot.devices.speed",
"version": "1.0.0",
"nickName": "speed",
"description": "speed data received from the Device",
"metaData": [
{
"name": "owner",
"type": "STRING"
},
{
"name": "deviceType",
"type": "STRING"
},
{
"name": "deviceId",
"type": "STRING"
},
{
"name": "time",
"type": "LONG"
}
],
"payloadData": [
{
"name": "limit",
"type": "FLOAT"
}
]
}

@ -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="turn" version="1.0.0" type="carbon/application">
<dependency artifact="turn_stream" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="turn_store" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="turn_receiver" version="1.0.0" include="true" serverRole="DataAnalyticsServer"/>
<dependency artifact="turn_publisher" 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.EventExecution_ConnectedLap_1.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.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="turn_publisher" version="1.0.0" type="event/publisher" serverRole="DataAnalyticsServer">
<file>turn_publisher.xml</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.EventExecution_ConnectedLap_1.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventPublisher_ConnectedLap_1.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventReceiver_ConnectedLap_1.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_1.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_CpuUsage_1.EventStream_ConnectedLap_MemoryUsage_1.0.0.EventStream_ConnectedLap_MemoryUsage_1.0.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.
-->
<eventPublisher name="turn_publisher" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
<from streamName="org.wso2.iot.devices.turn" version="1.0.0"/>
<mapping customMapping="disable" type="text"/>
<to eventAdapterType="email">
<property name="email.subject">Email Alerts Turn</property>
<property name="email.address"></property>
<property name="email.type">text/html</property>
</to>
</eventPublisher>

@ -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="turn_receiver" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
<file>turn_receiver.xml</file>
</artifact>

@ -0,0 +1,26 @@
<?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="turn_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="wso2event">
<property name="events.duplicated.in.cluster">false</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
<to streamName="org.wso2.iot.devices.turn" version="1.0.0"/>
</eventReceiver>

@ -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="turn_store" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
<file>org_wso2_iot_devices_turn.xml</file>
</artifact>

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
~ 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.
-->
<EventStoreConfiguration>
<Source>
<StreamId>org.wso2.iot.devices.turn:1.0.0</StreamId>
</Source>
<RecordStoreName>EVENT_STORE</RecordStoreName>
<TableSchema>
<ColumnDefinition>
<Name>meta_owner</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceType</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_deviceId</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>meta_time</Name>
<EnableIndexing>true</EnableIndexing>
<IsPrimaryKey>true</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>LONG</Type>
</ColumnDefinition>
<ColumnDefinition>
<Name>turn</Name>
<EnableIndexing>false</EnableIndexing>
<IsPrimaryKey>false</IsPrimaryKey>
<EnableScoreParam>false</EnableScoreParam>
<Type>STRING</Type>
</ColumnDefinition>
</TableSchema>
</EventStoreConfiguration>

@ -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="turn_stream" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
<file>org.wso2.iot.devices.turn_1.0.0.json</file>
</artifact>

@ -0,0 +1,30 @@
{
"name": "org.wso2.iot.devices.turn",
"version": "1.0.0",
"nickName": "turn",
"description": "turn data received from the Device",
"metaData": [
{
"name": "owner",
"type": "STRING"
},
{
"name": "deviceType",
"type": "STRING"
},
{
"name": "deviceId",
"type": "STRING"
},
{
"name": "time",
"type": "LONG"
}
],
"payloadData": [
{
"name": "turn",
"type": "STRING"
}
]
}
Loading…
Cancel
Save