hvl_ccb.dev.technix.base

Inheritance diagram of 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

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

class TechnixSerialCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: int | float = 0.5, default_n_attempts_read_text_nonempty: int = 10, port: str | None = None, baudrate: int = 9600, parity: str | ~hvl_ccb.comm.serial.SerialCommunicationParity = <SerialCommunicationParity.NONE: 'N'>, stopbits: int | float | ~hvl_ccb.comm.serial.SerialCommunicationStopbits = <SerialCommunicationStopbits.ONE: 1>, bytesize: int | ~hvl_ccb.comm.serial.SerialCommunicationBytesize = <SerialCommunicationBytesize.EIGHTBITS: 8>, timeout: 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

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

class TechnixTelnetCommunicationConfig(terminator: bytes = b'\r', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: int | float = 0.5, default_n_attempts_read_text_nonempty: int = 10, host: str | IPv4Address | IPv6Address | None = None, port: int = 4660, timeout: 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.