Added a context variable in basic object data structure and API to get or set the context pointer. (#1111)

This commit is contained in:
Steve Karg
2025-09-26 13:19:58 -05:00
committed by GitHub
parent d91282be16
commit 2416157351
52 changed files with 997 additions and 8 deletions
+32
View File
@@ -1725,6 +1725,38 @@ int Analog_Value_Alarm_Summary(
}
#endif /* defined(INTRINSIC_REPORTING) */
/**
* @brief Set the context used with a specific object instance
* @param object_instance [in] BACnet object instance number
* @param context [in] pointer to the context
*/
void *Analog_Value_Context_Get(uint32_t object_instance)
{
struct analog_value_descr *pObject;
pObject = Keylist_Data(Object_List, object_instance);
if (pObject) {
return pObject->Context;
}
return NULL;
}
/**
* @brief Set the context used with a specific object instance
* @param object_instance [in] BACnet object instance number
* @param context [in] pointer to the context
*/
void Analog_Value_Context_Set(uint32_t object_instance, void *context)
{
struct analog_value_descr *pObject;
pObject = Keylist_Data(Object_List, object_instance);
if (pObject) {
pObject->Context = context;
}
}
/**
* @brief Creates a Analog Value object
* @param object_instance - object-instance number of the object