From d20272571663fcdcdb1e4636df3b37e6e149b6f0 Mon Sep 17 00:00:00 2001 From: Mathis-Hu Date: Fri, 1 Sep 2023 15:30:06 -0400 Subject: [PATCH] Datasources and process variables examples (Without Alarm Datasource) --- .../resources/examples/11_datasources.bob | 688 +++++++++++++++++- .../resources/examples/datasources_alarm.bob | 39 + .../examples/local_process_variable.bob | 129 ++++ 3 files changed, 854 insertions(+), 2 deletions(-) create mode 100644 app/display/model/src/main/resources/examples/datasources_alarm.bob create mode 100644 app/display/model/src/main/resources/examples/local_process_variable.bob diff --git a/app/display/model/src/main/resources/examples/11_datasources.bob b/app/display/model/src/main/resources/examples/11_datasources.bob index f6548cf730..5b9f022c12 100644 --- a/app/display/model/src/main/resources/examples/11_datasources.bob +++ b/app/display/model/src/main/resources/examples/11_datasources.bob @@ -1,13 +1,697 @@ Datasources + 900 + 1200 Label_3 - Datasources - 210 + Datasources and Process Variables + 500 + 40 + + Label_7 + To select a datasource, you will typically use the form "xx://..". + 40 + 410 + + + Label_8 + SECTION + Channel Access : + 80 + 160 + 30 + + + + + + + + + true + + + Text Update + ca://SomePVName + 10 + 170 + 150 + 30 + + + Text Update_1 + SomePVName + 10 + 220 + 150 + 30 + + + Label_1 + It is the default access protocol. Use for getting PV connected to Channel Access. You can optionnaly specify "ca://". + 100 + 310 + 60 + + + Label_2 + COMMENT + Text update widget will display the value of the PV, or the name with purple border if unreachable + 170 + 170 + 190 + 80 + + + + + + + + + true + true + + + Label_9 + SECTION + PV Access : + 420 + 90 + 160 + 30 + + + + + + + + + true + + + Text Update_2 + pva://counter01 + 430 + 160 + 290 + 30 + + + Label_10 + PV accessed over Process Variables Access protocol. The format is "pva://". + 420 + 110 + 310 + 50 + + + Label_12 + SECTION + Simulated : + 350 + 160 + 30 + + + + + + + + + true + + + Text Update_4 + sim://ramp + 10 + 450 + 90 + 30 + + + Label_13 + Simulated process variables are useful for tests. They do not communicate with the control system. Sim PV have default values if arguments are not specify. Use format "sim://". + 370 + 320 + 110 + + + LED + sim://flipflop(1.5) + 190 + 430 + 70 + 70 + + + Label_14 + COMMENT + sim://flipflop(1.5) + 170 + 500 + 120 + 30 + + + + + + + + + true + 1 + true + + + Label_16 + SECTION + Local : + 420 + 330 + 160 + 30 + + + + + + + + + true + + + Label_17 + Local process variables can be used within the application, for example to send a value from one display to another display within the same application. They do not communicate with the control system. The format is "loc://". + 420 + 350 + 320 + 110 + + + Text Update_5 + loc://large<VLong>(42) + 420 + 450 + 160 + 30 + + + Label_18 + COMMENT + loc://large<VLong>(42) + 420 + 490 + 180 + 30 + + + + + + + + + true + true + + + Action Button + + + loc://large + 18 + Set 18 + + + 600 + 450 + 90 + 31 + $(actions) + + + Action Button_1 + + + loc://large + 35 + Set 35 + + + 710 + 450 + 90 + 31 + $(actions) + + + Text Update_6 + loc://text<VString>("Hi") + 420 + 520 + 160 + 30 + + + Label_19 + COMMENT + loc://text<VString>("Hi") + 590 + 520 + 180 + 30 + + + + + + + + + true + true + + + Text Update_7 + loc://number + 420 + 560 + 130 + 30 + + + Label_20 + COMMENT + loc://number + 420 + 590 + 180 + 30 + + + + + + + + + true + true + + + Action Button_4 + + + loc://number + 0.1 + Set 0.1 + + + 600 + 560 + 90 + 31 + $(actions) + + + Action Button_5 + + + loc://number + 42.4242 + Set 42.4242 + + + 710 + 560 + 90 + 31 + $(actions) + + + Action Button_6 + + + local_process_variable.bob + tab + Open Display + + + Local PV display + 420 + 620 + 120 + $(actions) + + + Label_21 + COMMENT + Tried the local value through another display + 580 + 620 + 180 + 40 + + + + + + + + + true + true + + + Action Button_8 + + + pvaccess/pva_image.bob + replace + Open Display + + + Pva Image + 560 + 230 + 120 + $(actions) + + + Label_22 + See more PVA & CA here : + 430 + 200 + 310 + 30 + + + Action Button_9 + + + pvaccess/pvaSrvExample.bob + replace + Open Display + + + CA vs PVA + 430 + 230 + 120 + $(actions) + + + Action Button_10 + + + pva_server_ramp/display.bob + replace + Open Display + + + Pva Python + 690 + 230 + 120 + $(actions) + + + Label_24 + SECTION + In Formulas : + 420 + 890 + 160 + 30 + + + + + + + + + true + + + Label_25 + Formula-based PVs can perform simple computations on constants and other PVs. They are referenced via backquotes. + 420 + 910 + 410 + 50 + + + Text Update_9 + ='sim://sine' + 420 + 950 + 130 + 30 + + + Label_26 + COMMENT + ='sim://sine' + 570 + 950 + 180 + + + + + + + + + true + true + + + Label_27 + SECTION + MQTT : + 591 + 160 + 30 + + + + + + + + + true + + + Label_28 + Data that is to be read over the MQTT network protocol. All MQTT topics are obtained from the same MQTT broker URL. If the VType is omitted, ‘double’ is assumed. Use 'mqtt://' format Examples: + 611 + 350 + 110 + + + Label_29 + COMMENT + mqtt://some_topic mqtt://some_topic<VDouble> mqtt://some_topic<VString> mqtt://some/nested/topic + 10 + 682 + 210 + 80 + + + + + + + + + true + true + + + Action Button_11 + + + mqtt/mqtt_epics2016_demo.bob + replace + Open Display + + + MQTT Example + 220 + 711 + 120 + $(actions) + + + Label_30 + SECTION + System : + 840 + 160 + 30 + + + + + + + + + true + + + Label_31 + System process variables are useful for representing some system attributes. They do not communicate with the control system. Use "sys://" format : + 859 + 350 + 50 + + + Text Update_10 + sys://time + 919 + 130 + 30 + + + Text Update_11 + sys://timeOffset(12 hours) + 150 + 919 + 200 + 30 + + + Label_32 + COMMENT + sys://time + 959 + 130 + + + + + + + + + true + true + + + Label_33 + COMMENT + sys://timeOffset(12 hours) + 150 + 959 + 200 + + + + + + + + + true + true + + + Label_34 + SECTION + Tango : + 1040 + 160 + 30 + + + + + + + + + true + + + Label_35 + Tango is different from EPICS, the smallest unit is Device, which includes the commands, states, and attributes. The command and the attribute has been implemented, add prefix to PV Name in editing interface to distinguish, and the command usually has a return value, so need to use Text Entry or a combination of Action button and Text Update components to achieve it. Currently, all types of scalars are supported, but SPECTRUM and IMAGE are not yet supported. Example : + 1060 + 790 + 79 + + + Label_36 + COMMENT + tga://device/attribute tgc://device/command + 20 + 1139 + 170 + 40 + + + + + + + + + true + true + + + Label_38 + SECTION + Alarm Datasources : + 420 + 720 + 160 + 30 + + + + + + + + + true + + + Label_39 + Empty for now : + 420 + 740 + 180 + 31 + + + Action Button_12 + + + datasources_alarm.bob + replace + Open Display + + + Alarm Datasource display + 420 + 771 + 210 + $(actions) + diff --git a/app/display/model/src/main/resources/examples/datasources_alarm.bob b/app/display/model/src/main/resources/examples/datasources_alarm.bob new file mode 100644 index 0000000000..c9cb643164 --- /dev/null +++ b/app/display/model/src/main/resources/examples/datasources_alarm.bob @@ -0,0 +1,39 @@ + + + Alarm datasource + + Label + TITLE + Alarm Datasource + 0 + 0 + 550 + 31 + + + + + + + + + true + + + Label_2 + COMMENT + Empty for now + 50 + 140 + + + + + + + + + true + true + + diff --git a/app/display/model/src/main/resources/examples/local_process_variable.bob b/app/display/model/src/main/resources/examples/local_process_variable.bob new file mode 100644 index 0000000000..7befae6d86 --- /dev/null +++ b/app/display/model/src/main/resources/examples/local_process_variable.bob @@ -0,0 +1,129 @@ + + + Local PV + + Label + TITLE + Local PV : + 0 + 0 + 550 + 31 + + + + + + + + + true + + + Text Update_7 + loc://number + 40 + 110 + 130 + 30 + + + Label_20 + COMMENT + loc://number + 40 + 140 + 180 + 30 + + + + + + + + + true + true + + + Label_21 + Local process variables can be used within the application, for example to send a value from one display to another display within the same application + 31 + 320 + 79 + + + Label_22 + COMMENT + Try changing the value of the "number" pv with the buttons in Datasources example display. + 190 + 110 + 210 + 79 + + + + + + + + + true + true + + + Text Update_8 + loc://large<VLong>(42) + 40 + 189 + 160 + 30 + + + Label_23 + COMMENT + loc://large<VLong>(42) + 40 + 229 + 180 + 30 + + + + + + + + + true + true + + + Text Update_9 + loc://text<VString>("Hi") + 280 + 189 + 160 + 30 + + + Label_24 + COMMENT + loc://text<VString>("Hi") + 280 + 229 + 180 + 30 + + + + + + + + + true + true + +