Skip to content

Commit 5750fb7

Browse files
committed
Fix userguide
1 parent f528613 commit 5750fb7

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

USERGUIDE.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -110,89 +110,89 @@ The _sim-bridge_ uses a YAML-based configuration file. Below is a comprehensive
110110
```yaml
111111
# Unique identifier for this simulation bridge instance
112112
simulation_bridge:
113-
bridge_id: simulation_bridge
113+
bridge_id: simulation_bridge # ID used to identify this instance of the sim-bridge
114114

115115
# RabbitMQ protocol adapter configuration
116116
rabbitmq:
117-
host: localhost
118-
port: 5672
119-
vhost: /
120-
username: guest
121-
password: guest
122-
tls: false
117+
host: localhost # RabbitMQ broker hostname or IP address
118+
port: 5672 # Port for non-TLS AMQP connections (default: 5672)
119+
vhost: / # Virtual host used in RabbitMQ
120+
username: guest # Username for RabbitMQ authentication
121+
password: guest # Password for RabbitMQ authentication
122+
tls: false # Whether to use TLS (amqps) or not
123123

124124
infrastructure:
125125
exchanges:
126-
- name: ex.input.bridge
127-
type: topic
128-
durable: true
129-
auto_delete: false
130-
internal: false
126+
- name: ex.input.bridge # Exchange for receiving input messages from external systems
127+
type: topic # Exchange type (topic allows pattern-based routing)
128+
durable: true # Exchange survives broker restarts
129+
auto_delete: false # Exchange won't be deleted when no longer used
130+
internal: false # Exchange is available to external producers
131131

132-
- name: ex.bridge.output
132+
- name: ex.bridge.output # Exchange for sending output messages to external systems
133133
type: topic
134134
durable: true
135135
auto_delete: false
136136
internal: false
137137

138-
- name: ex.sim.result
138+
- name: ex.sim.result # Exchange for simulation result messages
139139
type: topic
140140
durable: true
141141
auto_delete: false
142142
internal: false
143143

144-
- name: ex.bridge.result
144+
- name: ex.bridge.result # Exchange for bridge-processed results
145145
type: topic
146146
durable: true
147147
auto_delete: false
148148
internal: false
149149

150150
queues:
151-
- name: Q.bridge.input
152-
durable: true
153-
exclusive: false
154-
auto_delete: false
151+
- name: Q.bridge.input # Queue for receiving messages intended for the bridge
152+
durable: true # Queue survives broker restarts
153+
exclusive: false # Queue is not exclusive to one connection
154+
auto_delete: false # Queue will not be deleted automatically
155155

156-
- name: Q.bridge.result
156+
- name: Q.bridge.result # Queue for receiving simulation results
157157
durable: true
158158
exclusive: false
159159
auto_delete: false
160160

161161
bindings:
162-
- queue: Q.bridge.input
163-
exchange: ex.input.bridge
164-
routing_key: "#"
162+
- queue: Q.bridge.input # Bind the input queue...
163+
exchange: ex.input.bridge # ...to this exchange...
164+
routing_key: "#" # ...with wildcard routing (all messages)
165165

166-
- queue: Q.bridge.result
167-
exchange: ex.sim.result
168-
routing_key: "#"
166+
- queue: Q.bridge.result # Bind the result queue...
167+
exchange: ex.sim.result # ...to receive all simulation result messages
168+
routing_key: "#" # ...with wildcard routing
169169

170170
# MQTT protocol adapter configuration
171171
mqtt:
172-
host: localhost
173-
port: 1883
174-
keepalive: 60
175-
input_topic: bridge/input
176-
output_topic: bridge/output
177-
qos: 0
178-
username: guest
179-
password: guest
180-
tls: false
172+
host: localhost # MQTT broker hostname or IP
173+
port: 1883 # Port for MQTT (1883 for non-TLS, 8883 for TLS)
174+
keepalive: 60 # Keep-alive interval in seconds for MQTT client
175+
input_topic: bridge/input # Topic to subscribe to for receiving messages
176+
output_topic: bridge/output # Topic to publish processed messages to
177+
qos: 0 # Quality of Service level (0 = at most once)
178+
username: guest # Username for MQTT authentication
179+
password: guest # Password for MQTT authentication
180+
tls: false # Whether to use secure MQTT (mqtts) or not
181181

182182
# REST protocol adapter configuration
183183
rest:
184-
host: 0.0.0.0
185-
port: 5000
186-
endpoint: /message
187-
debug: false
188-
certfile: /certs/cert.pem
189-
keyfile: /certs/key.pem
184+
host: 0.0.0.0 # REST API binds to all network interfaces
185+
port: 5000 # Port for RESTful HTTP server
186+
endpoint: /message # Endpoint path for sending messages to the bridge
187+
debug: false # Disable Flask debug mode (set to true for development)
188+
certfile: certs/cert.pem # Path to the TLS certificate file for HTTPS
189+
keyfile: certs/key.pem # Path to the private key file for HTTPS
190190

191191
# Logging configuration
192192
logging:
193-
level: INFO
194-
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
195-
file: logs/sim_bridge.log
193+
level: INFO # Logging level (e.g., DEBUG, INFO, WARNING, ERROR)
194+
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" # Format of log messages
195+
file: logs/sim_bridge.log # Path to the log output file
196196
```
197197
198198
> **Note:** Certificate files (`certfile.pem` and `keyfile.pem`) will be automatically created by the _sim-bridge_ if missing.
@@ -265,7 +265,7 @@ poetry run simulation-bridge -c /path/to/config.yaml
265265

266266
## Use _sim-bridge_ as a Pip-Installable Package
267267

268-
If you prefer to use `sim-bridge` as a standalone Python package, you can build and install it using the following steps:
268+
If you prefer to use `simulation-bridge` as a standalone Python package, you can build and install it using the following steps:
269269

270270
### Build the Package
271271

0 commit comments

Comments
 (0)