-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Each segment has its own yakindu message topic, each node of the dist…
…ributed yakindu statecharts subscribes only for those yakindu topics in which it is interested in (controlled sections + turnout + neighbour segment topics), yakindu messages are moved to the common messages package and sending yakindu message is also possible using the communication lib.
- Loading branch information
Showing
33 changed files
with
285 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/mit/inf/modes3/components/safetylogic/componentlevel/sc/bridge/ISafetyLogicBridge.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...me/mit/inf/modes3/components/safetylogic/componentlevel/sc/bridge/SafetyLogicBridge.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...nf/modes3/components/safetylogic/componentlevel/sc/comm/dispatcher/ICanGoToListener.xtend
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...modes3/components/safetylogic/componentlevel/sc/comm/dispatcher/ICannotGoToListener.xtend
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.../modes3/components/safetylogic/componentlevel/sc/comm/dispatcher/IReleaseToListener.xtend
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.../modes3/components/safetylogic/componentlevel/sc/comm/dispatcher/IReserveToListener.xtend
This file was deleted.
Oops, something went wrong.
14 changes: 3 additions & 11 deletions
14
...des3/components/safetylogic/componentlevel/sc/comm/dispatcher/JsonDispatcherFactory.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
package hu.bme.mit.inf.modes3.components.safetylogic.componentlevel.sc.comm.dispatcher | ||
|
||
import hu.bme.mit.inf.modes3.components.safetylogic.componentlevel.sc.comm.messages.YakinduProtocolMessage | ||
import hu.bme.mit.inf.modes3.messaging.communication.factory.MessagingServiceFactory | ||
import hu.bme.mit.inf.modes3.messaging.messages.core.InternalMessageToTopicMapper | ||
import hu.bme.mit.inf.modes3.utils.common.jopt.ArgumentRegistry | ||
import java.util.Set | ||
import org.slf4j.ILoggerFactory | ||
|
||
class JsonDispatcherFactory { | ||
|
||
def static createMQTTStackWithJSON(ArgumentRegistry argumentRegistry, ILoggerFactory factory) { | ||
val topics = InternalMessageToTopicMapper.INSTANCE.getTopics(YakinduProtocolMessage.simpleName) | ||
val dispatcher = new JsonMessageDispatcher(factory) | ||
val communicationStack = MessagingServiceFactory::createStackForTopics(argumentRegistry, factory, topics, dispatcher) | ||
|
||
val logger = factory.getLogger(JsonDispatcherFactory.name) | ||
logger.debug('''Subscribed for Yakindu topics: «topics»''') | ||
|
||
return communicationStack | ||
def static createMQTTStackWithJSON(ArgumentRegistry argumentRegistry, ILoggerFactory factory, Set<String> topics) { | ||
return MessagingServiceFactory::createStackForTopics(argumentRegistry, factory, topics, new JsonMessageDispatcher(factory)) | ||
} | ||
} |
6 changes: 5 additions & 1 deletion
6
...des3/components/safetylogic/componentlevel/sc/comm/dispatcher/JsonMessageDispatcher.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
...nf/modes3/components/safetylogic/componentlevel/sc/comm/messages/YakinduMessageType.xtend
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
.../inf/modes3/components/safetylogic/componentlevel/sc/wrapper/YakinduProtocolAdapter.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...f/modes3/components/safetylogic/componentlevel/sc/wrapper/YakinduProtocolDispatcher.xtend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.