Definition at line 167 of file hermesbutler.py.
◆ __init__()
hermesbutler.HermesCliObj.__init__ |
( |
| self | ) |
|
Definition at line 169 of file hermesbutler.py.
169 def __init__(self):
170 uhal.setLogLevelTo(uhal.LogLevel.WARNING)
171 self._cm = None
172 self.hw = None
173 self.device_id = None
174 self.connection_file_path = 'file://${HERMESMODULES_SHARE}/config/c.xml'
175 self._controller = None
176
◆ cm()
hermesbutler.HermesCliObj.cm |
( |
| self | ) |
|
Definition at line 202 of file hermesbutler.py.
202 def cm(self):
203 if self._cm is None:
204 self._cm = uhal.ConnectionManager(self.connection_file_path)
205
206 return self._cm
207
208
209@click.group(chain=True, context_settings=CONTEXT_SETTINGS)
210@click.option('-c', '--connection-file', default=None, help="IPBus connection file ")
211@click.option('-d', '--device', callback=validate_device, help="IPBus device")
212
213@click.pass_obj
◆ hermes()
hermesbutler.HermesCliObj.hermes |
( |
| self | ) |
|
Definition at line 178 of file hermesbutler.py.
178 def hermes(self):
179 if self._controller is None:
180 hw = self.cm.getDevice(self.device_id)
181
182
183 is_zcu = hw.getNodes('tx.info')
184 is_wib = hw.getNodes('info')
185
186 if is_zcu:
187 print("zcu mode")
188 tx_mux = hw.getNode('tx')
189 elif is_wib:
190 print("wib mode")
191 tx_mux = hw.getNode()
192 else:
193 raise ValueError(f"{self.device_id} is neither a zcu nor a wib")
194
195 self.hw = hw
196
197 self._controller = HermesModule(tx_mux)
198
199 return self._controller
200
◆ _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: