Added API to output objects for priority-array property value inspection. (#1096)
This commit is contained in:
@@ -22,6 +22,8 @@ The git repositories are hosted at the following sites:
|
||||
|
||||
### Added
|
||||
|
||||
* Added API to output objects for priority-array property value
|
||||
inspection. (#1096)
|
||||
* Added lighting command refresh from tracking value API. (#1094)
|
||||
* Added MS/TP statistics counters for BadCRC and Poll-For-Master. (#1081)
|
||||
* Added Lighting Output API to implement override for HOA control.
|
||||
@@ -115,6 +117,8 @@ The git repositories are hosted at the following sites:
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed CMake Error in libwebsocket: Compatibility with CMake < 3.5 has
|
||||
been removed from CMake (#1095)
|
||||
* Fixed Lighting Output Relinquish values. (#1094)
|
||||
* Fixed copied code that no longer needs static function scope variables
|
||||
for text names. (#1092)
|
||||
|
||||
@@ -201,6 +201,52 @@ bool Access_Door_Present_Value_Set(
|
||||
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 Access_Door_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
bool status = false;
|
||||
unsigned index = 0;
|
||||
|
||||
index = Access_Door_Instance_To_Index(object_instance);
|
||||
if (index < MAX_ACCESS_DOORS) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
if (!ad_descr[index].value_active[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
|
||||
*/
|
||||
BACNET_DOOR_VALUE
|
||||
Access_Door_Priority_Array_Value(uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
BACNET_DOOR_VALUE value = DOOR_VALUE_LOCK;
|
||||
unsigned index = 0;
|
||||
|
||||
index = Access_Door_Instance_To_Index(object_instance);
|
||||
if (index < MAX_ACCESS_DOORS) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
value = ad_descr[index].priority_array[priority - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
bool Access_Door_Present_Value_Relinquish(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
|
||||
@@ -61,6 +61,14 @@ unsigned Access_Door_Present_Value_Priority(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Access_Door_Present_Value_Set(
|
||||
uint32_t object_instance, BACNET_DOOR_VALUE value, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Access_Door_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_DOOR_VALUE
|
||||
Access_Door_Priority_Array_Value(uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Access_Door_Present_Value_Relinquish(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,6 +59,13 @@ BACNET_STACK_EXPORT
|
||||
void Analog_Output_Write_Present_Value_Callback_Set(
|
||||
analog_output_write_present_value_callback cb);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Analog_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
float Analog_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
float Analog_Output_Relinquish_Default(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
@@ -688,6 +688,53 @@ static bool Binary_Lighting_Output_Present_Value_Write(
|
||||
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 Binary_Lighting_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 (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
if (!Priority_Array_Active(pObject, priority - 1)) {
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, determines the
|
||||
* priority-array value
|
||||
* @param object_instance - object-instance number
|
||||
* @param priority - priority-array index value 1..16
|
||||
* @return priority-array value of the object
|
||||
*/
|
||||
BACNET_BINARY_LIGHTING_PV Binary_Lighting_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
BACNET_BINARY_LIGHTING_PV value = BINARY_LIGHTING_PV_STOP;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
value = pObject->Priority_Array[priority - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given object instance-number, relinquishes the present-value
|
||||
* at a given priority 1..16.
|
||||
|
||||
@@ -63,6 +63,14 @@ bool Binary_Lighting_Output_Present_Value_Set(
|
||||
uint32_t object_instance,
|
||||
BACNET_BINARY_LIGHTING_PV value,
|
||||
unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Lighting_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_BINARY_LIGHTING_PV Binary_Lighting_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Lighting_Output_Present_Value_Relinquish(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
@@ -317,6 +317,50 @@ bool Binary_Output_Present_Value_Set(
|
||||
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 Binary_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 (!BIT_CHECK(pObject->Priority_Active_Bits, 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
|
||||
*/
|
||||
BACNET_BINARY_PV
|
||||
Binary_Output_Priority_Array_Value(uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
BACNET_BINARY_PV value = BINARY_INACTIVE;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
if (BIT_CHECK(pObject->Priority_Array, priority - 1)) {
|
||||
value = BINARY_ACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given object instance-number, relinquishes the present-value
|
||||
* at a given priority 1..16.
|
||||
|
||||
@@ -74,6 +74,14 @@ BACNET_BINARY_PV Binary_Output_Present_Value(uint32_t instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Present_Value_Set(
|
||||
uint32_t instance, BACNET_BINARY_PV binary_value, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_BINARY_PV
|
||||
Binary_Output_Priority_Array_Value(uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Binary_Output_Present_Value_Relinquish(
|
||||
uint32_t instance, unsigned priority);
|
||||
|
||||
@@ -875,6 +875,53 @@ static bool Lighting_Output_Present_Value_Write(
|
||||
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 Lighting_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 (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
if (!Priority_Array_Active(pObject, priority - 1)) {
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, determines the
|
||||
* priority-array value
|
||||
* @param object_instance - object-instance number
|
||||
* @param priority - priority-array index value 1..16
|
||||
* @return priority-array value of the object
|
||||
*/
|
||||
float Lighting_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
float value = 0.0f;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
value = pObject->Priority_Array[priority - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given object instance-number, relinquishes the present-value
|
||||
* at a given priority 1..16.
|
||||
|
||||
@@ -42,6 +42,14 @@ unsigned Lighting_Output_Present_Value_Priority(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Lighting_Output_Present_Value_Set(
|
||||
uint32_t object_instance, float value, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Lighting_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
float Lighting_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Lighting_Output_Present_Value_Relinquish(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
@@ -447,6 +447,52 @@ bool Multistate_Output_Present_Value_Set(
|
||||
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 Multistate_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 (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
status = pObject->Relinquished[priority - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, determines the
|
||||
* priority-array value
|
||||
* @param object_instance - object-instance number
|
||||
* @param priority - priority-array index value 1..16
|
||||
* @return priority-array value of the object, or 0 if
|
||||
* object not found, or priority out of range, or relinquished
|
||||
*/
|
||||
uint32_t Multistate_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority)
|
||||
{
|
||||
uint32_t value = 0;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY)) {
|
||||
value = pObject->Priority_Array[priority - 1];
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, relinquishes the present-value
|
||||
* @param object_instance - object-instance number of the object
|
||||
|
||||
@@ -62,6 +62,14 @@ uint32_t Multistate_Output_Present_Value(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Multistate_Output_Present_Value_Set(
|
||||
uint32_t object_instance, uint32_t value, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Multistate_Output_Priority_Array_Relinquished(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t Multistate_Output_Priority_Array_Value(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Multistate_Output_Present_Value_Relinquish(
|
||||
uint32_t instance, unsigned priority);
|
||||
|
||||
Reference in New Issue
Block a user