With waveform records, the format converter is applied to
each array element. Between the elements, a separator is printed
or expected as specified by the Separator
variable in the
protocol.
When parsing input, a space as the first character of the
Separator
matches any number of any whitespace
characters.
During input, a maximum of NELM
elements is
read and NORD
is updated accordingly.
Parsing of elements stops when the separator does not match,
conversion fails, or the end of the input is reached.
A minimum of one element must be available.
During output, the first NORD
elements are
written.
The format data type must be convertible to or from the type
specified in the FTVL
field.
The types "INT64"
and "UINT64"
are
only available in EPICS base version 3.16 or higher.
The variable x[i]
stands for one element of
the written or read value.
%f
):x[i]=double(VAL[i])
FTVL
can be "DOUBLE"
, "FLOAT"
,
"INT64"
, "UINT64"
,
"LONG"
, "ULONG"
, "SHORT"
,
"USHORT"
, "CHAR"
, "UCHAR"
,
or "ENUM"
(which is treated as "USHORT"
).VAL[i]=FTVL(x[i])
FTVL
must be "FLOAT"
or "DOUBLE"
%i
or %{
):x[i]=long(VAL[i])
FTVL
can be
"INT64"
, "UINT64"
,
"LONG"
, "ULONG"
, "SHORT"
,
"USHORT"
, "CHAR"
, "UCHAR"
,
or "ENUM"
(which is treated as "USHORT"
).VAL[i]=FTVL(x[i])
FTVL
can be "DOUBLE"
, "FLOAT"
,
"INT64"
, "UINT64"
,
"LONG"
, "ULONG"
, "SHORT"
,
"USHORT"
, "CHAR"
, "UCHAR"
,
or "ENUM"
(which is treated as "USHORT"
).FTVL
has a smaller data size than long
.
%s
):FTVL=="STRING"
:x[i]=VAL[i]
VAL[i]=x[i]
FTVL=="CHAR"
or FTVL="UCHAR"
:NORD
.
No separators are printed or expected.x=range(VAL,0,NORD)
NORD
characters are printed,
which might be less than NELM
.VAL=x, NORD=length(x)
NELM-1
characters can be read.
NORD
is updated to the index of the first of the
trailing zeros.
Usually, this is the same as the string length.
FTVL
are not allowed for this format.
During initialization, the @init
handler is executed, if
present. All format converters work like in normal operation.