Configurability
The ESB is a highly flexible and easy to customize product. Its entire logic is contained into a configuration file (an example is provided below).
The configuration file controls the actual parameters of the external connectors of the ESB Logic. It includes information such as:
Client IP addresses
Server IP address
Certificates and private key files for SSL
How to perform CPU load balancing
How to perform routing of messages
ESB configuration file
1simulator_mode: True # default : False
2
3ats:
4 namespaces:
5 - soap=http://schemas.xmlsoap.org/soap/envelope/
6 - xsi=http://www.w3.org/2001/XMLSchema-instance
7 - xsd=http://www.w3.org/2001/XMLSchema
8 - =http://tempuri.org/wsdl/data/xsd
9 block_lookup:
10 path: block_lookup.csv
11
12
13pids:
14 timeout: 30 # in seconds
15 urls:
16 predictions:
17 - http://127.0.0.1:8085/api/ats_1 # IP of http sink in simulator
18 - http://127.0.0.1:8086/api/ats_2
19 train_locations:
20 - http://127.0.0.1:8085/api/ats_1 # IP of http sink in simulator
21 - http://127.0.0.1:8086/api/ats_2
22
23 events
24 - http://127.0.0.1:8085/api/ats_1 # IP of http sink in simulator
25 - http://127.0.0.1:8086/api/ats_2
26
27 psim_to_pids:
28 - http://127.0.0.1:8085/api/ats_1 # IP of http sink in simulator
29 - http://127.0.0.1:8086/api/ats_2
30 keep_alive:
31 - http://127.0.0.1:8085/api/ats_1 # IP of http sink in simulator
32 - http://127.0.0.1:8086/api/ats_2
33
34elk:
35 timeout: 30
36 urls:
37 - http://127.0.0.1:9200
38 - http://127.0.0.1:9200
39 username: N/A
40 password: N/A
41
42pas:
43
44# simulator,
45# 11 first stations mapped to port 5020, 5021
46# 11 next stations mapped to port 5030, 5031
47 default_zone: 2
48 urls:
49 PF_R01:
50 - 127.0.0.1:5020
51 - 127.0.0.1:5021
52 PF_R02:
53 - 127.0.0.1:5020
54 - 127.0.0.1:5021
55 PF_R03:
56 - 127.0.0.1:5020
57 - 127.0.0.1:5021
58 PF_R04:
59 - 127.0.0.1:5020
60 - 127.0.0.1:5021
61 PF_R05:
62 - 127.0.0.1:5020
63 - 127.0.0.1:5021
64 PF_R06:
65 - 127.0.0.1:5020
66 - 127.0.0.1:5021
67 PF_R07:
68 - 127.0.0.1:5020
69 - 127.0.0.1:5021
70 PF_R08:
71 - 127.0.0.1:5020
72 - 127.0.0.1:5021
73 PF_R09:
74 - 127.0.0.1:5020
75 - 127.0.0.1:5021
76 PF_R10:
77 - 127.0.0.1:5020
78 - 127.0.0.1:5021
79 PF_R11:
80 - 127.0.0.1:5020
81 - 127.0.0.1:5021
82
83 PF_R12:
84 - 127.0.0.1:5030
85 - 127.0.0.1:5031
86 PF_R13:
87 - 127.0.0.1:5030
88 - 127.0.0.1:5031
89 PF_R14:
90 - 127.0.0.1:5030
91 - 127.0.0.1:5031
92 PF_R15:
93 - 127.0.0.1:5030
94 - 127.0.0.1:5031
95 PF_R16:
96 - 127.0.0.1:5030
97 - 127.0.0.1:5031
98 PF_R17:
99 - 127.0.0.1:5030
100 - 127.0.0.1:5031
101 PF_R18:
102 - 127.0.0.1:5030
103 - 127.0.0.1:5031
104 PF_R19:
105 - 127.0.0.1:5030
106 - 127.0.0.1:5031
107 PF_R20:
108 - 127.0.0.1:5030
109 - 127.0.0.1:5031
110 PF_R21:
111 - 127.0.0.1:5030
112 - 127.0.0.1:5031
113 PF_R22:
114 - 127.0.0.1:5030
115 - 127.0.0.1:5031
116 -
117 # convert ats events to pas messages
118 messages:
119
120 Approach_stop: 1,8
121 Approach_nostop: 2
122
123 Arrival_stop: 3
124 Arrival_nostop: 4
125
126 PreDeparture_stop : 5
127 PreDeparture_nostop : 6
128
129 Departure_stop : 7
130 Departure_nostop : 8
131
132 EndOfService_stop : 9
133 EndOfService_nostop : 10
134
135local_modbus_server:
136 host: '127.0.0.1'
137 port: 15020
138
139
140local_mqtt_broker:
141 host: 127.0.0.1
142 port: 1883
143 username: null
144 password: null
145 topics:
146 ats_events: ats/events
147 ats_predictions: ats/predictions
148 ats_train_locations: ats/train_locations
149 erm_wwrs: erm/wwrs
150 erm_dmrs: erm/dmrs
151
152local_udp_server:
153 lb_host: 0.0.0.0
154 lb_port_wwrs: 30000
155 lb_port_dmrs: 30001
156 workers_wwrs_port_start: 31000
157 workers_dmrs_port_start: 32000
158 workers: 1 # return to 6, 1 is so debugger can attach for sure to the relevant one
159 table_b_path: table_b.xlsx
160 wwrs_ticker: 5 # if in this interval of seconds no wwrs message arrives - wwrs is considered non active
161 dmrs_ticker_factor: 10 # if in dmrs_ticker_factor*wwrs_ticker no dmrs message arrives - dmrs is considered non active
162 wwrs_header_len: 40 # wwrs data - header length, lrv_id field offset (bytes / bits)
163 lrv_id_field_offset_bytes_wwrs: 1346 # 1344 for simulator, 1346 in real life ERM
164 lrv_id_field_offset_bytes_dmrs: 49
165 lrv_id_field_size_in_bytes: 1 # 2 for simulator, 1 in real life ERM
166 train_id_field_offset_bytes_wwrs: 451
167 train_id_field_offset_bytes_dmrs: 50
168 dmrs_header_len: 11
169 dmrs_header_lrv_id_field_offset_bytes: 5 # not used
170 message_in_elk_from_last_x_minutes: 10 # in state initializition, we first check lasy elk message for LRV_ID and see last state. if no messages in last X minutes, set it to OFF
171 h_wwrs_on2off : 1 # hystiresys
172 h_wwrs_off2on : 2
173 h_dmrs_on2off : 1
174 h_dmrs_off2on : 2
175 use_optimization: True
176 table_b_init_strategy: default_off # can be from_elk OR default_off
177
178local_http_server:
179 host: 0.0.0.0 # for bind
180 port: 8010
181 local_modbus_host: 127.0.0.1 # for http server -> modbus server
182 local_http_host: 127.0.0.1 # for psl -> http server (health status)
183 workers: 1
184
185acsu:
186 topics:
187 - "@export/@data/status/#"
188 - "@export/@data/events/#"
189 - "ats/predictions" # for testing
190 urls:
191 - http://127.0.0.1:1883
192 - http://127.0.0.1:1883
193 - http://127.0.0.1:1883
194 - http://127.0.0.1:1883
195 workers: 2
196 username: null # assume all ACSUs have same username/password
197 password: null
198
199
200# simulator mqtt 1884, ps mqtt 1883
201
202alerter:
203 host: 127.0.0.1
204 port: 8035
205 ticker : 5 # seconds for basic ticker
206 alerts:
207 ats_keep_alive:
208 ticker_cycle_factor: 1 # number of basic ticker cycles to produce the actual timer for this alert
209 num_msgs_to_arm: 0 # if in actual timer (5*1 seconds) less or equal to this number arrived - send alert
210 num_msgs_to_unarm: 3 # if during actual timer (5*1 seconds) , more or equal to this number arrived - remove alert
211 display_name: ATS KeepAlive
212 ats_predictions:
213 ticker_cycle_factor: 8
214 num_msgs_to_arm: 0 # within 40 seconds 0 aarived
215 num_msgs_to_unarm: 2 # within 40 seconds 2 arrived - set back to OK
216 display_name: ATS Predictions
217 ats_train_locations:
218 ticker_cycle_factor: 1
219 num_msgs_to_arm: 0
220 num_msgs_to_unarm: 3
221 display_name: ATS Train Locations
222 erm_wwrs:
223 ticker_cycle_factor: 1
224 num_msgs_to_arm: 0
225 num_msgs_to_unarm: 3
226 display_name: ERM WWRS
227
228syslog:
229 host: 1.2.3.4
230 port: 514
231
232
233fscada:
234 hosts:
235 - 12.13.14.15
236
237tvs:
238 hosts:
239 - 12.13.14.15
240
241mmis:
242 host: http://127.0.0.1
243 port: 8085
244 endpoint: api/erm_to_mmis
245 timeout: 5
246 namespaces:
247 - soap="http://schemas.xmlsoap.org/soap/envelope/"
248 - xsi="http://www.w3.org/2001/XMLSchema-instance"
249 - xsd="http://www.w3.org/2001/XMLSchema"
250 - mpfu="http://schemas.datastream.net/MP_functions"
251 - secext="http://schemas.xmlsoap.org/ws/2002/04/secext"
252 - mp3530="http://schemas.datastream.net/MP_functions/MP3530_001"
253 - cr001="http://schemas.datastream.net/MP_entities/ContactRecord_001"
254 - mpfi="http://schemas.datastream.net/MP_fields"
255 - oagf="http://www.openapplications.org/oagis_fields"
256
257 topic: mmis/fault_from_erm
258 username: PS
259 password: 123456
260
261psim:
262 username: admin
263 password: admin
264 host: http://127.0.0.1
265 port: 8085
266 endpoint: api/erm_to_psim
267 get_token_endpoint: api/erm_to_psim_get_token
268 safty_margin: 0.5
269 topic: ims/fault_from_erm
270 client_id: WebApiConsumer
271 client_secret: 123123123
272
273
274logger:
275 main_logs_folder:
276 - 'c:\\'
277 - 'ProgramData'
278 - 'publish_server'
279 - 'logs'
280 psl_logs_folder_name: psl
281 simulator_logs_folder_name: simulator