replace dbDefs.h eefinitions with menu definitions
Fix OMSL bug reported by Andy Foster
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
#include "recSup.h"
|
||||
#include "recGbl.h"
|
||||
#include "menuConvert.h"
|
||||
#include "menuOmsl.h"
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "aoRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
@@ -231,7 +232,7 @@ static long process(pao)
|
||||
/* fetch value and convert*/
|
||||
if (pao->pact == FALSE) {
|
||||
if ((pao->dol.type != CONSTANT)
|
||||
&& (pao->omsl == CLOSED_LOOP)) {
|
||||
&& (pao->omsl == menuOmslclosed_loop)) {
|
||||
status = fetch_value(pao, &value);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
#include "boRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
#include "menuIvoa.h"
|
||||
#include "menuOmsl.h"
|
||||
|
||||
/* Create RSET - Record Support Entry Table*/
|
||||
#define report NULL
|
||||
@@ -241,7 +242,7 @@ static long process(pbo)
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (!pbo->pact) {
|
||||
if ((pbo->dol.type != CONSTANT) && (pbo->omsl == CLOSED_LOOP)){
|
||||
if ((pbo->dol.type != CONSTANT) && (pbo->omsl == menuOmslclosed_loop)){
|
||||
unsigned short val;
|
||||
|
||||
pbo->pact = TRUE;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "recSup.h"
|
||||
#include "recGbl.h"
|
||||
#include "special.h"
|
||||
#include "menuOmsl.h"
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "dfanoutRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
@@ -97,7 +98,9 @@ static long process(struct dfanoutRecord *pdfanout)
|
||||
{
|
||||
long status=0;
|
||||
|
||||
if (!pdfanout->pact && pdfanout->omsl == CLOSED_LOOP){
|
||||
if (!pdfanout->pact
|
||||
&& (pdfanout->dol.type != CONSTANT)
|
||||
&& (pdfanout->omsl == menuOmslclosed_loop)){
|
||||
status = dbGetLink(&(pdfanout->dol),DBR_DOUBLE,&(pdfanout->val),0,0);
|
||||
if(pdfanout->dol.type!=CONSTANT && RTN_SUCCESS(status))
|
||||
pdfanout->udf=FALSE;
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "longoutRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
#include "menuIvoa.h"
|
||||
#include "menuOmsl.h"
|
||||
|
||||
/* Create RSET - Record Support Entry Table*/
|
||||
#define report NULL
|
||||
@@ -162,7 +163,8 @@ static long process(plongout)
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (!plongout->pact) {
|
||||
if (plongout->omsl == CLOSED_LOOP) {
|
||||
if((plongout->dol.type != CONSTANT)
|
||||
&& (plongout->omsl == menuOmslclosed_loop)) {
|
||||
status = dbGetLink(&(plongout->dol),DBR_LONG,
|
||||
&value,0,0);
|
||||
if (plongout->dol.type!=CONSTANT && RTN_SUCCESS(status))
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "mbboDirectRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
#include <menuIvoa.h>
|
||||
#include "menuOmsl.h"
|
||||
#include "menuIvoa.h"
|
||||
|
||||
/* Create RSET - Record Support Entry Table*/
|
||||
#define report NULL
|
||||
@@ -174,7 +175,7 @@ static long process(pmbboDirect)
|
||||
}
|
||||
|
||||
if (!pmbboDirect->pact) {
|
||||
if(pmbboDirect->dol.type!=CONSTANT && pmbboDirect->omsl==CLOSED_LOOP){
|
||||
if(pmbboDirect->dol.type!=CONSTANT && pmbboDirect->omsl==menuOmslclosed_loop){
|
||||
long status;
|
||||
unsigned short val;
|
||||
|
||||
@@ -194,7 +195,7 @@ static long process(pmbboDirect)
|
||||
}
|
||||
if(pmbboDirect->nsev < INVALID_ALARM
|
||||
&& pmbboDirect->sevr == INVALID_ALARM
|
||||
&& pmbboDirect->omsl == SUPERVISORY) {
|
||||
&& pmbboDirect->omsl == menuOmslsupervisory) {
|
||||
/* reload value field with B0 - B15 */
|
||||
int offset = 1, i;
|
||||
unsigned char *bit = &(pmbboDirect->b0);
|
||||
@@ -261,7 +262,7 @@ static long special(paddr,after)
|
||||
* offset equals the offset in bit array. Only do
|
||||
* this if in supervisory mode.
|
||||
*/
|
||||
if (pmbboDirect->omsl == CLOSED_LOOP)
|
||||
if (pmbboDirect->omsl == menuOmslclosed_loop)
|
||||
return(0);
|
||||
|
||||
offset = 1 << (((int)paddr->pfield) - ((int) &(pmbboDirect->b0)));
|
||||
@@ -284,7 +285,7 @@ static long special(paddr,after)
|
||||
* reload value field with B0 - B15
|
||||
*/
|
||||
bit = &(pmbboDirect->b0);
|
||||
if (pmbboDirect->omsl == SUPERVISORY) {
|
||||
if (pmbboDirect->omsl == menuOmslsupervisory) {
|
||||
for (i=0; i<NUM_BITS; i++, offset = offset << 1, bit++) {
|
||||
if (*bit)
|
||||
pmbboDirect->val |= offset;
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "mbboRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
#include "menuOmsl.h"
|
||||
#include "menuIvoa.h"
|
||||
|
||||
/* Create RSET - Record Support Entry Table*/
|
||||
@@ -241,7 +242,7 @@ static long process(pmbbo)
|
||||
}
|
||||
|
||||
if (!pmbbo->pact) {
|
||||
if (pmbbo->dol.type != CONSTANT && pmbbo->omsl == CLOSED_LOOP) {
|
||||
if (pmbbo->dol.type != CONSTANT && pmbbo->omsl == menuOmslclosed_loop) {
|
||||
long status;
|
||||
unsigned short val;
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "stringoutRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
#include "menuOmsl.h"
|
||||
#include "menuIvoa.h"
|
||||
|
||||
/* Create RSET - Record Support Entry Table*/
|
||||
@@ -162,7 +163,9 @@ static long process(pstringout)
|
||||
recGblRecordError(S_dev_missingSup,(void *)pstringout,"write_stringout");
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (!pstringout->pact && pstringout->omsl == CLOSED_LOOP){
|
||||
if (!pstringout->pact
|
||||
&& (pstringout->dol.type != CONSTANT)
|
||||
&& (pstringout->omsl == menuOmslclosed_loop)) {
|
||||
status = dbGetLink(&(pstringout->dol),
|
||||
DBR_STRING,pstringout->val,0,0);
|
||||
if(pstringout->dol.type!=CONSTANT && RTN_SUCCESS(status)) pstringout->udf=FALSE;
|
||||
|
||||
Reference in New Issue
Block a user