mirror of
https://github.com/stargieg/bacnet-stack
synced 2025-10-26 23:35:52 +08:00
fix COV
This commit is contained in:
parent
fe5c287921
commit
bcb5cb44d3
|
|
@ -301,6 +301,8 @@ void Analog_Input_Init(
|
||||||
}
|
}
|
||||||
AI_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
AI_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
||||||
(char **) NULL);
|
(char **) NULL);
|
||||||
|
AI_Descr[i].Prior_Value = strtof(ucivalue,
|
||||||
|
(char **) NULL);
|
||||||
|
|
||||||
AI_Descr[i].Relinquish_Default = 0; //TODO read uci
|
AI_Descr[i].Relinquish_Default = 0; //TODO read uci
|
||||||
|
|
||||||
|
|
@ -548,7 +550,14 @@ void Analog_Input_Change_Of_Value_Clear(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns true if value has changed */
|
/**
|
||||||
|
* For a given object instance-number, loads the value_list with the COV data.
|
||||||
|
*
|
||||||
|
* @param object_instance - object-instance number of the object
|
||||||
|
* @param value_list - list of COV data
|
||||||
|
*
|
||||||
|
* @return true if the value list is encoded
|
||||||
|
*/
|
||||||
bool Analog_Input_Encode_Value_List(
|
bool Analog_Input_Encode_Value_List(
|
||||||
uint32_t object_instance,
|
uint32_t object_instance,
|
||||||
BACNET_PROPERTY_VALUE * value_list)
|
BACNET_PROPERTY_VALUE * value_list)
|
||||||
|
|
@ -621,7 +630,7 @@ void Analog_Input_COV_Increment_Set(
|
||||||
index = Analog_Input_Instance_To_Index(object_instance);
|
index = Analog_Input_Instance_To_Index(object_instance);
|
||||||
CurrentAI = &AI_Descr[index];
|
CurrentAI = &AI_Descr[index];
|
||||||
CurrentAI->COV_Increment = value;
|
CurrentAI->COV_Increment = value;
|
||||||
Analog_Input_COV_Detect(index, Analog_Input_Present_Value(index));
|
Analog_Input_COV_Detect(object_instance, Analog_Input_Present_Value(object_instance));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -698,7 +707,7 @@ bool Analog_Input_Present_Value_Set(
|
||||||
if (priority == 8) {
|
if (priority == 8) {
|
||||||
CurrentAI->Priority_Array[15] = value;
|
CurrentAI->Priority_Array[15] = value;
|
||||||
}
|
}
|
||||||
Analog_Input_COV_Detect(index, value);
|
Analog_Input_COV_Detect(object_instance, Analog_Input_Present_Value(object_instance));
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,9 @@ void Analog_Output_Init(
|
||||||
AO_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
AO_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
||||||
(char **) NULL);
|
(char **) NULL);
|
||||||
|
|
||||||
|
AO_Descr[i].Prior_Value = strtof(ucivalue,
|
||||||
|
(char **) NULL);
|
||||||
|
|
||||||
AO_Descr[i].Relinquish_Default = 0; //TODO read uci
|
AO_Descr[i].Relinquish_Default = 0; //TODO read uci
|
||||||
|
|
||||||
ucicov_increment = ucix_get_option(ctx, "bacnet_ao", idx_c,
|
ucicov_increment = ucix_get_option(ctx, "bacnet_ao", idx_c,
|
||||||
|
|
@ -549,7 +552,14 @@ void Analog_Output_Change_Of_Value_Clear(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns true if value has changed */
|
/**
|
||||||
|
* For a given object instance-number, loads the value_list with the COV data.
|
||||||
|
*
|
||||||
|
* @param object_instance - object-instance number of the object
|
||||||
|
* @param value_list - list of COV data
|
||||||
|
*
|
||||||
|
* @return true if the value list is encoded
|
||||||
|
*/
|
||||||
bool Analog_Output_Encode_Value_List(
|
bool Analog_Output_Encode_Value_List(
|
||||||
uint32_t object_instance,
|
uint32_t object_instance,
|
||||||
BACNET_PROPERTY_VALUE * value_list)
|
BACNET_PROPERTY_VALUE * value_list)
|
||||||
|
|
@ -622,7 +632,7 @@ void Analog_Output_COV_Increment_Set(
|
||||||
index = Analog_Output_Instance_To_Index(object_instance);
|
index = Analog_Output_Instance_To_Index(object_instance);
|
||||||
CurrentAO = &AO_Descr[index];
|
CurrentAO = &AO_Descr[index];
|
||||||
CurrentAO->COV_Increment = value;
|
CurrentAO->COV_Increment = value;
|
||||||
Analog_Output_COV_Detect(index, Analog_Output_Present_Value(index));
|
Analog_Output_COV_Detect(object_instance, Analog_Output_Present_Value(object_instance));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -699,7 +709,7 @@ bool Analog_Output_Present_Value_Set(
|
||||||
if (priority == 8) {
|
if (priority == 8) {
|
||||||
CurrentAO->Priority_Array[15] = value;
|
CurrentAO->Priority_Array[15] = value;
|
||||||
}
|
}
|
||||||
Analog_Output_COV_Detect(index, Analog_Output_Present_Value(index));
|
Analog_Output_COV_Detect(object_instance, Analog_Output_Present_Value(object_instance));
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -727,7 +737,7 @@ bool Analog_Output_Present_Value_Relinquish(
|
||||||
However, if Out of Service is TRUE, then don't set the
|
However, if Out of Service is TRUE, then don't set the
|
||||||
physical output. This comment may apply to the
|
physical output. This comment may apply to the
|
||||||
main loop (i.e. check out of service before changing output) */
|
main loop (i.e. check out of service before changing output) */
|
||||||
Analog_Output_COV_Detect(index, Analog_Output_Present_Value(index));
|
Analog_Output_COV_Detect(object_instance, Analog_Output_Present_Value(object_instance));
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,9 @@ void Analog_Value_Init(
|
||||||
AV_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
AV_Descr[i].Priority_Array[15] = strtof(ucivalue,
|
||||||
(char **) NULL);
|
(char **) NULL);
|
||||||
|
|
||||||
|
AV_Descr[i].Prior_Value = strtof(ucivalue,
|
||||||
|
(char **) NULL);
|
||||||
|
|
||||||
AV_Descr[i].Relinquish_Default = 0; //TODO read uci
|
AV_Descr[i].Relinquish_Default = 0; //TODO read uci
|
||||||
|
|
||||||
ucicov_increment = ucix_get_option(ctx, "bacnet_av", idx_c,
|
ucicov_increment = ucix_get_option(ctx, "bacnet_av", idx_c,
|
||||||
|
|
@ -592,7 +595,7 @@ void Analog_Value_COV_Increment_Set(
|
||||||
index = Analog_Value_Instance_To_Index(object_instance);
|
index = Analog_Value_Instance_To_Index(object_instance);
|
||||||
CurrentAV = &AV_Descr[index];
|
CurrentAV = &AV_Descr[index];
|
||||||
CurrentAV->COV_Increment = value;
|
CurrentAV->COV_Increment = value;
|
||||||
Analog_Value_COV_Detect(index, Analog_Value_Present_Value(index));
|
Analog_Value_COV_Detect(object_instance, Analog_Value_Present_Value(object_instance));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -668,7 +671,7 @@ bool Analog_Value_Present_Value_Set(
|
||||||
if (priority == 8) {
|
if (priority == 8) {
|
||||||
CurrentAV->Priority_Array[15] = value;
|
CurrentAV->Priority_Array[15] = value;
|
||||||
}
|
}
|
||||||
Analog_Value_COV_Detect(index, Analog_Value_Present_Value(index));
|
Analog_Value_COV_Detect(object_instance, Analog_Value_Present_Value(object_instance));
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -696,7 +699,7 @@ bool Analog_Value_Present_Value_Relinquish(
|
||||||
However, if Out of Service is TRUE, then don't set the
|
However, if Out of Service is TRUE, then don't set the
|
||||||
physical output. This comment may apply to the
|
physical output. This comment may apply to the
|
||||||
main loop (i.e. check out of service before changing output) */
|
main loop (i.e. check out of service before changing output) */
|
||||||
Analog_Value_COV_Detect(index, Analog_Value_Present_Value(index));
|
Analog_Value_COV_Detect(object_instance, Analog_Value_Present_Value(object_instance));
|
||||||
status = true;
|
status = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user