hvl_ccb.dev.technix.base

digraph inheritance67e9675dc4 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "AsyncCommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.AsyncCommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for asynchronous communication protocols"]; "CommunicationProtocol" -> "AsyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AsyncCommunicationProtocolConfig" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.AsyncCommunicationProtocolConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base configuration data class for asynchronous communication protocols"]; "CCBError" [URL="../hvl_ccb.error.html#hvl_ccb.error.CCBError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "CommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.CommunicationProtocol",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Communication protocol abstract base class."]; "ConfigurationMixin" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "CommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ConfigurationMixin" [URL="../hvl_ccb.configuration.html#hvl_ccb.configuration.ConfigurationMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin providing configuration to a class."]; "ABC" -> "ConfigurationMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DeviceError" [URL="../hvl_ccb.dev.base.html#hvl_ccb.dev.base.DeviceError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "CCBError" -> "DeviceError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SerialCommunication" [URL="../hvl_ccb.comm.serial.html#hvl_ccb.comm.serial.SerialCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Implements the Communication Protocol for serial ports."]; "AsyncCommunicationProtocol" -> "SerialCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SerialCommunicationConfig" [URL="../hvl_ccb.comm.serial.html#hvl_ccb.comm.serial.SerialCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration dataclass for :class:`SerialCommunication`."]; "AsyncCommunicationProtocolConfig" -> "SerialCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixError" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Technix related errors."]; "DeviceError" -> "TechnixError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixFaultError" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixFaultError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Raised when the fault flag was detected while the interlock is closed"]; "TechnixError" -> "TechnixFaultError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixSerialCommunication" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixSerialCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Serial communication for Technix"]; "SerialCommunication" -> "TechnixSerialCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixSerialCommunicationConfig" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixSerialCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration for the serial communication for Technix"]; "SerialCommunicationConfig" -> "TechnixSerialCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixTelnetCommunication" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixTelnetCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Telnet communication for Technix"]; "TelnetCommunication" -> "TechnixTelnetCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TechnixTelnetCommunicationConfig" [URL="../hvl_ccb.dev.technix.base.html#hvl_ccb.dev.technix.base.TechnixTelnetCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration for the telnet communication for Technix"]; "TelnetCommunicationConfig" -> "TechnixTelnetCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunication" [URL="../hvl_ccb.comm.telnet.html#hvl_ccb.comm.telnet.TelnetCommunication",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Implements the Communication Protocol for telnet."]; "AsyncCommunicationProtocol" -> "TelnetCommunication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunicationConfig" [URL="../hvl_ccb.comm.telnet.html#hvl_ccb.comm.telnet.TelnetCommunicationConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration dataclass for :class:`TelnetCommunication`."]; "AsyncCommunicationProtocolConfig" -> "TelnetCommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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 | SerialCommunicationParity = SerialCommunicationParity.NONE, stopbits: int | float | SerialCommunicationStopbits = SerialCommunicationStopbits.ONE, bytesize: int | SerialCommunicationBytesize = SerialCommunicationBytesize.EIGHTBITS, 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.