Skip to content

Lume-epics is a dedicated API for serving LUME model variables with EPICS.

License

Notifications You must be signed in to change notification settings

slaclab/lume-epics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Aug 13, 2020
Aug 14, 2020
Aug 14, 2020
Aug 20, 2020
Jun 16, 2020
Jun 12, 2020
Jun 12, 2020
Aug 20, 2020
Jun 12, 2020
Jun 16, 2020
Aug 5, 2020
Aug 14, 2020
Aug 14, 2020
Aug 14, 2020
Aug 5, 2020
Jun 16, 2020
Jun 16, 2020
Jun 23, 2020
Jun 16, 2020

Repository files navigation

lume-epics

Lume-epics is a dedicated API for serving LUME model variables with EPICS. Configurations for LUME model variables can be found in lume-model.

Installation

Lume-epics may be installed using conda over the channel jrgarrahan:
$ conda install lume-epics -c jrgarrahan

Dependencies

The dependencies for lume-epics are:

  • python>=3.7
  • pydantic
  • pcaspy
  • pyepics
  • p4p
  • numpy
  • bokeh
  • lume-model
  • EPICS >= 7.0.1.

Server

The EPICS server requires a model class, input variables, output variables, and a prefix for intantiation. By default, the server uses both the pvAccess and Channel Access protocols when serving the EPICS process variables. An optional keyword argument allows the server to be started using a single protocol (protocols=["pva"] for pvAccess, protocols=["ca"] for Channel Access). Once instantiated, the server is started using the Server.start() method, which has an optional monitor keyword argument, monitor, that controls thread execution. When monitor=True, the server is run in the main thread and may be stopped using keyboard interrupt (Ctr+C). If using monitor=False, the server can be stopped manually using the Server.stop() method.

from lume_epics.epics_server import Server

prefix = "test"
server = Server(
            DemoModel, 
            DemoModel.input_variables, 
            DemoModel.output_variables, 
            prefix
        )
# monitor = False does not loop in main thread and can be terminated 
# with server.stop()
server.start(monitor=True)
# Runs until keyboard interrupt.

Compatable models

See docs for notes on serving online models with lume-epics.