refactored android sense execution plan

revert-dabc3590
lasantha 8 years ago
parent 9585d31663
commit 1518ef2d54

@ -3,57 +3,57 @@
@Plan:description('ExecutionPlan') @Plan:description('ExecutionPlan')
@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, 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); define stream AndroidSense (meta_owner string, meta_deviceId string, meta_type string, meta_timestamp long, battery int, battery_state string, battery_status int, 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') @Export('iot.per.device.stream.android.data:1.0.0')
define stream DataStream (meta_owner string, meta_deviceId string, meta_timestamp long, type string, received long, sent long); 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') @Export('iot.per.device.stream.android.activity:1.0.0')
define stream ActivityStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string); define stream ActivityStream (meta_owner string, meta_deviceId string, meta_timestamp long, action string);
@Export('org.wso2.iot.android.call:1.0.0') @Export('iot.per.device.stream.android.call:1.0.0')
define stream CallStream (meta_owner string, meta_deviceId string, meta_timestamp long, number string, type string, startTime long, endTime long); define stream CallStream (meta_owner string, meta_deviceId string, meta_timestamp long, number string, type string, startTime long, endTime long);
@Export('org.wso2.iot.android.screen:1.0.0') @Export('iot.per.device.stream.android.screen:1.0.0')
define stream ScreenStream (meta_owner string, meta_deviceId string, meta_timestamp long, state string); define stream ScreenStream (meta_owner string, meta_deviceId string, meta_timestamp long, state string);
@Export('org.wso2.iot.android.location:1.0.0') @Export('iot.per.device.stream.android.location:1.0.0')
define stream LocationStream (meta_owner string, meta_deviceId string, meta_timestamp long, latitude double, longitude double); define stream LocationStream (meta_owner string, meta_deviceId string, meta_timestamp long, latitude double, longitude double);
@Export('org.wso2.iot.android.audio:1.0.0') @Export('iot.per.device.stream.android.audio:1.0.0')
define stream AudioStream (meta_owner string, meta_deviceId string, meta_timestamp long, audio_playing bool, headset_on bool, music_volume int); define stream AudioStream (meta_owner string, meta_deviceId string, meta_timestamp long, audio_playing bool, headset_on bool, music_volume int);
@Export('org.wso2.iot.android.battery:1.0.0') @Export('iot.per.device.stream.android.battery:1.0.0')
define stream BatteryStream (meta_owner string, meta_deviceId string, meta_timestamp long, level int, state string, status string, temperature int); define stream BatteryStream (meta_owner string, meta_deviceId string, meta_timestamp long, level int, state string, status int, temperature int);
@Export('org.wso2.iot.android.sms:1.0.0') @Export('iot.per.device.stream.android.sms:1.0.0')
define stream SmsStream (meta_owner string, meta_deviceId string, meta_timestamp long, number string, type string, body string); define stream SmsStream (meta_owner string, meta_deviceId string, meta_timestamp long, number string, type string, body string);
@Export('org.wso2.geo.LocationStream:1.0.0') @Export('org.wso2.geo.LocationStream:1.0.0')
define stream geoLocationStream (id string, timeStamp long, latitude double, longitude double, type string, speed float, heading float); define stream geoLocationStream (id string, timeStamp long, latitude double, longitude double, type string, speed float, heading float);
@Export('org.wso2.iot.android.accelerometer:1.0.0') @Export('iot.per.device.stream.android.accelerometer:1.0.0')
define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float); define stream AccelerometerStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.gyroscope:1.0.0') @Export('iot.per.device.stream.android.gyroscope:1.0.0')
define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float); define stream GyroscopeStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.magnetic:1.0.0') @Export('iot.per.device.stream.android.magnetic:1.0.0')
define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float); define stream MagneticStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.gravity:1.0.0') @Export('iot.per.device.stream.android.gravity:1.0.0')
define stream GravityStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float); define stream GravityStream (meta_owner string, meta_deviceId string, meta_timestamp long, x float, y float, z float);
@Export('org.wso2.iot.android.rotation:1.0.0') @Export('iot.per.device.stream.android.rotation:1.0.0')
define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float); define stream RotationStream (meta_owner string, meta_deviceId string, meta_timestamp long, axis string, value float);
@Export('org.wso2.iot.android.pressure:1.0.0') @Export('iot.per.device.stream.android.pressure:1.0.0')
define stream PressureStream (meta_owner string, meta_deviceId string, meta_timestamp long, pressure float); define stream PressureStream (meta_owner string, meta_deviceId string, meta_timestamp long, pressure float);
@Export('org.wso2.iot.android.light:1.0.0') @Export('iot.per.device.stream.android.light:1.0.0')
define stream LightStream (meta_owner string, meta_deviceId string, meta_timestamp long, light float); define stream LightStream (meta_owner string, meta_deviceId string, meta_timestamp long, light float);
@Export('org.wso2.iot.android.proximity:1.0.0') @Export('iot.per.device.stream.android.proximity:1.0.0')
define stream ProximityStream (meta_owner string, meta_deviceId string, meta_timestamp long, proximity float); define stream ProximityStream (meta_owner string, meta_deviceId string, meta_timestamp long, proximity float);
from AndroidSense[meta_type == 'accelerometer'] from AndroidSense[meta_type == 'accelerometer']
@ -154,4 +154,4 @@ insert into DataStream;
from AndroidSense[meta_type == 'gps'] 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 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;
Loading…
Cancel
Save