mirror of
https://github.com/naruxde/revpimodio2.git
synced 2025-11-08 22:03:53 +01:00
feat: Remove deprecated parameter 'direct_output' from ModIO classes
The RevPiModIO parameter 'direct_output' was replaced by 'shared_procimg' in the commitc11b435from 2020-08-08. Users have received a DepricatedWarning since then. With the upcoming version, this parameter will be completely deleted. Refs:c11b435Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
@@ -112,7 +112,6 @@ class RevPiModIO(object):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert die Grundfunktionen.
|
Instantiiert die Grundfunktionen.
|
||||||
@@ -127,7 +126,6 @@ class RevPiModIO(object):
|
|||||||
:param replace_io_file: Replace IO Konfiguration aus Datei laden
|
:param replace_io_file: Replace IO Konfiguration aus Datei laden
|
||||||
:param shared_procimg: Share process image with other processes, this
|
:param shared_procimg: Share process image with other processes, this
|
||||||
could be insecure for automation
|
could be insecure for automation
|
||||||
:param direct_output: Deprecated, use shared_procimg
|
|
||||||
"""
|
"""
|
||||||
# Parameterprüfung
|
# Parameterprüfung
|
||||||
acheck(
|
acheck(
|
||||||
@@ -138,7 +136,6 @@ class RevPiModIO(object):
|
|||||||
simulator=simulator,
|
simulator=simulator,
|
||||||
debug=debug,
|
debug=debug,
|
||||||
shared_procimg=shared_procimg,
|
shared_procimg=shared_procimg,
|
||||||
direct_output=direct_output,
|
|
||||||
)
|
)
|
||||||
acheck(
|
acheck(
|
||||||
str,
|
str,
|
||||||
@@ -147,19 +144,13 @@ class RevPiModIO(object):
|
|||||||
replace_io_file_noneok=replace_io_file,
|
replace_io_file_noneok=replace_io_file,
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Remove in next release
|
|
||||||
if direct_output:
|
|
||||||
warnings.warn(
|
|
||||||
DeprecationWarning("direct_output is deprecated - use shared_procimg instead!")
|
|
||||||
)
|
|
||||||
|
|
||||||
self._autorefresh = autorefresh
|
self._autorefresh = autorefresh
|
||||||
self._configrsc = configrsc
|
self._configrsc = configrsc
|
||||||
self._monitoring = monitoring
|
self._monitoring = monitoring
|
||||||
self._procimg = "/dev/piControl0" if procimg is None else procimg
|
self._procimg = "/dev/piControl0" if procimg is None else procimg
|
||||||
self._set_device_based_cycle_time = True
|
self._set_device_based_cycle_time = True
|
||||||
self._simulator = simulator
|
self._simulator = simulator
|
||||||
self._init_shared_procimg = shared_procimg or direct_output
|
self._init_shared_procimg = shared_procimg
|
||||||
self._syncoutputs = syncoutputs
|
self._syncoutputs = syncoutputs
|
||||||
|
|
||||||
# TODO: bei simulator und procimg prüfen ob datei existiert / anlegen?
|
# TODO: bei simulator und procimg prüfen ob datei existiert / anlegen?
|
||||||
@@ -1375,7 +1366,6 @@ class RevPiModIOSelected(RevPiModIO):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert nur fuer angegebene Devices die Grundfunktionen.
|
Instantiiert nur fuer angegebene Devices die Grundfunktionen.
|
||||||
@@ -1397,7 +1387,6 @@ class RevPiModIOSelected(RevPiModIO):
|
|||||||
debug,
|
debug,
|
||||||
replace_io_file,
|
replace_io_file,
|
||||||
shared_procimg,
|
shared_procimg,
|
||||||
direct_output,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if type(deviceselection) is not DevSelect:
|
if type(deviceselection) is not DevSelect:
|
||||||
@@ -1453,7 +1442,6 @@ class RevPiModIODriver(RevPiModIOSelected):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert die Grundfunktionen.
|
Instantiiert die Grundfunktionen.
|
||||||
@@ -1479,7 +1467,6 @@ class RevPiModIODriver(RevPiModIOSelected):
|
|||||||
debug,
|
debug,
|
||||||
replace_io_file,
|
replace_io_file,
|
||||||
shared_procimg,
|
shared_procimg,
|
||||||
direct_output,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -714,7 +714,6 @@ class RevPiNetIO(_RevPiModIO):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert die Grundfunktionen.
|
Instantiiert die Grundfunktionen.
|
||||||
@@ -728,7 +727,6 @@ class RevPiNetIO(_RevPiModIO):
|
|||||||
:param replace_io_file: Replace IO Konfiguration aus Datei laden
|
:param replace_io_file: Replace IO Konfiguration aus Datei laden
|
||||||
:param shared_procimg: Share process image with other processes, this
|
:param shared_procimg: Share process image with other processes, this
|
||||||
could be insecure for automation
|
could be insecure for automation
|
||||||
:param direct_output: Deprecated, use shared_procimg
|
|
||||||
"""
|
"""
|
||||||
check_ip = compile(r"^(25[0-5]|(2[0-4]|[01]?\d|)\d)(\.(25[0-5]|(2[0-4]|[01]?\d|)\d)){3}$")
|
check_ip = compile(r"^(25[0-5]|(2[0-4]|[01]?\d|)\d)(\.(25[0-5]|(2[0-4]|[01]?\d|)\d)){3}$")
|
||||||
|
|
||||||
@@ -771,7 +769,6 @@ class RevPiNetIO(_RevPiModIO):
|
|||||||
debug=debug,
|
debug=debug,
|
||||||
replace_io_file=replace_io_file,
|
replace_io_file=replace_io_file,
|
||||||
shared_procimg=shared_procimg,
|
shared_procimg=shared_procimg,
|
||||||
direct_output=direct_output,
|
|
||||||
)
|
)
|
||||||
self._set_device_based_cycle_time = False
|
self._set_device_based_cycle_time = False
|
||||||
|
|
||||||
@@ -949,7 +946,6 @@ class RevPiNetIOSelected(RevPiNetIO):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert nur fuer angegebene Devices die Grundfunktionen.
|
Instantiiert nur fuer angegebene Devices die Grundfunktionen.
|
||||||
@@ -971,7 +967,6 @@ class RevPiNetIOSelected(RevPiNetIO):
|
|||||||
debug,
|
debug,
|
||||||
replace_io_file,
|
replace_io_file,
|
||||||
shared_procimg,
|
shared_procimg,
|
||||||
direct_output,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if type(deviceselection) is not DevSelect:
|
if type(deviceselection) is not DevSelect:
|
||||||
@@ -1026,7 +1021,6 @@ class RevPiNetIODriver(RevPiNetIOSelected):
|
|||||||
debug=True,
|
debug=True,
|
||||||
replace_io_file=None,
|
replace_io_file=None,
|
||||||
shared_procimg=False,
|
shared_procimg=False,
|
||||||
direct_output=False,
|
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Instantiiert die Grundfunktionen.
|
Instantiiert die Grundfunktionen.
|
||||||
@@ -1052,7 +1046,6 @@ class RevPiNetIODriver(RevPiNetIOSelected):
|
|||||||
debug,
|
debug,
|
||||||
replace_io_file,
|
replace_io_file,
|
||||||
shared_procimg,
|
shared_procimg,
|
||||||
direct_output,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user