Added API to output objects for priority-array property value inspection. (#1096)
This commit is contained in:
@@ -367,6 +367,48 @@ bool Analog_Output_Present_Value_Relinquish(
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determine if a priority-array slot is relinquished
|
||||
* @param object_instance [in] BACnet network port object instance number
|
||||
* @param priority - priority-array index value 1..16
|
||||
* @return true if the priority-array slot is relinquished
|
||||
*/
|
||||
bool Analog_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
if (pObject->Relinquished[priority - 1]) {
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the priority-array value from its slot
|
||||
* @param object_instance [in] BACnet network port object instance number
|
||||
* @param priority - priority-array index value 1..16
|
||||
* @return priority-array value from its slot
|
||||
*/
|
||||
float Analog_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
float real_value = 0.0f;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
real_value = pObject->Priority_Array[priority - 1];
|
||||
}
|
||||
|
||||
return real_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, writes the present-value to the
|
||||
* remote node
|
||||
|
||||
Reference in New Issue
Block a user