Skip to content

Commit

Permalink
Make lso record the default and make CSS panels more flexible.
Browse files Browse the repository at this point in the history
The CSS panels now use a macro, so that they can easily be changed
when using the stringout or waveform record types for description
records.
  • Loading branch information
smarsching committed Jun 28, 2021
1 parent 173d0b8 commit 0fc32d4
Show file tree
Hide file tree
Showing 24 changed files with 65 additions and 54 deletions.
4 changes: 2 additions & 2 deletions configure/EXAMPLE_CONFIG_SITE.local
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ USR_CXXFLAGS += -Wall -Wextra -pedantic -Wno-c++11-long-long
USR_CFLAGS += -std=c99

# Record type to use for description records.
# This can be "stringout" (the default), "lso", or "waveform".
MRF_DESCRIPTION_RECORD_TYPE = stringout
# This can be "lso" (the default), "stringout", or "waveform".
MRF_DESCRIPTION_RECORD_TYPE = lso
44 changes: 26 additions & 18 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,28 @@ between three types, that can be selected by setting the
`MRF_DESCRIPTION_RECORD_TYPE` variable in `configure/CONFIG_SITE.local` to the
name of the respective record type.

### stringout

This is the default option and works with all supported releases of EPICS Base.
The only downside of this option is that description strings are limited to 39
characters. The CSS / BOY panels distributed with this device support will not
work natively with this record type and have to be adjusted if you want to use
the `stringout` record type (replacing referenced to `.VAL$` with `.VAL` and
removing the `longString` option).

### lso

