pvget/pvput for aai/aao record types, with data type=enum, wrong results

Bug #1959457 reported by Jerzy Tarasiuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
New
Undecided
Unassigned

Bug Description

Suspected error place: pvget/pvput commands (or libs they use).

The database file "test.db" is:

record(aao, "test_enum:aai") {
  field(FTVL, 11)
  field(NELM, 64)
}
record(aao, "test_enum:aao") {
  field(FTVL, 11)
  field(NELM, 64)
}

$ softIocPVA -d test.db

$ pvput test_enum:aao 7 1 2 3 4 5 6 7
Old : <undefined> INVALID DRIVER UDF []
New : 2022-01-28 22:29:29.961 [1,2,3,4,1768778092,2003782772,0]
- the New data in the reply should be [1,2,3,4,5,6,7]

The data shown by pvget/pvbut is 32-bit. But it is stored as 16-bit,
therefore half of the data is lost.

caget/caput seem to work corretly, they access the data as 16-bit
(note 'caput' needs -a -n options to set enum array as numeric),
and the device support gets 2-byte element size by dbEntryToAddr().

It is rather of low importance: who uses ENUM arrays?
(with FTVL from 0 to 10, no problem, at least with pvget/pvput)

Tags: array enum pvput
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.