diff --git a/documentation/ca-cli.md b/documentation/ca-cli.md index 98ea5509d..b09920b1c 100644 --- a/documentation/ca-cli.md +++ b/documentation/ca-cli.md @@ -7,4 +7,5 @@ caget cainfo camonitor +caput ``` diff --git a/modules/ca/src/tools/Makefile b/modules/ca/src/tools/Makefile index 956bac912..8715bda7d 100644 --- a/modules/ca/src/tools/Makefile +++ b/modules/ca/src/tools/Makefile @@ -27,5 +27,6 @@ PROD_LIBS = ca Com DOCS += caget.md DOCS += cainfo.md DOCS += camonitor.md +DOCS += caput.md include $(TOP)/configure/RULES diff --git a/modules/ca/src/tools/caput.md b/modules/ca/src/tools/caput.md new file mode 100644 index 000000000..447c463db --- /dev/null +++ b/modules/ca/src/tools/caput.md @@ -0,0 +1,85 @@ +# caput + +``` {program} caput +``` + + caput [options] ... + caput -a [options] ... + +## Description + +Put value to a PV. + +The specified value is written to the PV (as a string). The PV's value is read +before and after the write operation and printed as "Old" and "New" values on +stdout. + +There are two variants to the arguments for this command. For the scalar +variant without the {option}`-a` flag, all the value arguments provided after +the PV name are concatenated with a single space character between them, and +the resulting string (up to 40 characters long unless the {option}`-S` flag is +given) is written to the specified PV. + +The array variant with the {option}`-a` flag writes an array of string values +to the specified PV. The numeric argument giving the number of array elements +is actually ignored, the array length to be written is actually controlled by +the number of values provided on the command line. + +## Options + +::: {option} -h +Print usage information +::: + +### CA options + +::: {option} -w +Wait time, specifies longer CA timeout, default is 1.0 second. +::: + +::: {option} -c +Asynchronous get (use ca_get_callback instead of ca_get). +::: + +::: {option} -p +CA priority (0--99, default 0=lowest) +::: + +### Format options + +::: {option} -t +Terse mode --- print only successfully written value, without name. +::: + +::: {option} -l +Long mode `name timestamp value stat sevr` (read PVs as `DBR_TIME_xxx`) +::: + +### Enum Format + +By default: Auto --- try value as ENUM string, then as index number + +::: {option} -n +Force interpretation of values as numbers +::: + +::: {option} -s +Force interpretation of values as strings +::: + +### Arrays + +By default: put scalar + +Value format: all value arguments concatenated with spaces + +::: {option} -S +Put string as an array of chars (long string) +::: + +::: {option} -a +Put array + +Value format: number of values, then list of values +::: +