MCPcopy Index your code
hub / github.com/rawpython/remi / set_value

Method set_value

editor/widgets/toolbox_EPICS.py:248–262  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

246 self.epics_pv_name = epics_pv_name
247
248 def set_value(self, value):
249 if not self.get_app_instance():
250 return
251 with self.get_app_instance().update_lock:
252 self.values.add_coord(time.clock(), float(value))
253 try:
254 plot = pygal.XY()
255 pairs = []
256 for i in range(0, len(self.values.coordsX)):
257 pairs.append([self.values.coordsX[i], self.values.coordsY[i]])
258 plot.add(self.epics_pv_name, pairs)
259 self.add_child("chart", plot.render())
260 except Exception:
261 self.style['overflow'] = "visible"
262 self.add_child("chart", gui.SvgText(10,10, "Install pygal to use this widget"))
263
264
265class EPICSValueGaugeWidget(Svg, EPICSWidget):

Callers

nothing calls this directly

Calls 5

get_app_instanceMethod · 0.80
add_childMethod · 0.80
renderMethod · 0.80
add_coordMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected