Convert GUI_ promptgroup strings to new-style

This commit is contained in:
Andrew Johnson
2016-05-26 16:15:48 +02:00
parent 54bab1e2f0
commit 4284222b54
2 changed files with 37 additions and 0 deletions

View File

@@ -58,6 +58,12 @@ plus space-dash-space to allow proper sorting of groups.</p>
has been deprecated. Instead, use the conversion functions between index number
and group string that have been added to dbStaticLib.</p>
<p>When a DBD file containing record-type descriptions is expanded, any
old-style <tt>GUI_xxx</tt> group names will be replaced by a new-style
string for use by the IOC. This permits an older record type to be used with
the 3.15.4 release, although eventually record types should be converted by
hand with better group names used.</p>
<h3>CA server configuration changes</h3>
<p>RSRV now honors EPICS_CAS_INTF_ADDR_LIST and binds only to the provided list

View File

@@ -39,6 +39,35 @@ our %field_attrs = (
prop => qr/^(?:YES|NO)$/
);
# Convert old promptgroups into new-style
my %promptgroupMap = (
GUI_COMMON => '10 - Common',
GUI_ALARMS => '70 - Alarm',
GUI_BITS1 => '41 - Bits (1)',
GUI_BITS2 => '42 - Bits (2)',
GUI_CALC => '30 - Action',
GUI_CLOCK => '30 - Action',
GUI_COMPRESS => '30 - Action',
GUI_CONVERT => '60 - Convert',
GUI_DISPLAY => '80 - Display',
GUI_HIST => '30 - Action',
GUI_INPUTS => '40 - Input',
GUI_LINKS => '40 - Link',
GUI_MBB => '30 - Action',
GUI_MOTOR => '30 - Action',
GUI_OUTPUT => '50 - Output',
GUI_PID => '30 - Action',
GUI_PULSE => '30 - Action',
GUI_SELECT => '40 - Input',
GUI_SEQ1 => '51 - Output (1)',
GUI_SEQ2 => '52 - Output (2)',
GUI_SEQ3 => '53 - Output (3)',
GUI_SUB => '30 - Action',
GUI_TIMER => '30 - Action',
GUI_WAVE => '30 - Action',
GUI_SCAN => '20 - Scan',
);
sub new {
my ($class, $name, $type) = @_;
dieContext("Illegal field type '$type', valid field types are:",
@@ -76,6 +105,8 @@ sub number {
sub add_attribute {
my ($this, $attr, $value) = @_;
unquote $value;
$value = $promptgroupMap{$value}
if $attr eq 'promptgroup' && exists $promptgroupMap{$value};
my $match = $field_attrs{$attr};
if (defined $match) {
dieContext("Bad value '$value' for field attribute '$attr'")