You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Back to simulacrum reference index: https://confluence.slac.stanford.edu/x/hak7Eg

Scope of this guide

This is intended for people who are interested in the nitty-gritty syntax that populates a typical simulacrum service. This combines concepts in many of the articles, so you may come back to this are different points in the readings. Please excuse my handwriting and my shorthand for some words, this was my best attempt at compressing a lot of syntax explanation into a tight space.

The article annotated is the sc_rf_service.py as it currently exists on github. The service was written by Ahmed Osman, and some annotations are devoted to what I would write differently or my personal confusions (what does PREF mean?) Its selection of PVs, its putter functions, and the general structure of its classes are pretty standard. The only non-standard element here is the addition of _make_linac_table function, which manually assigns device names which could otherwise be retrieved automatically from tao's "-attribute alias" command feature. This service is a great starting point for more development and there is plenty of room for more PVs and more complex functionality to be added over time. Most simulacrum services have other infrastructure that makes each service unique, accommodating for the use cases of each device.

This is not meant to be comprehensive. Contact simulacrum contributors via email or Slack if you're stuck on some syntax in particular. It is also encouraged to look at other simulacrum services on github (https://github.com/slaclab/simulacrum) to see which syntactic elements are "universal", and can simply be copy+pasted into your own code. Don't reinvent the wheel!




Find more simulacrum documentation on the reference index. https://confluence.slac.stanford.edu/x/hak7Eg

  • No labels