Definition at line 180 of file hermesbutler.py.
◆ __init__()
hermesbutler.HermesCliObj.__init__ |
( |
| self | ) |
|
Definition at line 182 of file hermesbutler.py.
182 def __init__(self):
183 uhal.setLogLevelTo(uhal.LogLevel.WARNING)
184 self._cm = None
185 self.hw = None
186 self.device_id = None
187 self.connection_file_path = 'file://${HERMESMODULES_SHARE}/config/c.xml'
188 self._controller = None
189
◆ cm()
hermesbutler.HermesCliObj.cm |
( |
| self | ) |
|
Definition at line 215 of file hermesbutler.py.
215 def cm(self):
216 if self._cm is None:
217 self._cm = uhal.ConnectionManager(self.connection_file_path)
218
219 return self._cm
220
221
222@click.group(chain=True, context_settings=CONTEXT_SETTINGS)
223@click.option('-c', '--connection-file', default=None, help="IPBus connection file ")
224@click.option('-d', '--device', callback=validate_device, help="IPBus device")
225
226@click.pass_obj
◆ hermes()
hermesbutler.HermesCliObj.hermes |
( |
| self | ) |
|
Definition at line 191 of file hermesbutler.py.
191 def hermes(self):
192 if self._controller is None:
193 hw = self.cm.getDevice(self.device_id)
194
195
196 is_zcu = hw.getNodes('tx.info')
197 is_detector = hw.getNodes('info')
198
199 if is_zcu:
200 print("zcu mode")
201 tx_mux = hw.getNode('tx')
202 elif is_detector:
203 print("detector mode")
204 tx_mux = hw.getNode()
205 else:
206 raise ValueError(f"{self.device_id} is neither a zcu nor a detector board")
207
208 self.hw = hw
209
210 self._controller = HermesModule(tx_mux)
211
212 return self._controller
213
◆ _cm [1/2]
hermesbutler.HermesCliObj._cm = None |
|
protected |
◆ _cm [2/2]
◆ _controller
hermesbutler.HermesCliObj._controller = None |
|
protected |
◆ connection_file_path
str hermesbutler.HermesCliObj.connection_file_path = 'file://${HERMESMODULES_SHARE}/config/c.xml' |
◆ device_id
hermesbutler.HermesCliObj.device_id = None |
◆ hw
hermesbutler.HermesCliObj.hw = None |
The documentation for this class was generated from the following file: