Skip to content
Snippets Groups Projects
Commit 4bf44b72 authored by FrankR's avatar FrankR
Browse files

SensorValueIntegration rejects all mqttMessages while IPos-FW is not yet initialized

parent c4853d64
Branches
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ public class MainApp {
// SimpleSceneIntegration.init();
SimpleSceneIntegration.init(INDUSTRIEROBOTIK_FILE);
// SimpleSceneIntegration.init(SENSORDATENFUSION_FILE);
ipos.project.SensorValueIntegration.api.MqttPositionHandler.setInitialized(true);
// GenericSensorValueProcessor.processTestData(TESTDATA_EMPTY);
// SimpleSceneIntegration.handleMessageFile(TESTDATA_EMPTY);
}
......
......@@ -35,12 +35,21 @@ public class MqttPositionHandler implements Handler {
this.jmsTemplate = jmsTemplate;
}
static boolean iposFrameworkIsInitialized = false;
public static void setInitialized(boolean b) {
iposFrameworkIsInitialized = b;
}
// @Autowired
// private ExternalPubServiceImpl mqttService;
// method that handle new message from the topic
public void handle(MqttMessage message) {
try {
if (! iposFrameworkIsInitialized){
return;
}
SensorEventWrapper protoSensEventWrapper = ProtoJsonMap.fromJson(message.toString(), GenericSensor.SensorEventWrapper.class);
handleSensorEventWrapper(protoSensEventWrapper);
} catch (InvalidProtocolBufferException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment