serialtools.bus module
- class serialtools.bus.BusCreator
Bases:
object
- add_arguments(parser: ArgumentParser, *, rx_only: bool = False) None
- auto_create_virtual_bus
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- baudrate
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- bytesize
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- create_args(*, port: str | None = None, baudrate: int | None = None, virtual: bool | None = None, rx_only: bool = False) Namespace
- create_bus(args: Namespace) Serial | ReadFromFileBus | WriteToFileBus
- dsrdtr
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- parity
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- port
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- rtscts
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- stopbits
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- virtual
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- vport
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- vport_other
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- xonxoff
Each instance of this class represents a setting which can be changed in a config file.
This class implements the descriptor protocol to return
value
if an instance of this class is accessed as an instance attribute. If you want to get this object you need to access it as a class attribute.
- class serialtools.bus.ReadFromFileBus(fn: str | TextIO)
Bases:
object
- Parameters:
fn¶ – file name of file containing data to be read. Data is in the output format of serialtools dump, hex values separated by spaces and optionally lines starting with a time stamps in parentheses.
- class serialtools.bus.ReadFromParameterBus(content: str)
Bases:
ReadFromFileBus
- Parameters:
fn¶ – file name of file containing data to be read. Data is in the output format of serialtools dump, hex values separated by spaces and optionally lines starting with a time stamps in parentheses.
- serialtools.bus.bus_creator = <serialtools.bus.BusCreator object>
Use this to create a new bus
- serialtools.bus.get_timestamp(bus: Serial | ReadFromFileBus | WriteToFileBus) datetime | None