Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
77800d56
Commit
77800d56
authored
Sep 26, 2018
by
Steffen Vogel
🎅🏼
Browse files
python: fix logging of node voltages (closes
#97
)
Former-commit-id:
4a300535
parent
2a54e810
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/Python/Logger.cpp
View file @
77800d56
...
...
@@ -67,7 +67,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
PyObject
*
pyObj
;
const
char
*
attrName
;
const
char
*
kwlist
[]
=
{
"
component
"
,
"attribute"
,
nullptr
};
const
char
*
kwlist
[]
=
{
"
obj
"
,
"attribute"
,
nullptr
};
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"Os"
,
(
char
**
)
kwlist
,
&
pyObj
,
&
attrName
))
return
nullptr
;
...
...
@@ -94,7 +94,7 @@ PyObject* Python::Logger::logAttribute(Logger* self, PyObject* args, PyObject *k
}
try
{
auto
a
=
attrList
->
attribute
<
CPS
::
Real
>
(
attrName
);
auto
a
=
attrList
->
attribute
(
attrName
);
self
->
logger
->
addAttribute
(
attrName
,
a
);
}
...
...
Source/Python/Simulation.cpp
View file @
77800d56
...
...
@@ -415,7 +415,7 @@ PyObject* Python::Simulation::addLogger(Simulation *self, PyObject *args, PyObje
return
nullptr
;
}
Python
::
Logger
*
pyLogger
=
(
Python
::
Logger
*
)
pyObj
;
Python
::
Logger
*
pyLogger
=
(
Python
::
Logger
*
)
pyObj
;
self
->
sim
->
addLogger
(
pyLogger
->
logger
,
downsampling
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment