-
Notifications
You must be signed in to change notification settings - Fork 8
Developer’s Guide
To set up the development environment on your machine, follow the Getting Started page.
The following guide aims to summarize the steps you should follow in order to create your own software component in the MoDeS3 project.
Should you integrate a new software component with gradle, use one of the projects in the src/java folder as a starting point.
If you need a project, that should be deployed and run as a standalone jar, look at the projects in the src/java/components folder. If you need a project and a standalone jar should be generate from that, which assembles all its dependencies, then have a look at the src/java/messaging folder, especially src/java/messaging/communication.
The respective projects build.gradle
, settings.gradle
files contain every necessary information to integrate a project into a Multi-Project build with gradle. The root project’s build.gradle and settings.gradle files are in the src/java folder.
There is a sample component in the sample project.
In order to be able to communicate with other components, your component should extend the abstract supertype AbstractRailRoadCommunicationComponent
. This allows you to use the high-level API described below in the next section.
There is an Abstract class which you can extend in package hu.bme.mit.inf.modes3.components.common
called AbstractRailRoadCommunicationComponent
.
Your component extending this can access the inherited locator
member which can be used to communicate with the railroad system.
The several relevant members of the locator
are summarized described in the next section.
See Network messages and On the communication component of the API wiki pages for details.
Function | Message Senders | Message Receivers | Related enums |
---|---|---|---|
Segment occupation |
|
|
|
Turnout state |
|
|
|
Enabling segments |
|
|
|
Switching turnouts |
|
|
|
Emergency stop |
|
|
none |
Train Speed |
C++ |
|
none |
Train Direction |
C++ |
|
|
Node | SBC type | DNS name | IP address | MAC address | Links |
---|---|---|---|---|---|
root node |
Raspberry Pi |
root.modes3.intra |
192.168.1.2/24 |
b8:27:eb:22:5a:bc |
|
Manager node |
Raspberry Pi |
manage.modes3.intra |
192.168.1.4/24 |
b8:27:eb:f7:0e:f7 |
|
Safety controller, T1 turnout |
BeagleBone Black |
t1.modes3.intra |
192.168.1.101/24 |
04:a3:16:b3:95:00 |
|
Safety controller, T2 turnout |
BeagleBone Black |
t2.modes3.intra |
192.168.1.102/24 |
04:a3:16:b3:be:6b |
|
Safety controller, T3 turnout |
BeagleBone Black |
t3.modes3.intra |
192.168.1.103/24 |
54:4a:16:ee:92:b9 |
|
Safety controller, T4 turnout |
BeagleBone Black |
t4.modes3.intra |
192.168.1.104/24 |
54:4a:16:bb:d1:db |
|
Safety controller, T5 turnout |
BeagleBone Black |
t5.modes3.intra |
192.168.1.105/24 |
54:4a:16:c5:fe:0d |
|
Safety controller, T6 turnout |
BeagleBone Black |
t6.modes3.intra |
192.168.1.106/24 |
54:4a:16:f9:2f:73 |


node | Connected to switch | Port number on switch | Cable marker |
---|---|---|---|
root node |
#1 |
2 |
Light gray |
Manager node |
#2 |
6 |
Black (with light gray cable) |
Safety controller, T1 turnout |
#1 |
7 |
green |
Safety controller, T2 turnout |
#2 |
2 |
Black |
Safety controller, T3 turnout |
#2 |
1 |
yellow |
Safety controller, T4 turnout |
#1 |
5 |
Blue |
Safety controller, T5 turnout |
#1 |
6 |
Red |
Safety controller, T6 turnout |
#2 |
7 |
Red |
Switch #2 |
#1 |
8 |
Light gray with dark gray cable |
Switch #1 |
#2 |
8 |
Light gray with dark gray cable |

