From ba0c973aa90a41f180a832687fe34b328deb63d8 Mon Sep 17 00:00:00 2001 From: Megala Date: Mon, 5 Dec 2016 15:32:21 +0530 Subject: [PATCH] Addding execution plan --- .../Android-Sense-ExecutionPlan.siddhiql | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql index 76ed3cde9..05eed9510 100755 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_sense_executionplan/Android-Sense-ExecutionPlan.siddhiql @@ -3,7 +3,10 @@ @Plan:description('ExecutionPlan') @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, battery_state string, battery_status string, battery_temperature 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, beacon_major int, beacon_minor int, beacon_proximity string, beacon_uuid int, call_number string, call_type string, call_start_time long, call_end_time long, screen_state string, audio_playing bool, headset_on bool, music_volume int, activity_type int, confidence int, sms_number string, application_name string, action string); +define stream AndroidSense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, battery_state string, battery_status string, battery_temperature 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, beacon_major int, beacon_minor int, beacon_proximity string, beacon_uuid int, call_number string, call_type string, call_start_time long, call_end_time long, screen_state string, audio_playing bool, headset_on bool, music_volume int, activity_type int, confidence int, sms_number string, application_name string, action string, data_type string, data_sent long, data_received long); + +@Export('org.wso2.iot.android.data:1.0.0') +define stream DataStream (meta_owner string, meta_deviceId string, meta_timestamp long, type string, received long, sent long); @Export('org.wso2.iot.android.activity:1.0.0') define stream ActivityStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string); @@ -57,6 +60,10 @@ from AndroidSense[meta_type == 'activity'] select meta_owner, meta_deviceId, meta_timestamp, action insert into ActivityStream; +from AndroidSense[meta_type == 'data'] +select meta_owner, meta_deviceId, meta_timestamp, data_type as type, data_received as received, data_sent as sent +insert into DataStream; + from AndroidSense[meta_type == 'gps'] select meta_deviceId as id, meta_timestamp as timeStamp, gps_lat as latitude, gps_long as longitude, "android_sense" as type, speed_limit as speed, 0.0f as heading -insert into geoLocationStream; +insert into geoLocationStream; \ No newline at end of file