hvl_ccb.dev.technix.base
Communication and auxiliary classes for Technix
- exception TechnixError[source]
Bases:
DeviceError
Technix related errors.
- exception TechnixFaultError[source]
Bases:
TechnixError
Raised when the fault flag was detected while the interlock is closed
- class TechnixSerialCommunication(configuration)[source]
Bases:
_TechnixCommunication
,SerialCommunication
Serial communication for Technix
- class TechnixSerialCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10, port: Optional[str] = None, baudrate: int = 9600, parity: Union[str, SerialCommunicationParity] = SerialCommunicationParity.NONE, stopbits: Union[int, float, SerialCommunicationStopbits] = SerialCommunicationStopbits.ONE, bytesize: Union[int, SerialCommunicationBytesize] = SerialCommunicationBytesize.EIGHTBITS, timeout: Union[int, float] = 2)[source]
Bases:
_TechnixCommunicationConfig
,SerialCommunicationConfig
Configuration for the serial communication for Technix
- force_value(fieldname, value)
Forces a value to a dataclass field despite the class being frozen.
NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.
- Parameters
fieldname – name of the field
value – value to assign
- classmethod keys() Sequence[str]
Returns a list of all configdataclass fields key-names.
- Returns
a list of strings containing all keys.
- classmethod optional_defaults() Dict[str, object]
Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.
- Returns
a list of strings containing all optional keys.
- classmethod required_keys() Sequence[str]
Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.
- Returns
a list of strings containing all required keys.
- class TechnixTelnetCommunication(configuration)[source]
Bases:
TelnetCommunication
,_TechnixCommunication
Telnet communication for Technix
- class TechnixTelnetCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: Union[int, float] = 0.5, default_n_attempts_read_text_nonempty: int = 10, host: Optional[Union[str, IPv4Address, IPv6Address]] = None, port: int = 4660, timeout: Union[int, float] = 0.2)[source]
Bases:
_TechnixCommunicationConfig
,TelnetCommunicationConfig
Configuration for the telnet communication for Technix
- force_value(fieldname, value)
Forces a value to a dataclass field despite the class being frozen.
NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.
- Parameters
fieldname – name of the field
value – value to assign
- classmethod keys() Sequence[str]
Returns a list of all configdataclass fields key-names.
- Returns
a list of strings containing all keys.
- classmethod optional_defaults() Dict[str, object]
Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.
- Returns
a list of strings containing all optional keys.
- port: int = 4660
Port at which Technix is listening
- classmethod required_keys() Sequence[str]
Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.
- Returns
a list of strings containing all required keys.