Skip to content

Commit 2e34e03

Browse files
committed
[ModelicaSystemCmd] session => omc_process
1 parent 3663552 commit 2e34e03

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ class ModelicaSystemCmd:
127127

128128
def __init__(
129129
self,
130-
session: OMCSessionZMQ,
130+
omc_process: OMCSessionZMQ,
131131
runpath: OMCPath,
132132
modelname: Optional[str] = None,
133133
timeout: Optional[float] = None,
134134
) -> None:
135135
if modelname is None:
136136
raise ModelicaSystemError("Missing model name!")
137137

138-
self._session = session
138+
self._omc_process = omc_process
139139
self._runpath = runpath
140140
self._model_name = modelname
141141
self._timeout = timeout
@@ -281,7 +281,7 @@ def definition(self) -> OMCProcessRunData:
281281
cmd_timeout=self._timeout,
282282
)
283283

284-
omc_run_data_updated = self._session.omc_run_data_update(
284+
omc_run_data_updated = self._omc_process.omc_run_data_update(
285285
omc_run_data=omc_run_data,
286286
)
287287

@@ -572,7 +572,7 @@ def buildModel(self, variableFilter: Optional[str] = None):
572572

573573
# check if the executable exists ...
574574
om_cmd = ModelicaSystemCmd(
575-
session=self._session,
575+
omc_process=self._session,
576576
runpath=self.getWorkDirectory(),
577577
modelname=self._model_name,
578578
timeout=5.0,
@@ -1083,7 +1083,7 @@ def simulate_cmd(
10831083
"""
10841084

10851085
om_cmd = ModelicaSystemCmd(
1086-
session=self._session,
1086+
omc_process=self._session,
10871087
runpath=self.getWorkDirectory(),
10881088
modelname=self._model_name,
10891089
timeout=timeout,
@@ -1789,7 +1789,7 @@ def linearize(
17891789
)
17901790

17911791
om_cmd = ModelicaSystemCmd(
1792-
session=self._session,
1792+
omc_process=self._session,
17931793
runpath=self.getWorkDirectory(),
17941794
modelname=self._model_name,
17951795
timeout=timeout,

tests/test_ModelicaSystemCmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def mscmd_firstorder(model_firstorder):
2424
model_name="M",
2525
)
2626
mscmd = OMPython.ModelicaSystemCmd(
27-
session=mod.session(),
27+
omc_process=mod.session(),
2828
runpath=mod.getWorkDirectory(),
2929
modelname=mod._model_name,
3030
)

0 commit comments

Comments
 (0)