mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Fixing stats display issue for virtual fire-alarm in MT mode
This commit is contained in:
parent
65ee884bb7
commit
0cfa757c0a
@ -199,8 +199,11 @@ public class VirtualHardwareManager {
|
||||
try {
|
||||
sequence = MidiSystem.getSequence(audioSrc);
|
||||
sequencer = MidiSystem.getSequencer();
|
||||
sequencer.open();
|
||||
sequencer.setSequence(sequence);
|
||||
if(sequencer != null) {
|
||||
sequencer.open();
|
||||
sequencer.setSequence(sequence);
|
||||
sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY);
|
||||
}
|
||||
} catch (InvalidMidiDataException e) {
|
||||
log.error("AudioReader: Error whilst setting MIDI Audio reader sequence");
|
||||
} catch (IOException e) {
|
||||
@ -208,8 +211,6 @@ public class VirtualHardwareManager {
|
||||
} catch (MidiUnavailableException e) {
|
||||
log.error("AudioReader: Error whilst openning MIDI Audio reader sequencer");
|
||||
}
|
||||
|
||||
sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -21,5 +21,5 @@
|
||||
<property name="topic">${tenant-domain}/virtual_firealarm/+/temperature</property>
|
||||
</from>
|
||||
<mapping customMapping="disable" type="json"/>
|
||||
<to streamName="org.wso2.iot.virtualfirealarm" version="1.0.0"/>
|
||||
<to streamName="iot.per.device.stream.virtualfirealarm" version="1.0.0"/>
|
||||
</eventReceiver>
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "org.wso2.iot.virtualfirealarm",
|
||||
"version": "1.0.0",
|
||||
"nickName": "virtual_firealarm",
|
||||
"description": "Temperature data received from the virtual_firealarm",
|
||||
"metaData": [
|
||||
{"name":"owner","type":"STRING"},
|
||||
{"name":"deviceId","type":"STRING"},
|
||||
{"name":"time","type":"LONG"}
|
||||
],
|
||||
"payloadData": [
|
||||
{
|
||||
"name": "temperature","type": "FLOAT"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -338,13 +338,13 @@
|
||||
<Description>Unlock the device</Description>
|
||||
</Feature>
|
||||
</Features>
|
||||
<TaskConfiguration> //Name needs to be decided <!--DeviceMonitoring-->
|
||||
<TaskConfiguration>
|
||||
<Enable>true</Enable>
|
||||
<Frequency>60000</Frequency> //Name needs to be decided <!--Period-->
|
||||
<Frequency>60000</Frequency>
|
||||
<Operations>
|
||||
<Operation>
|
||||
<Name>DEVICE_INFO</Name>
|
||||
<RecurrentTimes>1</RecurrentTimes> //Name needs to be decided <!--PeriodFactor-->
|
||||
<RecurrentTimes>1</RecurrentTimes>
|
||||
</Operation>
|
||||
<Operation>
|
||||
<Name>APPLICATION_LIST</Name>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user