VirtualDevice
¤
Classes:
| Name | Description |
|---|---|
Driver |
driver template |
Driver(addr: str = '', timeout: float = 3.0, **kw)
¤
Bases: BaseDriver
driver template
Warning
All drivers must inherit from the base class(with fixed class name Driver) and methods open/close/read/write must be implemented!
Methods:
| Name | Description |
|---|---|
open |
open device |
close |
close device |
write |
write to device |
read |
read from device |
Attributes:
| Name | Type | Description |
|---|---|---|
__abstractmethods__ |
frozenset() -> empty frozenset object |
|
__annotations__ |
dict() -> new empty dictionary |
|
__doc__ |
str(object='') -> str |
|
__module__ |
str(object='') -> str |
|
__weakref__ |
list of weak references to the object |
Source code in quark/driver/VirtualDevice.py
136 137 138 139 140 | |
__abstractmethods__ = frozenset({'open', 'read', 'write', 'close'})
class-attribute
¤
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object
Build an immutable unordered collection of unique elements.
__annotations__ = {'segment': 'tuple', 'CHs': 'list[int | str]', 'quants': 'list[Quantity]'}
class-attribute
¤
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
__doc__ = 'Base class for all drivers and methods open/close/read/write are required.\n\n See template **VirtualDevice**\n '
class-attribute
¤
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__module__ = 'quark.driver.common.basedriver'
class-attribute
¤
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
__weakref__
property
¤
list of weak references to the object
open(**kw)
¤
open device
Source code in quark/driver/VirtualDevice.py
142 143 144 145 | |
close(**kw)
¤
close device
Source code in quark/driver/VirtualDevice.py
148 149 150 151 | |
write(name: str, value, **kw)
¤
write to device
Source code in quark/driver/VirtualDevice.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
read(name: str, **kw)
¤
read from device
Source code in quark/driver/VirtualDevice.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |