1
0
mirror of https://github.com/stargieg/bacnet-stack synced 2025-10-26 23:35:52 +08:00

fix cov handling Changed

This commit is contained in:
Patrick Grimm 2018-04-12 17:20:58 +02:00
parent ba42aacd77
commit 309f03d22f
6 changed files with 20 additions and 1 deletions

View File

@ -805,6 +805,7 @@ bool Binary_Input_Present_Value_Set(
CurrentBI = &BI_Descr[index];
CurrentBI->Present_Value = (uint8_t) value;
CurrentBI->Priority_Array[priority - 1] = (uint8_t) value;
CurrentBI->Changed = true;
status = true;
}
return status;
@ -841,6 +842,7 @@ bool Binary_Input_Polarity_Set(
index = Binary_Input_Instance_To_Index(object_instance);
CurrentBI = &BI_Descr[index];
CurrentBI->Polarity=polarity;
CurrentBI->Changed = true;
sprintf(idx_cc,"%d",index);
idx_c = idx_cc;
if(ctx) {

View File

@ -808,7 +808,7 @@ bool Binary_Output_Present_Value_Set(
index = Binary_Output_Instance_To_Index(object_instance);
CurrentBO = &BO_Descr[index];
if (priority && (priority <= BACNET_MAX_PRIORITY) &&
(priority != 6 /* reserved */ ) && (value > 0)) {
(priority != 6 /* reserved */ )) {
#if defined(INTRINSIC_REPORTING)
CurrentBO->Feedback_Value = (uint8_t) value;
#endif
@ -816,6 +816,7 @@ bool Binary_Output_Present_Value_Set(
if (priority == 8) {
CurrentBO->Priority_Array[15] = (uint8_t) value;
}
CurrentBO->Changed = true;
status = true;
}
}
@ -853,6 +854,7 @@ bool Binary_Output_Polarity_Set(
index = Binary_Output_Instance_To_Index(object_instance);
CurrentBO = &BO_Descr[index];
CurrentBO->Polarity=polarity;
CurrentBO->Changed = true;
sprintf(idx_cc,"%d",index);
idx_c = idx_cc;
if(ctx) {
@ -1132,6 +1134,13 @@ int Binary_Output_Read_Property(
break;
#if defined(INTRINSIC_REPORTING)
case PROP_ALARM_VALUE:
len =
encode_application_enumerated(&apdu[apdu_len],
(CurrentBO->Feedback_Value == 1) ? 0 : 1);
apdu_len += len;
break;
case PROP_FEEDBACK_VALUE:
len =
encode_application_enumerated(&apdu[apdu_len],

View File

@ -804,6 +804,7 @@ bool Binary_Value_Present_Value_Set(
CurrentBV = &BV_Descr[index];
CurrentBV->Present_Value = (uint8_t) value;
CurrentBV->Priority_Array[priority - 1] = (uint8_t) value;
CurrentBV->Changed = true;
status = true;
}
return status;
@ -840,6 +841,7 @@ bool Binary_Value_Polarity_Set(
index = Binary_Value_Instance_To_Index(object_instance);
CurrentBV = &BV_Descr[index];
CurrentBV->Polarity=polarity;
CurrentBV->Changed = true;
sprintf(idx_cc,"%d",index);
idx_c = idx_cc;
if(ctx) {

View File

@ -538,6 +538,7 @@ bool Multistate_Input_Present_Value_Set(
if (priority == 8) {
CurrentMSI->Priority_Array[15] = (uint8_t) value;
}
CurrentMSI->Changed = true;
status = true;
}
}
@ -571,6 +572,7 @@ void Multistate_Input_Out_Of_Service_Set(
index = Multistate_Input_Instance_To_Index(object_instance);
CurrentMSI = &MSI_Descr[index];
CurrentMSI->Out_Of_Service = value;
CurrentMSI->Changed = true;
}
}

View File

@ -550,6 +550,7 @@ bool Multistate_Output_Present_Value_Set(
if (priority == 8) {
CurrentMSO->Priority_Array[15] = (uint8_t) value;
}
CurrentMSO->Changed = true;
status = true;
}
}
@ -583,6 +584,7 @@ void Multistate_Output_Out_Of_Service_Set(
index = Multistate_Output_Instance_To_Index(object_instance);
CurrentMSO = &MSO_Descr[index];
CurrentMSO->Out_Of_Service = value;
CurrentMSO->Changed = true;
}
}

View File

@ -538,6 +538,7 @@ bool Multistate_Value_Present_Value_Set(
if (priority == 8) {
CurrentMSV->Priority_Array[15] = (uint8_t) value;
}
CurrentMSV->Changed = true;
status = true;
}
}
@ -571,6 +572,7 @@ void Multistate_Value_Out_Of_Service_Set(
index = Multistate_Value_Instance_To_Index(object_instance);
CurrentMSV = &MSV_Descr[index];
CurrentMSV->Out_Of_Service = value;
CurrentMSV->Changed = true;
}
}