Skip to content

Commit 6aa769a

Browse files
committed
one single host for tcp connection
1 parent 3618b26 commit 6aa769a

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

agents/matlab/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ logging:
184184
file: logs/matlab_agent.log # The file path where logs will be stored.
185185

186186
tcp:
187-
input_host: localhost # Host for receiving input stream
187+
host: localhost # Host for receiving input stream
188188
input_port: 5679 # Port for receiving input stream
189-
output_host: localhost # Host for output stream
190189
output_port: 5678 # Port for output stream
191190

192191
response_templates:

agents/matlab/matlab_agent/api/simulation.yaml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ simulation:
2121

2222
inputs:
2323
# Input variables to be passed to the simulation.
24-
# If the simulation type is 'streaming' or 'interactive', it is mandatory to specify 'stream_source' to indicate the source of the input stream.
24+
# If the simulation type is 'interactive', it is mandatory to specify 'stream_source' to indicate the source of the input stream.
2525
# stream_source: The source of the input stream, e.g., RabbitMQ, which streams real-time input data to the simulation.
26-
# This is required for interactive or streaming simulations.
26+
# This is required for interactive simulations.
2727
stream_source: # Source of the input stream, typically RabbitMQ for streaming mode.
2828

2929
i1: ..

agents/matlab/matlab_agent/config/config.yaml.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ performance:
3232
log_filename: performance_metrics.csv # Name of the CSV file for performance metrics
3333

3434
tcp:
35-
input_host: localhost
35+
host: localhost
3636
input_port: 5679
37-
output_host: localhost
3837
output_port: 5678
3938

4039
response_templates:

agents/matlab/matlab_agent/src/core/interactive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ def __init__(
131131
self.agent_id = agent_id
132132

133133
self.out_srv = _TcpServer(
134-
tcp_cfg.get("output_host", "localhost"),
134+
tcp_cfg.get("host", "localhost"),
135135
tcp_cfg.get("output_port", 5678),
136136
)
137137
self.in_srv = _TcpServer(
138-
tcp_cfg.get("input_host", "localhost"),
138+
tcp_cfg.get("host", "localhost"),
139139
tcp_cfg.get("input_port", 5679),
140140
)
141141

agents/matlab/matlab_agent/src/utils/config_manager.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ class Config(BaseModel):
5959
performance_log_filename: str = Field(default="performance_metrics.csv")
6060

6161
# TCP configuration
62-
tcp_input_host: str = Field(default="localhost")
62+
tcp_host: str = Field(default="localhost")
6363
tcp_input_port: int = Field(default=5679)
64-
tcp_output_host: str = Field(default="localhost")
6564
tcp_output_port: int = Field(default=5678)
6665

6766
# Response templates
@@ -130,9 +129,8 @@ def to_dict(self) -> Dict[str, Any]:
130129
"log_filename": self.performance_log_filename
131130
},
132131
"tcp": {
133-
"input_host": self.tcp_input_host,
132+
"host": self.tcp_host,
134133
"input_port": self.tcp_input_port,
135-
"output_host": self.tcp_output_host,
136134
"output_port": self.tcp_output_port
137135
},
138136
"response_templates": {
@@ -217,10 +215,8 @@ def from_dict(cls, config_dict: Dict[str, Any]) -> 'Config':
217215

218216
# Extract tcp section if present
219217
if tcp := config_dict.get("tcp", {}):
220-
flat_config["tcp_input_host"] = tcp.get("input_host", "localhost")
218+
flat_config["tcp_host"] = tcp.get("host", "localhost")
221219
flat_config["tcp_input_port"] = tcp.get("input_port", 5679)
222-
flat_config["tcp_output_host"] = tcp.get(
223-
"output_host", "localhost")
224220
flat_config["tcp_output_port"] = tcp.get("output_port", 5678)
225221

226222
# Extract response_templates section if present

0 commit comments

Comments
 (0)