Merge pull request #795 from ruwany/master

Fix for Virtual Fire Alarm stats not displaying in MT mode
revert-dabc3590
Harshan Liyanage 7 years ago committed by GitHub
commit 021aad47da

@ -199,8 +199,11 @@ public class VirtualHardwareManager {
try { try {
sequence = MidiSystem.getSequence(audioSrc); sequence = MidiSystem.getSequence(audioSrc);
sequencer = MidiSystem.getSequencer(); sequencer = MidiSystem.getSequencer();
sequencer.open(); if(sequencer != null) {
sequencer.setSequence(sequence); sequencer.open();
sequencer.setSequence(sequence);
sequencer.setLoopCount(Clip.LOOP_CONTINUOUSLY);
}
} catch (InvalidMidiDataException e) { } catch (InvalidMidiDataException e) {
log.error("AudioReader: Error whilst setting MIDI Audio reader sequence"); log.error("AudioReader: Error whilst setting MIDI Audio reader sequence");
} catch (IOException e) { } catch (IOException e) {
@ -208,8 +211,6 @@ public class VirtualHardwareManager {
} catch (MidiUnavailableException e) { } catch (MidiUnavailableException e) {
log.error("AudioReader: Error whilst openning MIDI Audio reader sequencer"); 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> <property name="topic">${tenant-domain}/virtual_firealarm/+/temperature</property>
</from> </from>
<mapping customMapping="disable" type="json"/> <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> </eventReceiver>

@ -1,5 +1,5 @@
{ {
"name": "org.wso2.iot.virtualfirealarm", "name": "iot.per.device.stream.virtualfirealarm",
"version": "1.0.0", "version": "1.0.0",
"nickName": "virtual_firealarm", "nickName": "virtual_firealarm",
"description": "Temperature data received from the virtual_firealarm", "description": "Temperature data received from the virtual_firealarm",

@ -338,13 +338,13 @@
<Description>Unlock the device</Description> <Description>Unlock the device</Description>
</Feature> </Feature>
</Features> </Features>
<TaskConfiguration> //Name needs to be decided <!--DeviceMonitoring--> <TaskConfiguration>
<Enable>true</Enable> <Enable>true</Enable>
<Frequency>60000</Frequency> //Name needs to be decided <!--Period--> <Frequency>60000</Frequency>
<Operations> <Operations>
<Operation> <Operation>
<Name>DEVICE_INFO</Name> <Name>DEVICE_INFO</Name>
<RecurrentTimes>1</RecurrentTimes> //Name needs to be decided <!--PeriodFactor--> <RecurrentTimes>1</RecurrentTimes>
</Operation> </Operation>
<Operation> <Operation>
<Name>APPLICATION_LIST</Name> <Name>APPLICATION_LIST</Name>

Loading…
Cancel
Save