When Moduware API is ready start listening for received data
document.addEventListener('WebViewApiReady',function(){Moduware.v0.API.Module.addEventListener('DataReceived',function(event){// we don't care about data not related to our moduleif(event.moduleUuid!=Moduware.Arguments.uuid)return;// ... handle specific received data here ...});});
Sensor State Change Reponse
if(event.dataSource=='SensorStateChangeResponse'){// ... work with data variables here ...}
Data Name
Message Type
SensorStateChangeResponse
2701
Response to sensor state change command
Variables
switch(event.variables.result){case'success':// ... handle the state here ...break;case'failure':// ... handle the state here ...break;}
Name
Title
Description
States
result
Result
Result of turn sensor on or off request
success / failure
Emissivity Change Request Response
if(event.dataSource=='EmissivityChangeResponse'){// ... work with data variables here ...}
Data Name
Message Type
EmissivityChangeResponse
2703
Response to change emissivity setting of sensor
Variables
switch(event.variables.result){case'success':// ... handle the state here ...break;case'bad_value':// ... handle the state here ...break;case'eeprom_fault':// ... handle the state here ...break;}
Name
Title
Description
States
result
Result
Result of attempt to set new emissivity value
success / bad_value / eeprom_fault
Sensor Value
if(event.dataSource=='SensorValue'){// ... work with data variables here ...}