Skip to content

Commit

Permalink
fix DBE_PROPERTY events for mbbi/mbbo records
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-zimoch committed Sep 2, 2024
1 parent c1b8831 commit 22aaded
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
9 changes: 3 additions & 6 deletions modules/database/src/std/rec/mbbiRecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,9 @@ static long special(DBADDR *paddr, int after)
return 0;
init_common(prec);
/* Note: ZRVL..FFVL are also SPC_MOD */
if (fieldIndex >= mbbiRecordZRST && fieldIndex <= mbbiRecordFFST) {
int event = DBE_PROPERTY;

if (prec->val == fieldIndex - mbbiRecordZRST)
event |= DBE_VALUE | DBE_LOG;
db_post_events(prec, &prec->val, event);
if (fieldIndex >= mbbiRecordZRST && fieldIndex <= mbbiRecordFFST
&& prec->val == fieldIndex - mbbiRecordZRST) {
db_post_events(prec, &prec->val, DBE_VALUE | DBE_LOG);
}
return 0;

Expand Down
16 changes: 16 additions & 0 deletions modules/database/src/std/rec/mbbiRecord.dbd.pod
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONST,DBF_STRING) {
prompt("One String")
Expand All @@ -284,6 +285,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TWST,DBF_STRING) {
prompt("Two String")
Expand All @@ -292,6 +294,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(THST,DBF_STRING) {
prompt("Three String")
Expand All @@ -300,6 +303,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FRST,DBF_STRING) {
prompt("Four String")
Expand All @@ -308,6 +312,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FVST,DBF_STRING) {
prompt("Five String")
Expand All @@ -316,6 +321,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SXST,DBF_STRING) {
prompt("Six String")
Expand All @@ -324,6 +330,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SVST,DBF_STRING) {
prompt("Seven String")
Expand All @@ -332,6 +339,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(EIST,DBF_STRING) {
prompt("Eight String")
Expand All @@ -340,6 +348,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(NIST,DBF_STRING) {
prompt("Nine String")
Expand All @@ -348,6 +357,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TEST,DBF_STRING) {
prompt("Ten String")
Expand All @@ -356,6 +366,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ELST,DBF_STRING) {
prompt("Eleven String")
Expand All @@ -364,6 +375,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TVST,DBF_STRING) {
prompt("Twelve String")
Expand All @@ -372,6 +384,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TTST,DBF_STRING) {
prompt("Thirteen String")
Expand All @@ -380,6 +393,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FTST,DBF_STRING) {
prompt("Fourteen String")
Expand All @@ -388,6 +402,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FFST,DBF_STRING) {
prompt("Fifteen String")
Expand All @@ -396,6 +411,7 @@ Parameters> for more on the record name (NAME) and description (DESC) fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}

=head3 Alarm Parameters
Expand Down
9 changes: 3 additions & 6 deletions modules/database/src/std/rec/mbboRecord.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,9 @@ static long special(DBADDR *paddr, int after)
return 0;
init_common(prec);
/* Note: ZRVL..FFVL are also SPC_MOD */
if (fieldIndex >= mbboRecordZRST && fieldIndex <= mbboRecordFFST) {
int event = DBE_PROPERTY;

if (prec->val == fieldIndex - mbboRecordZRST)
event |= DBE_VALUE | DBE_LOG;
db_post_events(prec, &prec->val, event);
if (fieldIndex >= mbboRecordZRST && fieldIndex <= mbboRecordFFST
&& prec->val == fieldIndex - mbboRecordZRST) {
db_post_events(prec, &prec->val, DBE_VALUE | DBE_LOG);
}
return 0;

Expand Down
16 changes: 16 additions & 0 deletions modules/database/src/std/rec/mbboRecord.dbd.pod
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ONST,DBF_STRING) {
prompt("One String")
Expand All @@ -362,6 +363,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TWST,DBF_STRING) {
prompt("Two String")
Expand All @@ -370,6 +372,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(THST,DBF_STRING) {
prompt("Three String")
Expand All @@ -378,6 +381,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FRST,DBF_STRING) {
prompt("Four String")
Expand All @@ -386,6 +390,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FVST,DBF_STRING) {
prompt("Five String")
Expand All @@ -394,6 +399,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SXST,DBF_STRING) {
prompt("Six String")
Expand All @@ -402,6 +408,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(SVST,DBF_STRING) {
prompt("Seven String")
Expand All @@ -410,6 +417,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(EIST,DBF_STRING) {
prompt("Eight String")
Expand All @@ -418,6 +426,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(NIST,DBF_STRING) {
prompt("Nine String")
Expand All @@ -426,6 +435,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TEST,DBF_STRING) {
prompt("Ten String")
Expand All @@ -434,6 +444,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ELST,DBF_STRING) {
prompt("Eleven String")
Expand All @@ -442,6 +453,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TVST,DBF_STRING) {
prompt("Twelve String")
Expand All @@ -450,6 +462,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(TTST,DBF_STRING) {
prompt("Thirteen String")
Expand All @@ -458,6 +471,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FTST,DBF_STRING) {
prompt("Fourteen String")
Expand All @@ -466,6 +480,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(FFST,DBF_STRING) {
prompt("Fifteen String")
Expand All @@ -474,6 +489,7 @@ for more information on simulation mode and its fields.
pp(TRUE)
interest(1)
size(26)
prop(YES)
}
field(ZRSV,DBF_MENU) {
prompt("State Zero Severity")
Expand Down

0 comments on commit 22aaded

Please sign in to comment.