Added APST and MPST fields that control whether monitors are fired if the
new string is identical to the old one. Default value is "On Change" with behaviour identical to before, set to "Always" to fire monitors every time the record is processed (analagous to setting MDEL=-1 for numeric record types).
This commit is contained in:
@@ -163,6 +163,10 @@ static void monitor(pstringin)
|
||||
monitor_mask |= DBE_VALUE|DBE_LOG;
|
||||
strncpy(pstringin->oval,pstringin->val,sizeof(pstringin->val));
|
||||
}
|
||||
if (pstringin->mpst == stringinPOST_Always)
|
||||
monitor_mask |= DBE_VALUE;
|
||||
if (pstringin->apst == stringinPOST_Always)
|
||||
monitor_mask |= DBE_LOG;
|
||||
if(monitor_mask)
|
||||
db_post_events(pstringin,&(pstringin->val[0]),monitor_mask);
|
||||
return;
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
menu(stringinPOST) {
|
||||
choice(stringinPOST_OnChange,"On Change")
|
||||
choice(stringinPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringin) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
@@ -27,6 +31,18 @@ recordtype(stringin) {
|
||||
promptgroup(GUI_INPUTS)
|
||||
interest(1)
|
||||
}
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
interest(1)
|
||||
menu(stringinPOST)
|
||||
}
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
|
||||
@@ -194,6 +194,10 @@ static void monitor(pstringout)
|
||||
monitor_mask |= DBE_VALUE|DBE_LOG;
|
||||
strncpy(pstringout->oval,pstringout->val,sizeof(pstringout->val));
|
||||
}
|
||||
if (pstringout->mpst == stringoutPOST_Always)
|
||||
monitor_mask |= DBE_VALUE;
|
||||
if (pstringout->apst == stringoutPOST_Always)
|
||||
monitor_mask |= DBE_LOG;
|
||||
if(monitor_mask)
|
||||
db_post_events(pstringout,&(pstringout->val[0]),monitor_mask);
|
||||
return;
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
menu(stringoutPOST) {
|
||||
choice(stringoutPOST_OnChange,"On Change")
|
||||
choice(stringoutPOST_Always,"Always")
|
||||
}
|
||||
recordtype(stringout) {
|
||||
include "dbCommon.dbd"
|
||||
field(VAL,DBF_STRING) {
|
||||
@@ -38,6 +42,18 @@ recordtype(stringout) {
|
||||
promptgroup(GUI_OUTPUT)
|
||||
interest(1)
|
||||
}
|
||||
field(MPST,DBF_MENU) {
|
||||
prompt("Post Value Monitors")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
field(APST,DBF_MENU) {
|
||||
prompt("Post Archive Monitors")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
interest(1)
|
||||
menu(stringoutPOST)
|
||||
}
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
|
||||
Reference in New Issue
Block a user