Commit e7ee65e2 authored by Markus Mirz's avatar Markus Mirz
Browse files

expose logger in python

parent 78f93324
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <dpsim/Python/SystemTopology.h> #include <dpsim/Python/SystemTopology.h>
#include <dpsim/Python/Simulation.h> #include <dpsim/Python/Simulation.h>
#include <dpsim/Python/LoadCim.h> #include <dpsim/Python/LoadCim.h>
#include <dpsim/Python/Logger.h>
#ifndef _MSC_VER #ifndef _MSC_VER
#include <dpsim/Python/Interface.h> #include <dpsim/Python/Interface.h>
#endif #endif
...@@ -69,6 +70,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) { ...@@ -69,6 +70,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) {
return nullptr; return nullptr;
if (PyType_Ready(&SystemTopology::type) < 0) if (PyType_Ready(&SystemTopology::type) < 0)
return nullptr; return nullptr;
if (PyType_Ready(&Logger::type) < 0)
return nullptr;
#ifndef _MSC_VER #ifndef _MSC_VER
if (PyType_Ready(&Interface::type) < 0) if (PyType_Ready(&Interface::type) < 0)
return nullptr; return nullptr;
...@@ -82,6 +85,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) { ...@@ -82,6 +85,8 @@ PyMODINIT_FUNC PyInit__dpsim(void) {
PyModule_AddObject(m, "Simulation", (PyObject*) &Simulation::type); PyModule_AddObject(m, "Simulation", (PyObject*) &Simulation::type);
Py_INCREF(&SystemTopology::type); Py_INCREF(&SystemTopology::type);
PyModule_AddObject(m, "SystemTopology", (PyObject*) &SystemTopology::type); PyModule_AddObject(m, "SystemTopology", (PyObject*) &SystemTopology::type);
Py_INCREF(&Logger::type);
PyModule_AddObject(m, "Logger", (PyObject*) &Logger::type);
Py_INCREF(&Component::type); Py_INCREF(&Component::type);
PyModule_AddObject(m, "Component", (PyObject*) &Component::type); PyModule_AddObject(m, "Component", (PyObject*) &Component::type);
#ifndef _MSC_VER #ifndef _MSC_VER
......
...@@ -19,6 +19,7 @@ import _dpsim ...@@ -19,6 +19,7 @@ import _dpsim
#from _dpsim import Interface #from _dpsim import Interface
from _dpsim import SystemTopology from _dpsim import SystemTopology
from _dpsim import Logger
from _dpsim import load_cim from _dpsim import load_cim
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment