Skip to content

Commit

Permalink
fix sizv for printf & fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Insomnia1437 authored and mdavidsaver committed May 20, 2024
1 parent e5b4829 commit 4966baf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/database/src/std/rec/lsiRecord.dbd.pod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
=title Long String Input Record (lsi)

The long string input record is used to retrieve an arbitrary ASCII string with
a maximum length of 65535 characters.
a maximum length of 32767 characters.

This record type was included in base.dbd beginning with epics-base 3.15.0.2 .

Expand All @@ -36,7 +36,7 @@ from. It can be a database or channel access link, or a constant. If constant,
the VAL field is initialized with the constant and can be changed via dbPuts.
Otherwise, the string is read from the specified location each time the record
is processed and placed in the VAL field. The maximum number of characters in
VAL is given by SIZV, and cannot be larger than 65535. In addition, the
VAL is given by SIZV, and cannot be larger than 32767. In addition, the
appropriate device support module must be entered into the DTYP field.

=fields VAL, OVAL, SIZV, INP, DTYP
Expand Down
2 changes: 1 addition & 1 deletion modules/database/src/std/rec/lsoRecord.dbd.pod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
=title Long String Output Record (lso)

The long string output record is used to write an arbitrary ASCII string with a
maximum length of 65535 characters.
maximum length of 32767 characters.

This record type was included in base.dbd beginning with epics-base 3.15.0.2 .

Expand Down
3 changes: 3 additions & 0 deletions modules/database/src/std/rec/printfRecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ static long init_record(struct dbCommon *pcommon, int pass)
if (sizv < 16) {
sizv = 16; /* Enforce a minimum size for the VAL field */
prec->sizv = sizv;
} else if (sizv > 0x7fff) {
sizv = 0x7fff; /* SIZV is unsigned, but dbAddr::field_size is signed */
prec->sizv = sizv;
}

prec->val = callocMustSucceed(1, sizv, "printf::init_record");
Expand Down
2 changes: 1 addition & 1 deletion modules/database/src/std/rec/printfRecord.dbd.pod
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Specification|https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Dat
for information on specifying links.

The formatted string is written to the VAL field. The maximum number of
characters in VAL is given by SIZV, and cannot be larger than 65535. The LEN
characters in VAL is given by SIZV, and cannot be larger than 32767. The LEN
field contains the length of the formatted string in the VAL field.

=fields FMT, INP0, INP1, INP2, INP3, INP4, INP5, INP6, INP7, INP8, INP9, VAL, SIZV, LEN
Expand Down

0 comments on commit 4966baf

Please sign in to comment.