Chronos: https://wikipedia.org/wiki/Chronos
See the github wiki
Built with Spring Boot
Built in Kotlin with Gradle.
Using the Paho MQTT client by Eclipse.
Chronos.kt - Main function to start the Spring Boot application
ChronosApplication - The Spring Boot application
See configuration.MqttConfiguration and ChronosApplication
Extra models to make it easier to work with the Eclipse Paho lib.
Using MqttSubscriber:
with(subscriber) { // context remembers subscriber info
client.subscribe { (topic: String, mqttMessage: MqttMessage) ->
// do stuff
}
}
Using MqttPublisher:
with(publisher) { // context remembers publisher info
client.publish("publish anything")
}
Topics are built dynamically for components by the MqttTopicBuilder class
Traffic models such as lights and barriers can be found in the model.traffic package.
Core components (read: base classes and interfaces) can be found in the nested core package.
Everything is based around the ITrafficControl interface