default settings on the IO class

allow to define default settings on the IO class:
- a default 'port' may be given for tcp
- defaults like 'baudrate' or 'parity' might be given
  for serial connections

this avoids explicit settings in the config file in case
the settings can not be changed or have a typical value
other than the defaults in serial.Serial

Change-Id: I990f47d63e785f8cc48c4af197944a8eebe91fb4
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30555
Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de>
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2023-03-02 09:24:29 +01:00
parent 0acb80380a
commit c8f30582a5
4 changed files with 33 additions and 22 deletions

View File

@ -102,6 +102,7 @@ Communication
.. autoclass:: frappy.io.IOBase
:show-inheritance:
:members: default_settings
.. autoclass:: frappy.io.StringIO
:show-inheritance: