Compare commits
17 Commits
PSI-7.0.8.
...
R7.0.8.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57c930fbee | ||
|
|
785b777baf | ||
|
|
d0d15ee911 | ||
|
|
5af9c7e50d | ||
|
|
5fe563bed8 | ||
|
|
11fba63d18 | ||
|
|
1db37bcd91 | ||
|
|
beec00b403 | ||
|
|
4966baf423 | ||
|
|
e5b4829074 | ||
|
|
d8b5616772 | ||
|
|
92615a77fe | ||
|
|
b3f92d81db | ||
|
|
839f764bcb | ||
|
|
4bb50fe664 | ||
|
|
c77f32b19c | ||
|
|
66ce1c2076 |
2
.github/workflows/check-editorconfig.yml
vendored
2
.github/workflows/check-editorconfig.yml
vendored
@@ -8,6 +8,6 @@ jobs:
|
||||
editorconfig:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: EditorConfig-Action
|
||||
uses: greut/eclint-action@v0
|
||||
|
||||
4
.github/workflows/ci-scripts-build.yml
vendored
4
.github/workflows/ci-scripts-build.yml
vendored
@@ -284,6 +284,10 @@ jobs:
|
||||
submodules: true
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@master
|
||||
if: matrix.image!='centos:7'
|
||||
- name: Automatic core dumper analysis
|
||||
uses: mdavidsaver/ci-core-dumper@node16
|
||||
if: matrix.image=='centos:7'
|
||||
- name: Prepare and compile dependencies
|
||||
run: python .ci/cue.py prepare
|
||||
- name: Build main module
|
||||
|
||||
@@ -56,7 +56,7 @@ EPICS_PATCH_LEVEL = 1
|
||||
|
||||
# Immediately after an official release the EPICS_PATCH_LEVEL is incremented
|
||||
# and the -DEV suffix is added (similar to the Maven -SNAPSHOT versions)
|
||||
EPICS_DEV_SNAPSHOT=-DEV
|
||||
EPICS_DEV_SNAPSHOT=
|
||||
|
||||
# No changes should be needed below here
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ EPICS_CA_MAINTENANCE_VERSION = 4
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_CA_DEVELOPMENT_FLAG = 1
|
||||
EPICS_CA_DEVELOPMENT_FLAG = 0
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -6,7 +6,7 @@ EPICS_DATABASE_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_DATABASE_DEVELOPMENT_FLAG = 1
|
||||
EPICS_DATABASE_DEVELOPMENT_FLAG = 0
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -6,7 +6,7 @@ EPICS_LIBCOM_MAINTENANCE_VERSION = 1
|
||||
|
||||
# Development flag, set to zero for release versions
|
||||
|
||||
EPICS_LIBCOM_DEVELOPMENT_FLAG = 1
|
||||
EPICS_LIBCOM_DEVELOPMENT_FLAG = 0
|
||||
|
||||
# Immediately after a release the MAINTENANCE_VERSION
|
||||
# will be incremented and the DEVELOPMENT_FLAG set to 1
|
||||
|
||||
@@ -34,5 +34,9 @@ CFG += TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A)
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
|
||||
ifeq ($(GNU),YES)
|
||||
# Pass compiler flags to preprocessor to enable _FORTIFY_SOURCE
|
||||
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): CPPFLAGS += $(CFLAGS)
|
||||
endif
|
||||
TOOLCHAIN.$(EPICS_HOST_ARCH).$(T_A): toolchain.c
|
||||
$(PREPROCESS.cpp)
|
||||
|
||||
@@ -47,3 +47,8 @@ COMMANDLINE_LIBRARY ?= EPICS
|
||||
#else
|
||||
COMMANDLINE_LIBRARY ?= $(strip $(if $(wildcard $(if $(GNU_DIR),$(GNU_DIR)/include/readline/readline.h)), READLINE, EPICS))
|
||||
#endif
|
||||
|
||||
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE>2
|
||||
OP_SYS_CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
|
||||
#endif
|
||||
|
||||
|
||||
@@ -18,10 +18,53 @@ should also be read to understand what has changed since earlier releases:
|
||||
- [pva2pva](https://epics-base.github.io/pva2pva/release_notes.html)
|
||||
- [pvaClient](https://github.com/epics-base/pvaClientCPP/blob/master/documentation/RELEASE_NOTES.md)
|
||||
|
||||
**This version of EPICS has not been released yet.**
|
||||
## EPICS Release 7.0.8.1
|
||||
|
||||
## Changes made on the 7.0 branch since 7.0.8
|
||||
### Limit to `_FORTIFY_SOURCE=2`
|
||||
|
||||
GCC versions 12 and beyond and glibc have added some aggressive runtime
|
||||
checks for buffer overflows in libc functions at runtime, and the
|
||||
[Ubuntu 2024.04](https://wiki.ubuntu.com/ToolChain/CompilerFlags) release
|
||||
increased their default gcc fortification level from 2 to 3.
|
||||
This has started causing EPICS Base builds to fail on that version, and
|
||||
other OS releases may make that configuration change with similar results.
|
||||
This release detects a compiler configured with `_FORTIFY_SOURCE=3` and
|
||||
overrides it to 2.
|
||||
Later releases of Base will adjust the code, providing information to the
|
||||
compiler to avoid triggering these incorrect protections.
|
||||
|
||||
### Fix issue with compress record
|
||||
|
||||
In Base 7.0.8, an update to the compress record was added to allow for certain
|
||||
algorithms to use partially filled buffers in their computations. Unfortunately,
|
||||
this broke the behaviour of the records in certain cases. This has been fixed.
|
||||
|
||||
### Various minor changes
|
||||
|
||||
These included fixing minor memory leaks and documentation corrections. The
|
||||
`SIZV` field of lsi, lso and printf record VAL fields now can't exceed 32767
|
||||
characters, to match an internal limit.
|
||||
|
||||
### `epicsSocketAccept()` now returns `SOCKET`, not `int`
|
||||
|
||||
This might have some effect on downstream modules still using `int`, but the
|
||||
OS-specific osdSock.h headers which osiSock.h includes have all declared
|
||||
`SOCKET` (in most casese as a typedef for `int`) for many releases.
|
||||
This change removes a compiler warning on WIN32.
|
||||
Further details and the discussion about this change can be found
|
||||
[here](https://github.com/epics-base/epics-base/pull/458).
|
||||
|
||||
### `dbLoadRecords` allows macros with default values
|
||||
|
||||
Previously the parser assumed that files containing macro substitutions were
|
||||
bad if no macro definitions were provided; that assumption was made incorrect
|
||||
once macro substitutions were allowed to provide a default value.
|
||||
|
||||
### Hostname length limit in CA removed
|
||||
|
||||
Before this release, the CA client library only handled hostnames in address
|
||||
list environment variables up to 255 characters long.
|
||||
This limit has been removed.
|
||||
|
||||
-----
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
|
||||
<li>Tag the module:
|
||||
<blockquote><tt>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.8' <module-version>
|
||||
git tag -m 'ANJ: Tag for EPICS 7.0.8.1' <module-version>
|
||||
</tt></blockquote>
|
||||
</li>
|
||||
|
||||
@@ -269,7 +269,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Tag the epics-base module in Git:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
git tag -m 'ANJ: Tagged for release' R7.0.8
|
||||
git tag -m 'ANJ: Tagged for release' R7.0.8.1
|
||||
</tt></blockquote>
|
||||
<p>Don't push to GitHub yet.</p>
|
||||
</td>
|
||||
@@ -303,12 +303,12 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
files and directories that are only used for continuous integration:
|
||||
<blockquote><tt>
|
||||
cd base-7.0<br />
|
||||
./.tools/make-tar.sh R7.0.8 ../base-7.0.8.tar.gz base-7.0.8/
|
||||
./.tools/make-tar.sh R7.0.8.1 ../base-7.0.8.1.tar.gz base-7.0.8.1/
|
||||
</tt></blockquote>
|
||||
Create a GPG signature file of the tarfile as follows:
|
||||
<blockquote><tt>
|
||||
cd ..<br />
|
||||
gpg --armor --sign --detach-sig base-7.0.8.tar.gz
|
||||
gpg --armor --sign --detach-sig base-7.0.8.1.tar.gz
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -374,7 +374,7 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td>Upload the tar file and its <tt>.asc</tt> signature file to the
|
||||
epics-controls web-server.
|
||||
<blockquote><tt>
|
||||
scp base-7.0.8.tar.gz base-7.0.8.tar.gz.asc epics-controls:download/base<br />
|
||||
scp base-7.0.8.1.tar.gz base-7.0.8.1.tar.gz.asc epics-controls:download/base<br />
|
||||
</tt></blockquote>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -397,8 +397,8 @@ everything that has to be done since it's so easy to miss steps.</p>
|
||||
<td><input type="checkbox"></td>
|
||||
<td>Release Manager</td>
|
||||
<td>Go to the GitHub
|
||||
<a href="https://github.com/epics-base/epics-base/releases/new?tag=R7.0.8">
|
||||
Create release from tag R7.0.8</a> page.
|
||||
<a href="https://github.com/epics-base/epics-base/releases/new?tag=R7.0.8.1">
|
||||
Create release from tag R7.0.8.1</a> page.
|
||||
Upload the tar file and its <tt>.asc</tt> signature file to the new
|
||||
GitHub release page.</td>
|
||||
</tr>
|
||||
|
||||
@@ -225,6 +225,11 @@ static void asCaTask(void)
|
||||
if(asCaDebug) printf("asCaTask has cleared all channels\n");
|
||||
epicsEventSignal(asCaTaskWait);
|
||||
}
|
||||
|
||||
/* ATM never reached, just a placeholder */
|
||||
cantProceed("Unreachable. Perpetual thread.");
|
||||
|
||||
taskwdRemove(0);
|
||||
}
|
||||
|
||||
void asCaStart(void)
|
||||
|
||||
@@ -119,7 +119,7 @@ typedef struct dbRecordNode {
|
||||
ELLLIST infoList; /*LIST head of info nodes*/
|
||||
int flags;
|
||||
/** Parse order of this record()
|
||||
* @since UNRELEASED
|
||||
* @since 7.0.8.1
|
||||
*/
|
||||
unsigned order;
|
||||
struct dbRecordNode *aliasedRecnode; /* NULL unless flags|DBRN_FLAGS_ISALIAS */
|
||||
@@ -189,7 +189,7 @@ typedef struct dbBase {
|
||||
short ignoreMissingMenus;
|
||||
short loadCdefs;
|
||||
/** Total number of records.
|
||||
* @since UNRELEASED
|
||||
* @since 7.0.8.1
|
||||
*/
|
||||
unsigned no_records;
|
||||
}dbBase;
|
||||
|
||||
@@ -120,6 +120,11 @@ static void req_server (void *pParm)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ATM never reached, just a placeholder */
|
||||
cantProceed("Unreachable. Perpetual thread.");
|
||||
|
||||
taskwdRemove(0);
|
||||
}
|
||||
|
||||
static
|
||||
@@ -748,6 +753,7 @@ void rsrv_init (void)
|
||||
if(!havesometcp)
|
||||
cantProceed("CAS: No TCP server started\n");
|
||||
}
|
||||
free(socks);
|
||||
|
||||
/* servers list is considered read-only from this point */
|
||||
|
||||
|
||||
@@ -129,7 +129,11 @@ void rsrv_online_notify_task(void *pParm)
|
||||
}
|
||||
}
|
||||
|
||||
/* ATM never reached, just a placeholder */
|
||||
cantProceed("Unreachable. Perpetual thread.");
|
||||
|
||||
free(lastError);
|
||||
taskwdRemove(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1160,7 +1160,7 @@ See next section.
|
||||
|
||||
=head2 C<special>
|
||||
|
||||
This is called id CALC or OCAL is changed. C<special> calls postfix.
|
||||
This is called if CALC or OCAL is changed. C<special> calls postfix.
|
||||
|
||||
=head2 C<get_units>
|
||||
|
||||
|
||||
@@ -149,13 +149,16 @@ static int compare(const void *arg1, const void *arg2)
|
||||
else return 1;
|
||||
}
|
||||
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
static int compress_array(compressRecord *prec,
|
||||
double *psource, int no_elements)
|
||||
{
|
||||
epicsInt32 i,j;
|
||||
epicsInt32 j;
|
||||
epicsInt32 n, nnew;
|
||||
epicsInt32 nsam = prec->nsam;
|
||||
double value;
|
||||
epicsUInt32 samples_written = 0;
|
||||
double value = 0.0;
|
||||
|
||||
/* skip out of limit data */
|
||||
if (prec->ilil < prec->ihil) {
|
||||
@@ -167,61 +170,54 @@ static int compress_array(compressRecord *prec,
|
||||
}
|
||||
if (prec->n <= 0)
|
||||
prec->n = 1;
|
||||
if (no_elements < prec->n && prec->pbuf != menuYesNoYES)
|
||||
return 1; /*dont do anything*/
|
||||
n = no_elements;
|
||||
n = prec->n;
|
||||
|
||||
/* determine number of samples to take */
|
||||
if (no_elements < nsam * n)
|
||||
nnew = (no_elements / n);
|
||||
else nnew = nsam;
|
||||
nnew = min(no_elements, nsam * n);
|
||||
|
||||
/* compress according to specified algorithm */
|
||||
switch (prec->alg){
|
||||
case compressALG_N_to_1_Low_Value:
|
||||
/* compress N to 1 keeping the lowest value */
|
||||
for (i = 0; i < nnew; i++) {
|
||||
while (nnew > 0)
|
||||
{
|
||||
if (nnew < n && prec->pbuf != menuYesNoYES)
|
||||
break;
|
||||
|
||||
n = min(n, nnew);
|
||||
switch (prec->alg)
|
||||
{
|
||||
case compressALG_N_to_1_Low_Value:
|
||||
value = *psource++;
|
||||
for (j = 1; j < n; j++, psource++) {
|
||||
for (j = 1; j < n; j++, psource++)
|
||||
{
|
||||
if (value > *psource)
|
||||
value = *psource;
|
||||
}
|
||||
put_value(prec, &value, 1);
|
||||
}
|
||||
break;
|
||||
case compressALG_N_to_1_High_Value:
|
||||
/* compress N to 1 keeping the highest value */
|
||||
for (i = 0; i < nnew; i++){
|
||||
break;
|
||||
case compressALG_N_to_1_High_Value:
|
||||
value = *psource++;
|
||||
for (j = 1; j < n; j++, psource++) {
|
||||
for (j = 1; j < n; j++, psource++)
|
||||
{
|
||||
if (value < *psource)
|
||||
value = *psource;
|
||||
}
|
||||
put_value(prec, &value, 1);
|
||||
}
|
||||
break;
|
||||
case compressALG_N_to_1_Average:
|
||||
/* compress N to 1 keeping the average value */
|
||||
for (i = 0; i < nnew; i++) {
|
||||
value = 0;
|
||||
for (j = 0; j < n; j++, psource++)
|
||||
break;
|
||||
case compressALG_N_to_1_Average:
|
||||
value = *psource++;
|
||||
for (j = 1; j < n; j++, psource++)
|
||||
{
|
||||
value += *psource;
|
||||
value /= n;
|
||||
put_value(prec, &value, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case compressALG_N_to_1_Median:
|
||||
/* compress N to 1 keeping the median value */
|
||||
/* note: sorts source array (OK; it's a work pointer) */
|
||||
for (i = 0; i < nnew; i++, psource += nnew) {
|
||||
}
|
||||
value = value / n;
|
||||
break;
|
||||
case compressALG_N_to_1_Median:
|
||||
/* note: sorts source array (OK; it's a work pointer) */
|
||||
qsort(psource, n, sizeof(double), compare);
|
||||
value = psource[n / 2];
|
||||
put_value(prec, &value, 1);
|
||||
psource += n;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
nnew -= n;
|
||||
put_value(prec, &value, 1);
|
||||
samples_written++;
|
||||
}
|
||||
return 0;
|
||||
return (samples_written == 0);
|
||||
}
|
||||
|
||||
static int array_average(compressRecord *prec,
|
||||
|
||||
@@ -91,10 +91,10 @@ The BPTR field contains a pointer to the unsigned long array of frequency
|
||||
values. The VAL field references this array as well. However, the BPTR field is
|
||||
not accessible at run-time.
|
||||
|
||||
The MCNT field keeps counts the number of signal counts since the last monitor
|
||||
The MCNT field keeps the number of signal counts since the last monitor
|
||||
was invoked.
|
||||
|
||||
The collections controls field (CMD) is a menu field with five choices:
|
||||
The collections controls field (CMD) is a menu field with four choices:
|
||||
|
||||
=menu histogramCMD
|
||||
|
||||
@@ -110,8 +110,6 @@ array. Unlike C<Read>, it doesn't clear the array first.
|
||||
|
||||
The C<Stop> command disables the reading of signal values into the array.
|
||||
|
||||
The C<Setup> command waits until the C<start> or C<read> command has been issued
|
||||
to start counting.
|
||||
|
||||
The CSTA or collections status field implements the CMD field choices by
|
||||
enabling or disabling the reading of values into the histogram array. While
|
||||
|
||||
@@ -49,6 +49,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, "lsi::init_record");
|
||||
|
||||
@@ -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 .
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -53,6 +53,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, "lso::init_record");
|
||||
|
||||
@@ -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 .
|
||||
|
||||
@@ -41,7 +41,7 @@ C<supervisory> is specified, DOL is ignored, the current value of VAL is
|
||||
written, and VAL can be changed externally via dbPuts at run-time.
|
||||
|
||||
The maximum number of characters in VAL is given by SIZV, and cannot be larger
|
||||
than 65535.
|
||||
than 32767.
|
||||
|
||||
DOL can also be a constant instead of a link, in which case VAL is initialized
|
||||
to the constant value. Most simple string constants are likely to be interpreted
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -469,6 +469,38 @@ testNto1Average(void) {
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
void testNto2Average(void) {
|
||||
DBADDR wfaddr, caddr;
|
||||
|
||||
testDiag("Test N to 1 Average, NSAM=2, N=2");
|
||||
|
||||
testdbPrepare();
|
||||
|
||||
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
|
||||
|
||||
recTestIoc_registerRecordDeviceDriver(pdbbase);
|
||||
|
||||
testdbReadDatabase("compressTest.db", NULL, "INP=wf,ALG=N to 1 Average,BALG=FIFO Buffer,NSAM=2,N=2");
|
||||
|
||||
eltc(0);
|
||||
testIocInitOk();
|
||||
eltc(1);
|
||||
|
||||
fetchRecordOrDie("wf", wfaddr);
|
||||
fetchRecordOrDie("comp", caddr);
|
||||
|
||||
writeToWaveform(&wfaddr, 4, 1., 2., 3., 4.);
|
||||
|
||||
dbScanLock(caddr.precord);
|
||||
dbProcess(caddr.precord);
|
||||
|
||||
checkArrD("comp", 2, 1.5, 3.5, 0, 0);
|
||||
dbScanUnlock(caddr.precord);
|
||||
|
||||
testIocShutdownOk();
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
void
|
||||
testNto1AveragePartial(void) {
|
||||
double buf = 0.0;
|
||||
@@ -517,6 +549,36 @@ testNto1AveragePartial(void) {
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
void
|
||||
testNtoMPartial(void) {
|
||||
DBADDR wfaddr, caddr;
|
||||
|
||||
testDiag("Test Average, N to M, Partial");
|
||||
|
||||
testdbPrepare();
|
||||
testdbReadDatabase("recTestIoc.dbd", NULL, NULL);
|
||||
recTestIoc_registerRecordDeviceDriver(pdbbase);
|
||||
testdbReadDatabase("compressTest.db", NULL, "INP=wf,ALG=N to 1 Average,BALG=FIFO Buffer,NSAM=2,N=3,PBUF=YES");
|
||||
|
||||
eltc(0);
|
||||
testIocInitOk();
|
||||
eltc(1);
|
||||
|
||||
fetchRecordOrDie("wf", wfaddr);
|
||||
fetchRecordOrDie("comp", caddr);
|
||||
|
||||
writeToWaveform(&wfaddr, 4, 1., 2., 3., 4.);
|
||||
|
||||
dbScanLock(caddr.precord);
|
||||
dbProcess(caddr.precord);
|
||||
|
||||
checkArrD("comp", 2, 2.0, 4.0, 0, 0);
|
||||
dbScanUnlock(caddr.precord);
|
||||
|
||||
testIocShutdownOk();
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
void
|
||||
testNto1LowValue(void) {
|
||||
double buf = 0.0;
|
||||
@@ -634,12 +696,14 @@ testAIAveragePartial(void) {
|
||||
|
||||
MAIN(compressTest)
|
||||
{
|
||||
testPlan(132);
|
||||
testPlan(134);
|
||||
testFIFOCirc();
|
||||
testLIFOCirc();
|
||||
testArrayAverage();
|
||||
testNto1Average();
|
||||
testNto2Average();
|
||||
testNto1AveragePartial();
|
||||
testNtoMPartial();
|
||||
testAIAveragePartial();
|
||||
testNto1LowValue();
|
||||
return testDone();
|
||||
|
||||
Submodule modules/normativeTypes updated: 7a2d264f2c...1250a3c236
Submodule modules/pvAccess updated: 7746ea3c6c...96061ca1cc
Submodule modules/pvData updated: 7300e6b0bd...0ef8a36172
Submodule modules/pvDatabase updated: d18e0c913a...e4cb8d2397
Submodule modules/pva2pva updated: 949b3f63c2...3a08da445b
Submodule modules/pvaClient updated: 8ed07fef96...a34876e36a
Reference in New Issue
Block a user