hvl_ccb.dev.highland_t560.base
digraph inheritanceb9015fae15 { 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"]; "AutoInstallMode" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.AutoInstallMode",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="Modes for installing configuration settings to the device."]; "ValueEnum" -> "AutoInstallMode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "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)"]; "Enum" [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="An enumeration."]; "GateMode" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.GateMode",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="Available T560 gate modes"]; "ValueEnum" -> "GateMode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Polarity" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.Polarity",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="Possible channel polarity states"]; "ValueEnum" -> "Polarity" [arrowsize=0.5,style="setlinewidth(0.5)"]; "StrEnumBase" [URL="../hvl_ccb.utils.enum.html#hvl_ccb.utils.enum.StrEnumBase",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="String representation-based equality and lookup."]; "Enum" -> "StrEnumBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SyncCommunicationProtocol" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.SyncCommunicationProtocol",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 synchronous communication protocols with `query()`"]; "AsyncCommunicationProtocol" -> "SyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "SyncCommunicationProtocol" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SyncCommunicationProtocolConfig" [URL="../hvl_ccb.comm.base.html#hvl_ccb.comm.base.SyncCommunicationProtocolConfig",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 synchronous communication protocols"]; "AsyncCommunicationProtocolConfig" -> "SyncCommunicationProtocolConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "T560Communication" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.T560Communication",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 class for T560. It uses a TelnetCommunication with the"]; "SyncCommunicationProtocol" -> "T560Communication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunication" -> "T560Communication" [arrowsize=0.5,style="setlinewidth(0.5)"]; "T560CommunicationConfig" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.T560CommunicationConfig",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="T560CommunicationConfig(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: Union[str, ipaddress.IPv4Address, ipaddress.IPv6Address, NoneType] = None, port: int = 2000, timeout: Union[int, float] = 0.2)"]; "SyncCommunicationProtocolConfig" -> "T560CommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TelnetCommunicationConfig" -> "T560CommunicationConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "T560Error" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.T560Error",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="T560 related errors."]; "DeviceError" -> "T560Error" [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)"]; "TriggerMode" [URL="../hvl_ccb.dev.highland_t560.base.html#hvl_ccb.dev.highland_t560.base.TriggerMode",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="Available T560 trigger modes"]; "ValueEnum" -> "TriggerMode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ValueEnum" [URL="../hvl_ccb.utils.enum.html#hvl_ccb.utils.enum.ValueEnum",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="Enum with string representation of values used as string representation, and with"]; "StrEnumBase" -> "ValueEnum" [arrowsize=0.5,style="setlinewidth(0.5)"]; }Module containing base device and communication classes and enums.
Communication with device is performed via its ethernet port and a Telnet connection.
- class AutoInstallMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
ValueEnum
Modes for installing configuration settings to the device.
- INSTALL = 1
- OFF = 0
- QUEUE = 2
- class GateMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
ValueEnum
Available T560 gate modes
- INPUT = 'INP'
- OFF = 'OFF'
- OUTPUT = 'OUT'
- class Polarity(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
ValueEnum
Possible channel polarity states
- ACTIVE_HIGH = 'POS'
- ACTIVE_LOW = 'NEG'
- class T560Communication(configuration)[source]
Bases:
SyncCommunicationProtocol
,TelnetCommunication
Communication class for T560. It uses a TelnetCommunication with the SyncCommunicationProtocol
- static config_cls()[source]
Return the default configdataclass class.
- Returns:
a reference to the default configdataclass class
- query(command: str, n_attempts_max: int | None = None, attempt_interval_sec: int | float | None = None) str [source]
Send a command to the device and handle the response.
For device setting queries, response will be ‘OK’ if successful, or ‘??’ if setting cannot be carried out, raising an error.
- Parameters:
command – Command string to be sent
n_attempts_max – Amount of attempts how often a non-empty text is tried to be read as answer
attempt_interval_sec – time between the reading attempts
- Raises:
T560Error – if no response is received, or if the device responds with an error message.
- Returns:
Response from the device.
- class T560CommunicationConfig(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 | ipaddress.IPv4Address | ipaddress.IPv6Address | NoneType = None, port: int = 2000, timeout: int | float = 0.2)[source]
Bases:
SyncCommunicationProtocolConfig
,TelnetCommunicationConfig
- 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 = 2000
Port at which the host 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.
- terminator: bytes = b'\r'
The terminator character. Typically this is
b'\r\n'
orb'\n'
, but can also beb'\r'
or other combinations. This defines the end of a single line.
- exception T560Error[source]
Bases:
DeviceError
T560 related errors.