mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Refactored Android audio artifacts
This commit is contained in:
parent
f4aad41a34
commit
4e15337655
@ -4,10 +4,10 @@
|
|||||||
@Plan:description('Find the audio listening through head set')
|
@Plan:description('Find the audio listening through head set')
|
||||||
|
|
||||||
|
|
||||||
@Import('org.wso2.iot.android.audio:1.0.0')
|
@Import('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.headset.stats:1.0.0')
|
@Export('iot.per.device.stream.android.headset.stats:1.0.0')
|
||||||
define stream HeadsetStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, duration long, year int, month int, day int, hour int, minute int);
|
define stream HeadsetStatsStream (meta_owner string, meta_deviceId string, meta_timestamp long, duration long, year int, month int, day int, hour int, minute int);
|
||||||
|
|
||||||
partition with (meta_deviceId of AudioStream)
|
partition with (meta_deviceId of AudioStream)
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
/* define streams/tables and write queries here ... */
|
/* define streams/tables and write queries here ... */
|
||||||
|
|
||||||
@Import('org.wso2.iot.android.audio:1.0.0')
|
@Import('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.filtered.audio:1.0.0')
|
@Export('iot.per.device.stream.android.filtered.audio:1.0.0')
|
||||||
define stream FilteredAudioStream (meta_owner string, meta_deviceId string, meta_timestamp long, audio string, headset string, music_volume int);
|
define stream FilteredAudioStream (meta_owner string, meta_deviceId string, meta_timestamp long, audio string, headset string, music_volume int);
|
||||||
|
|
||||||
from AudioStream select meta_owner, meta_deviceId, meta_timestamp, ifThenElse(audio_playing, 'ON', 'OFF') as audio,
|
from AudioStream select meta_owner, meta_deviceId, meta_timestamp, ifThenElse(audio_playing, 'ON', 'OFF') as audio,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<Analytics>
|
<Analytics>
|
||||||
<Editable>true</Editable>
|
<Editable>true</Editable>
|
||||||
<Name>AndroidAudioScript</Name>
|
<Name>AndroidAudioScript</Name>
|
||||||
<Script> CREATE TEMPORARY TABLE AndroidHeadsetData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_ANDROID_HEADSET_STATS", incrementalParams "ORG_WSO2_IOT_ANDROID_HEADSET_STATS, DAY");
|
<Script> CREATE TEMPORARY TABLE AndroidHeadsetData USING CarbonAnalytics OPTIONS(tableName "IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS", incrementalParams "IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS, DAY");
|
||||||
|
|
||||||
CREATE TEMPORARY TABLE Android_Headset_Stat_Per_Day USING CarbonAnalytics
|
CREATE TEMPORARY TABLE Android_Headset_Stat_Per_Day USING CarbonAnalytics
|
||||||
OPTIONS (tableName "Android_Headset_Stat_Per_Day",
|
OPTIONS (tableName "Android_Headset_Stat_Per_Day",
|
||||||
@ -15,7 +15,7 @@
|
|||||||
FROM AndroidHeadsetData
|
FROM AndroidHeadsetData
|
||||||
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
|
GROUP BY year, month, day, meta_deviceId, meta_owner ORDER BY timestamp DESC;
|
||||||
|
|
||||||
INCREMENTAL_TABLE_COMMIT ORG_WSO2_IOT_ANDROID_HEADSET_STATS;
|
INCREMENTAL_TABLE_COMMIT IOT_PER_DEVICE_STREAM_ANDROID_HEADSET_STATS;
|
||||||
</Script>
|
</Script>
|
||||||
<CronExpression>0 0/5 * * * ?</CronExpression>
|
<CronExpression>0 0/5 * * * ?</CronExpression>
|
||||||
</Analytics>
|
</Analytics>
|
||||||
|
|||||||
@ -18,6 +18,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<artifact name= "android_audio_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
<artifact name= "android_audio_streams" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
|
||||||
<file>org.wso2.iot.android.audio_1.0.0.json</file>
|
<file>iot.per.device.stream.android.audio_1.0.0.json</file>
|
||||||
</artifact>
|
</artifact>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user