When choosing the `lso` record, descriptions can have up to 255 characters. The
downside is that the `lso` record is only supported by recent releases of EPICS
Base and that there is a
This is the default option and allows using descriptions with up to 255
characters. The downside is that the `lso` record is only supported by recent
releases of EPICS Base and that there is a
[bug in Autosave](https://github.com/epics-modules/autosave/pull/27) that
prevents values from being restored correctly unless you apply a patch to
Autosave. The CSS / BOY panels distributed with this device support will work
with the `lso` record type without any modifications.
Autosave.

The CSS / BOY panels distributed with this device support will work with the
`lso` record type without any modifications.

### stringout

The `stringout` record is supported by all releases of EPICS Base, but
description strings are limited to 39 characters when using it.

The CSS / BOY panels distributed with this device support will not work natively
with this record type and have to be adjusted. This can be done either by
setting the `mrf_description_pv_suffix` macro to `.VAL` when opening the main
panel or by editing the main panel files (for each of the supported device
types) and changing the default value of this macro accordingly.

### waveform

Expand All @@ -79,7 +83,11 @@ The downside of using the `waveform` record is that EPICS client tools will not
natively recognize that the PV represents a string and that the format in which
Autosave stores the data differs from the one used for the `stringout` and `lso`
records. This means that you will have to manually edit Autosave save files when
switching between `waveform` and one of the other record types. Another downside
is that the CSS / BOY panels, that ship with this device support, will not work
when using the `waveform` record type. The panels have to be adjusted first
(so that they reference the record’s `VAL` field instead of `VAL$`).
switching between `waveform` and one of the other record types.

The CSS / BOY panels distributed with this device support will not work natively
with this record type and have to be adjusted. This can be done either by
setting the `mrf_description_pv_suffix` macro to `.VAL {"longString":true}` when
opening the main panel or by editing the main panel files (for each of the
supported device types) and changing the default value of this macro
accordingly.
4 changes: 2 additions & 2 deletions mrfApp/Db/generate_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ description() {
local pv_name="$1"
local description="$2"
case "$MRF_DESCRIPTION_RECORD_TYPE" in
lso)
lso|"")
if [ "${mode}" = "records" ]; then
cat <<EOF
record(lso, "${pv_name}") {
Expand All @@ -132,7 +132,7 @@ EOF
echo "${pv_name}.VAL\$"
fi
;;
stringout|"")
stringout)
if [ "${mode}" = "records" ]; then
cat <<EOF
record(stringout, "${pv_name}") {
Expand Down
16 changes: 8 additions & 8 deletions opi/boy/EVG/DistributedBus.opi
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B0:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B0:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2421,7 +2421,7 @@ $(pv_value)</tooltip>
<name>Text Input_1</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B1:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B1:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2478,7 +2478,7 @@ $(pv_value)</tooltip>
<name>Text Input_2</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B2:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B2:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2535,7 +2535,7 @@ $(pv_value)</tooltip>
<name>Text Input_3</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B3:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B3:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2592,7 +2592,7 @@ $(pv_value)</tooltip>
<name>Text Input_4</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B4:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B4:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2649,7 +2649,7 @@ $(pv_value)</tooltip>
<name>Text Input_5</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B5:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B5:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2706,7 +2706,7 @@ $(pv_value)</tooltip>
<name>Text Input_6</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B6:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B6:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -2763,7 +2763,7 @@ $(pv_value)</tooltip>
<name>Text Input_7</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)DBus:B7:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)DBus:B7:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/EventTrigger.opi
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ $(pv_value)</tooltip>
<name>rowEventCodeNumber_1</name>
<precision>0</precision>
<precision_from_pv>false</precision_from_pv>
<pv_name>$(mrf_evg_prefix)Event:EvTrig$(mrf_evg_event_trigger_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)Event:EvTrig$(mrf_evg_event_trigger_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/Input.opi
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_input_prefix)$(mrf_evg_input_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_input_prefix)$(mrf_evg_input_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
1 change: 1 addition & 0 deletions opi/boy/EVG/Main.opi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<height>600</height>
<macros>
<include_parent_macros>true</include_parent_macros>
<mrf_description_pv_suffix>.VAL$ {"longString":true}</mrf_description_pv_suffix>
</macros>
<name>$(mrf_evg_name) Overview</name>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/MultiplexedCounter.opi
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ $(pv_value)</tooltip>
<name>Text Input_1</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_prefix)MXC$(mrf_evg_mxc_id):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_prefix)MXC$(mrf_evg_mxc_id):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/OptionalInput.opi
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_input_prefix)$(mrf_evg_input_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_input_prefix)$(mrf_evg_input_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/OptionalOutput.opi
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_output_prefix)$(mrf_evg_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_output_prefix)$(mrf_evg_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVG/Output.opi
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evg_output_prefix)$(mrf_evg_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evg_output_prefix)$(mrf_evg_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
12 changes: 6 additions & 6 deletions opi/boy/EVR/CMLOutput16PulseGenerators.opi
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
<border_width>1</border_width>
<enabled>false</enabled>
<font>
<opifont.name fontName="Ubuntu" height="9" style="0" pixels="false">Default</opifont.name>
<opifont.name fontName="Tahoma" height="12" style="0" pixels="false">Default</opifont.name>
</font>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<foreground_color>
<color red="0" green="0" blue="0" />
</foreground_color>
<height>32</height>
<height>26</height>
<items>
<s>Pulse Generator 0</s>
<s>Pulse Generator 1</s>
Expand Down Expand Up @@ -315,7 +315,7 @@ $(pv_value)</tooltip>
<border_width>1</border_width>
<enabled>true</enabled>
<font>
<opifont.name fontName="Ubuntu" height="9" style="0" pixels="false">Default</opifont.name>
<opifont.name fontName="Tahoma" height="12" style="0" pixels="false">Default</opifont.name>
</font>
<foreground_color>
<color red="0" green="0" blue="0" />
Expand Down Expand Up @@ -366,7 +366,7 @@ $(pv_value)</tooltip>
<border_width>1</border_width>
<enabled>true</enabled>
<font>
<opifont.name fontName="Ubuntu" height="9" style="0" pixels="false">Default</opifont.name>
<opifont.name fontName="Tahoma" height="12" style="0" pixels="false">Default</opifont.name>
</font>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<foreground_color>
Expand Down Expand Up @@ -414,7 +414,7 @@ $(pv_value)</tooltip>
<confirm_message></confirm_message>
<enabled>true</enabled>
<font>
<opifont.name fontName="Ubuntu" height="9" style="0" pixels="false">Default</opifont.name>
<opifont.name fontName="Tahoma" height="12" style="0" pixels="false">Default</opifont.name>
</font>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<foreground_color>
Expand All @@ -430,7 +430,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/Input.opi
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,7 @@ $(pv_value)</tooltip>
<name>Text Input_2</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_input_prefix)Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_input_prefix)Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/InputWithStatus.opi
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ $(pv_value)</tooltip>
<name>Text Input_2</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_input_prefix)Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_input_prefix)Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
1 change: 1 addition & 0 deletions opi/boy/EVR/Main_MTCA-EVR-300.opi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<height>600</height>
<macros>
<include_parent_macros>true</include_parent_macros>
<mrf_description_pv_suffix>.VAL$ {"longString":true}</mrf_description_pv_suffix>
</macros>
<name>$(mrf_evr_name) Overview</name>
<rules />
Expand Down
1 change: 1 addition & 0 deletions opi/boy/EVR/Main_VME-EVR-230RF.opi
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<macros>
<include_parent_macros>true</include_parent_macros>
<mrf_evr_type>VME-EVR-230RF</mrf_evr_type>
<mrf_description_pv_suffix>.VAL$ {"longString":true}</mrf_description_pv_suffix>
</macros>
<name>$(mrf_evr_name) Overview</name>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/OptionalOutput16PulseGenerators.opi
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ $(pv_value)</tooltip>
<name>Text Input_1</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ $(pv_value)</tooltip>
<name>Text Input_1</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/Output16PulseGenerators.opi
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ $(pv_value)</tooltip>
<name>Text Input</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_output_prefix)$(mrf_evr_output_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/Prescaler32WithMapping.opi
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ $(pv_value)</tooltip>
<name>Text Input_1</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)Prescaler$(mrf_evr_prescaler_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)Prescaler$(mrf_evr_prescaler_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
6 changes: 3 additions & 3 deletions opi/boy/EVR/Prescalers_VME-EVR-230RF.opi
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ $(pv_value)</tooltip>
<name>Text Input_3</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)Prescaler0:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)Prescaler0:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -668,7 +668,7 @@ $(pv_value)</tooltip>
<name>Text Input_4</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)Prescaler1:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)Prescaler1:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down Expand Up @@ -725,7 +725,7 @@ $(pv_value)</tooltip>
<name>Text Input_5</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)Prescaler2:Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)Prescaler2:Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/PulseGeneratorPrescaler0Delay32Width16.opi
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ $(pv_value)</tooltip>
<name>Text Input_3</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/PulseGeneratorPrescaler16Delay32Width32.opi
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ $(pv_value)</tooltip>
<name>Text Input_3</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down
2 changes: 1 addition & 1 deletion opi/boy/EVR/PulseGeneratorPrescaler8Delay32Width16.opi
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ $(pv_value)</tooltip>
<name>Text Input_3</name>
<precision>0</precision>
<precision_from_pv>true</precision_from_pv>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description.VAL$ {"longString":true}</pv_name>
<pv_name>$(mrf_evr_prefix)PulseGen$(mrf_evr_pulse_gen_num):Description$(mrf_description_pv_suffix)</pv_name>
<pv_value />
<rotation_angle>0.0</rotation_angle>
<rules />
Expand Down

0 comments on commit 0fc32d4

Please sign in to comment.