Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/*************************************************************************\ | ||
* Copyright (c) 2020 Gabriel Fedel | ||
* EPICS BASE is distributed subject to a Software License Agreement found | ||
* in file LICENSE that is included with this distribution. | ||
\*************************************************************************/ | ||
|
||
#include "dbUnitTest.h" | ||
#include "testMain.h" | ||
#include "errlog.h" | ||
#include "dbAccess.h" | ||
#include <epicsThread.h> | ||
|
||
void recTestIoc_registerRecordDeviceDriver(struct dbBase *); | ||
|
||
/* | ||
* This test verifies the behavior of seq using Specified for SELM | ||
* The behavior should be the same for all the DOLx | ||
* */ | ||
static | ||
void testSeqSpecified(void){ | ||
int i; | ||
for (i=0; i < 16; i++) { | ||
testdbPutFieldOk("seq0.SELN", DBR_USHORT, i); | ||
|
||
testdbPutFieldOk("ai0", DBR_LONG, 0); | ||
|
||
testdbPutFieldOk("seq0.PROC", DBR_USHORT, 1); | ||
|
||
testSyncCallback(); | ||
testdbGetFieldEqual("ai0", DBR_LONG, i+1); | ||
} | ||
} | ||
|
||
|
||
MAIN(eventTest) { | ||
testPlan(4*16); | ||
|
||
testdbPrepare(); | ||
|
||
testdbReadDatabase("recTestIoc.dbd", NULL, NULL); | ||
recTestIoc_registerRecordDeviceDriver(pdbbase); | ||
|
||
testdbReadDatabase("seqTest.db", NULL, NULL); | ||
|
||
eltc(0); | ||
testIocInitOk(); | ||
eltc(1); | ||
|
||
testSeqSpecified(); | ||
|
||
testIocShutdownOk(); | ||
testdbCleanup(); | ||
|
||
return testDone(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
record(seq, "seq0"){ | ||
field(SELM, "Specified") | ||
field(DOL0, "1") | ||
field(DOL1, "2") | ||
field(DOL2, "3") | ||
field(DOL3, "4") | ||
field(DOL4, "5") | ||
field(DOL5, "6") | ||
field(DOL6, "7") | ||
field(DOL7, "8") | ||
field(DOL8, "9") | ||
field(DOL9, "10") | ||
field(DOLA, "11") | ||
field(DOLB, "12") | ||
field(DOLC, "13") | ||
field(DOLD, "14") | ||
field(DOLE, "15") | ||
field(DOLF, "16") | ||
field(LNK0, "ai0") | ||
field(LNK1, "ai0") | ||
field(LNK2, "ai0") | ||
field(LNK3, "ai0") | ||
field(LNK4, "ai0") | ||
field(LNK5, "ai0") | ||
field(LNK6, "ai0") | ||
field(LNK7, "ai0") | ||
field(LNK8, "ai0") | ||
field(LNK9, "ai0") | ||
field(LNKA, "ai0") | ||
field(LNKB, "ai0") | ||
field(LNKC, "ai0") | ||
field(LNKD, "ai0") | ||
field(LNKE, "ai0") | ||
field(LNKF, "ai0") | ||
|
||
} | ||
record(ai, "ai0"){ | ||
} | ||
|