|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Public Member Functions | |
| None | __init__ (self, Optional[Path] user_dir) |
| List[Drawing] | list (self) |
| Optional[Drawing] | get (self, str drawing_id_) |
| Drawing | add (self, Mapping[str, Any] payload, *, str name, str source) |
Public Attributes | |
| tuple | dir = (user_dir / "layerx" / "drawings") if user_dir is not None else None |
Protected Member Functions | |
| List[Drawing] | _shipped (self) |
| List[Drawing] | _feedtwin_library (self) |
| List[Drawing] | _sample (self) |
| List[Drawing] | _own_one (self, Path path) |
| List[Drawing] | _own (self) |
The shipped set plus one user's own drawings. Uploads and pulls live in ``<user dir>/layerx/drawings`` as ``<id>.json`` with a ``<id>.meta.json`` beside them. Shipped drawings are read in place and never copied.
Definition at line 292 of file sources.py.
| None engine.layerx.sources.DrawingStore.__init__ | ( | self, | |
| Optional[Path] | user_dir ) |
Definition at line 300 of file sources.py.
|
protected |
The drawings in the feed twin's library, read in place: Layer X burns the feed system the twin holds (2026-10-03, "pull from it and trust it"), including what the twin pulled from pid-designer, not only the files feed-twin ships.
Definition at line 330 of file sources.py.
References engine.layerx.sources._read(), engine.layerx.sources.drawing_id(), engine.layerx.sources.feedtwin_library_dir(), get(), list(), engine.layerx.sources.sha256(), and engine.layerx.sources.summarize().
|
protected |
Definition at line 425 of file sources.py.
References _own_one(), engine.layerx.measurements.MeasurementStore.dir, dir, and fs::directory_iterator.dir.
|
protected |
Definition at line 404 of file sources.py.
References engine.layerx.sources._read(), engine.layerx.sources.drawing_id(), and engine.layerx.sources.sha256().
|
protected |
The drawings in feed-twin's sample set, read in place: featured. A library that already holds the same bytes lists it under the library's name (``list`` keeps the first met).
Definition at line 370 of file sources.py.
References engine.layerx.sources._read(), engine.layerx.sources.drawing_id(), get(), engine.layerx.sources.sample_dir(), engine.layerx.sources.sha256(), and engine.layerx.sources.summarize().
|
protected |
Definition at line 303 of file sources.py.
References engine.layerx.sources._read(), engine.layerx.sources.drawing_id(), engine.layerx.sources.sha256(), and engine.layerx.sources.shipped_drawings_dir().
| Drawing engine.layerx.sources.DrawingStore.add | ( | self, | |
| Mapping[str, Any] | payload, | ||
| * | , | ||
| str | name, | ||
| str | source ) |
Store a drawing. Same bytes, same id: adding twice is a no-op that updates nothing but the name a person sees.
Definition at line 476 of file sources.py.
References engine.layerx.measurements.MeasurementStore.dir, dir, fs::directory_iterator.dir, engine.layerx.sources.drawing_id(), engine.layerx.sources.normalise(), engine.layerx.sources.sha256(), engine.layerx.sources.summarize(), and time.time().
Referenced by feed_line_K.Run.ball_valve_full_bore(), feed_line_K.Run.contraction(), feed_line_K.Run.entrance(), feed_line_K.Run.expansion(), and feed_line_K.Run.straight().
| Optional[Drawing] engine.layerx.sources.DrawingStore.get | ( | self, | |
| str | drawing_id_ ) |
Definition at line 460 of file sources.py.
References _feedtwin_library(), _own(), _own_one(), _sample(), _shipped(), engine.layerx.measurements.MeasurementStore.dir, dir, and fs::directory_iterator.dir.
Referenced by _feedtwin_library(), and _sample().
| List[Drawing] engine.layerx.sources.DrawingStore.list | ( | self | ) |
Definition at line 435 of file sources.py.
References _feedtwin_library(), _own(), _sample(), and _shipped().
Referenced by _feedtwin_library().
| tuple engine.layerx.sources.DrawingStore.dir = (user_dir / "layerx" / "drawings") if user_dir is not None else None |
Definition at line 301 of file sources.py.