-
Notifications
You must be signed in to change notification settings - Fork 1
Running cs web proto against Coniql
Will Rogers edited this page Oct 28, 2019
·
10 revisions
Coniql (Github)[https://github.com/dls-controls/coniql]) is a prototype server that converts control system data (currently from PVAccess) into a GraphQL protocol that can be understood by cs-web-proto if it uses the Coniql plugin.
- Clone the
coniql
repo from the Github link above - Run
pipenv run python -m coniql.server
This will provide sim://
PVs only. To enable PVAccess PVs:
- set the
EPICS7_BASE
environment variable to the directory of an EPICS7 build pipenv install p4p
Now with pipenv run python -m coniql.server
you should also see data from PVAccess PVs.
Edit App.tsx
to load the ConiqlPlugin
instead of the SimPlugin
. The diff looks like this:
diff --git a/src/App.tsx b/src/App.tsx
index 198d7da..7a87a50 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -18,9 +18,10 @@ import { MacrosPage } from "./pages/macrosPage";
import { lightTheme, darkTheme, ThemeContext } from "./themeContext";
import { FlexExamplePage } from "./pages/flexExamplePage";
import { EmbeddedPage } from "./pages/embeddedPage";
-import { SimulatorPlugin } from "./connection/sim";
+import { ConiqlPlugin } from "./connection/coniql";
log.setLevel("INFO");
+const CONIQL_SOCKET = "localhost:8000";
function applyTheme(theme: any): void {
Object.keys(theme).forEach(function(key): void {
@@ -30,7 +31,7 @@ function applyTheme(theme: any): void {
}
const App: React.FC = (): JSX.Element => {
- const plugin = new SimulatorPlugin();
+ const plugin = new ConiqlPlugin(CONIQL_SOCKET);
initialiseStore(plugin);
const store = getStore();
const { toggle, dark } = React.useContext(ThemeContext);