Added a context variable in basic object data structure and API to get or set the context pointer. (#1111)
This commit is contained in:
@@ -1655,6 +1655,38 @@ int Analog_Input_Alarm_Summary(
|
|||||||
}
|
}
|
||||||
#endif /* defined(INTRINSIC_REPORTING) */
|
#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_Input_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct analog_input_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_Input_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct analog_input_descr *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Analog Input object
|
* @brief Creates a Analog Input object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ typedef struct analog_input_descr {
|
|||||||
bool Changed;
|
bool Changed;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
#if defined(INTRINSIC_REPORTING)
|
#if defined(INTRINSIC_REPORTING)
|
||||||
uint32_t Time_Delay;
|
uint32_t Time_Delay;
|
||||||
uint32_t Notification_Class;
|
uint32_t Notification_Class;
|
||||||
@@ -205,6 +206,11 @@ int Analog_Input_Alarm_Summary(
|
|||||||
unsigned index, BACNET_GET_ALARM_SUMMARY_DATA *getalarm_data);
|
unsigned index, BACNET_GET_ALARM_SUMMARY_DATA *getalarm_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Analog_Input_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Analog_Input_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Analog_Input_Create(uint32_t object_instance);
|
uint32_t Analog_Input_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct object_data {
|
|||||||
uint8_t Reliability;
|
uint8_t Reliability;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1257,6 +1258,38 @@ void Analog_Output_Write_Present_Value_Callback_Set(
|
|||||||
Analog_Output_Write_Present_Value_Callback = cb;
|
Analog_Output_Write_Present_Value_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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_Output_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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_Output_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Analog Output object
|
* @brief Creates a Analog Output object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -132,6 +132,11 @@ int Analog_Output_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Analog_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
bool Analog_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Analog_Output_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Analog_Output_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Analog_Output_Create(uint32_t object_instance);
|
uint32_t Analog_Output_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ struct object_data {
|
|||||||
int Record_Count_Total;
|
int Record_Count_Total;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1378,6 +1379,38 @@ int Audit_Log_Read_Range_By_Time(BACNET_READ_RANGE_DATA *pRequest)
|
|||||||
return apdu_len;
|
return apdu_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Audit_Log_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Audit_Log_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Audit Log object
|
* @brief Creates a Audit Log object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ BACNET_STACK_EXPORT
|
|||||||
int Audit_Log_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
int Audit_Log_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Audit_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
bool Audit_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Audit_Log_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Audit_Log_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Audit_Log_Create(uint32_t object_instance);
|
uint32_t Audit_Log_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -1725,6 +1725,38 @@ int Analog_Value_Alarm_Summary(
|
|||||||
}
|
}
|
||||||
#endif /* defined(INTRINSIC_REPORTING) */
|
#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
|
* @brief Creates a Analog Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ typedef struct analog_value_descr {
|
|||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
BACNET_RELIABILITY Reliability;
|
BACNET_RELIABILITY Reliability;
|
||||||
|
void *Context;
|
||||||
#if defined(INTRINSIC_REPORTING)
|
#if defined(INTRINSIC_REPORTING)
|
||||||
uint32_t Time_Delay;
|
uint32_t Time_Delay;
|
||||||
uint32_t Notification_Class;
|
uint32_t Notification_Class;
|
||||||
@@ -219,6 +220,11 @@ int Analog_Value_Alarm_Summary(
|
|||||||
unsigned index, BACNET_GET_ALARM_SUMMARY_DATA *getalarm_data);
|
unsigned index, BACNET_GET_ALARM_SUMMARY_DATA *getalarm_data);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Analog_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Analog_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Analog_Value_Create(uint32_t object_instance);
|
uint32_t Analog_Value_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ struct object_data {
|
|||||||
char *Object_Name;
|
char *Object_Name;
|
||||||
char *Pathname;
|
char *Pathname;
|
||||||
char *File_Type;
|
char *File_Type;
|
||||||
|
void *Context;
|
||||||
BACNET_DATE_TIME Modification_Date;
|
BACNET_DATE_TIME Modification_Date;
|
||||||
bool File_Access_Stream : 1;
|
bool File_Access_Stream : 1;
|
||||||
bool Read_Only : 1;
|
bool Read_Only : 1;
|
||||||
@@ -1148,6 +1149,38 @@ bool bacfile_read_ack_record_data(
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *bacfile_create_context_get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 bacfile_create_context_set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a File object
|
* @brief Creates a File object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ void bacfile_file_size_callback_set(size_t (*callback)(const char *));
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void bacfile_file_size_set_callback_set(bool (*callback)(const char *, size_t));
|
void bacfile_file_size_set_callback_set(bool (*callback)(const char *, size_t));
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *bacfile_context_get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void bacfile_context_set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t bacfile_create(uint32_t object_instance);
|
uint32_t bacfile_create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ struct object_data {
|
|||||||
const char *Active_Text;
|
const char *Active_Text;
|
||||||
const char *Inactive_Text;
|
const char *Inactive_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
#if defined(INTRINSIC_REPORTING) && (BINARY_INPUT_INTRINSIC_REPORTING)
|
#if defined(INTRINSIC_REPORTING) && (BINARY_INPUT_INTRINSIC_REPORTING)
|
||||||
uint32_t Time_Delay;
|
uint32_t Time_Delay;
|
||||||
uint32_t Notification_Class;
|
uint32_t Notification_Class;
|
||||||
@@ -1285,6 +1286,38 @@ void Binary_Input_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Binary_Input_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Binary_Input_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Binary Input object
|
* Creates a Binary Input object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -127,6 +127,11 @@ void Binary_Input_Write_Enable(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Binary_Input_Write_Disable(uint32_t instance);
|
void Binary_Input_Write_Disable(uint32_t instance);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Binary_Input_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Binary_Input_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Binary_Input_Create(uint32_t object_instance);
|
uint32_t Binary_Input_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ struct object_data {
|
|||||||
BACNET_RELIABILITY Reliability;
|
BACNET_RELIABILITY Reliability;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -789,6 +790,38 @@ void BitString_Value_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *BitString_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 BitString_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a BitString Value object
|
* Creates a BitString Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -107,6 +107,11 @@ void BitString_Value_Write_Enable(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void BitString_Value_Write_Disable(uint32_t instance);
|
void BitString_Value_Write_Disable(uint32_t instance);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *BitString_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void BitString_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t BitString_Value_Create(uint32_t object_instance);
|
uint32_t BitString_Value_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
/* object property values */
|
/* object property values */
|
||||||
struct object_data {
|
struct object_data {
|
||||||
|
void *Context;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
BACNET_RELIABILITY Reliability;
|
BACNET_RELIABILITY Reliability;
|
||||||
@@ -1517,6 +1518,38 @@ void Binary_Lighting_Output_Blink_Warn_Callback_Set(
|
|||||||
Binary_Lighting_Output_Blink_Warn_Callback = cb;
|
Binary_Lighting_Output_Blink_Warn_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Binary_Lighting_Output_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Binary_Lighting_Output_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Color object
|
* @brief Creates a Color object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -154,6 +154,12 @@ BACNET_STACK_EXPORT
|
|||||||
void Binary_Lighting_Output_Blink_Warn_Callback_Set(
|
void Binary_Lighting_Output_Blink_Warn_Callback_Set(
|
||||||
binary_lighting_output_blink_warn_callback cb);
|
binary_lighting_output_blink_warn_callback cb);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Binary_Lighting_Output_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Binary_Lighting_Output_Context_Set(
|
||||||
|
uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Binary_Lighting_Output_Create(uint32_t object_instance);
|
uint32_t Binary_Lighting_Output_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct object_data {
|
|||||||
const char *Active_Text;
|
const char *Active_Text;
|
||||||
const char *Inactive_Text;
|
const char *Inactive_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1242,6 +1243,38 @@ void Binary_Output_Write_Present_Value_Callback_Set(
|
|||||||
Binary_Output_Write_Present_Value_Callback = cb;
|
Binary_Output_Write_Present_Value_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Binary_Output_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Binary_Output_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Binary Output object
|
* @brief Creates a Binary Output object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ int Binary_Output_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
bool Binary_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Binary_Output_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Binary_Output_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Binary_Output_Create(uint32_t object_instance);
|
uint32_t Binary_Output_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ struct object_data {
|
|||||||
const char *Active_Text;
|
const char *Active_Text;
|
||||||
const char *Inactive_Text;
|
const char *Inactive_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
#if defined(INTRINSIC_REPORTING) && (BINARY_VALUE_INTRINSIC_REPORTING)
|
#if defined(INTRINSIC_REPORTING) && (BINARY_VALUE_INTRINSIC_REPORTING)
|
||||||
uint32_t Time_Delay;
|
uint32_t Time_Delay;
|
||||||
uint32_t Notification_Class;
|
uint32_t Notification_Class;
|
||||||
@@ -1187,6 +1188,38 @@ void Binary_Value_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Binary_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Binary_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Binary Value object
|
* @brief Creates a Binary Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ const char *Binary_Value_Active_Text(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Binary_Value_Active_Text_Set(uint32_t instance, const char *new_name);
|
bool Binary_Value_Active_Text_Set(uint32_t instance, const char *new_name);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Binary_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Binary_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Binary_Value_Create(uint32_t object_instance);
|
uint32_t Binary_Value_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ struct object_data {
|
|||||||
OS_Keylist Date_List;
|
OS_Keylist Date_List;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -667,6 +668,38 @@ void Calendar_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Calendar_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Calendar_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Calendar object
|
* Creates a Calendar object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -89,6 +89,11 @@ void Calendar_Write_Enable(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Calendar_Write_Disable(uint32_t instance);
|
void Calendar_Write_Disable(uint32_t instance);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Calendar_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Calendar_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Calendar_Create(uint32_t object_instance);
|
uint32_t Calendar_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ struct object_data {
|
|||||||
uint32_t Control_Groups[CONTROL_GROUPS_MAX];
|
uint32_t Control_Groups[CONTROL_GROUPS_MAX];
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
@@ -1379,6 +1380,38 @@ void Channel_Write_Property_Internal_Callback_Set(write_property_function cb)
|
|||||||
Write_Property_Internal_Callback = cb;
|
Write_Property_Internal_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Channel_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Channel_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new object
|
* @brief Creates a new object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ bool Channel_Write_Member_Value(
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Channel_Write_Property_Internal_Callback_Set(write_property_function cb);
|
void Channel_Write_Property_Internal_Callback_Set(write_property_function cb);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Channel_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Channel_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Channel_Create(uint32_t object_instance);
|
uint32_t Channel_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ struct object_data {
|
|||||||
BACNET_COLOR_TRANSITION Transition;
|
BACNET_COLOR_TRANSITION Transition;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1132,6 +1133,38 @@ void Color_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Color_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Color_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Color object
|
* @brief Creates a Color object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ void Color_Write_Disable(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Color_Timer(uint32_t object_instance, uint16_t milliseconds);
|
void Color_Timer(uint32_t object_instance, uint16_t milliseconds);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Color_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Color_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Color_Create(uint32_t object_instance);
|
uint32_t Color_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ struct object_data {
|
|||||||
uint32_t Present_Value_Maximum;
|
uint32_t Present_Value_Maximum;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1575,6 +1576,38 @@ void Color_Temperature_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Color_Temperature_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Color_Temperature_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Color Temperature object
|
* @brief Creates a Color Temperature object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ void Color_Temperature_Write_Disable(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Color_Temperature_Timer(uint32_t object_instance, uint16_t milliseconds);
|
void Color_Temperature_Timer(uint32_t object_instance, uint16_t milliseconds);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Color_Temperature_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Color_Temperature_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Color_Temperature_Create(uint32_t object_instance);
|
uint32_t Color_Temperature_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ typedef struct characterstring_object {
|
|||||||
BACNET_CHARACTER_STRING Present_Value;
|
BACNET_CHARACTER_STRING Present_Value;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
} CHARACTERSTRING_VALUE_DESCR;
|
} CHARACTERSTRING_VALUE_DESCR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,6 +78,38 @@ void CharacterString_Value_Property_Lists(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *CharacterString_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct characterstring_object *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 CharacterString_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct characterstring_object *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a CharacterString Value object
|
* @brief Creates a CharacterString Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -24,12 +24,6 @@ BACNET_STACK_EXPORT
|
|||||||
void CharacterString_Value_Property_Lists(
|
void CharacterString_Value_Property_Lists(
|
||||||
const int **pRequired, const int **pOptional, const int **pProprietary);
|
const int **pRequired, const int **pOptional, const int **pProprietary);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
|
||||||
uint32_t CharacterString_Value_Create(uint32_t object_instance);
|
|
||||||
BACNET_STACK_EXPORT
|
|
||||||
bool CharacterString_Value_Delete(uint32_t object_instance);
|
|
||||||
BACNET_STACK_EXPORT
|
|
||||||
void CharacterString_Value_Cleanup(void);
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool CharacterString_Value_Valid_Instance(uint32_t object_instance);
|
bool CharacterString_Value_Valid_Instance(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
@@ -85,6 +79,18 @@ BACNET_STACK_EXPORT
|
|||||||
bool CharacterString_Value_Encode_Value_List(
|
bool CharacterString_Value_Encode_Value_List(
|
||||||
uint32_t object_instance, BACNET_PROPERTY_VALUE *value_list);
|
uint32_t object_instance, BACNET_PROPERTY_VALUE *value_list);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *CharacterString_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void CharacterString_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
uint32_t CharacterString_Value_Create(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
bool CharacterString_Value_Delete(uint32_t object_instance);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void CharacterString_Value_Cleanup(void);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void CharacterString_Value_Init(void);
|
void CharacterString_Value_Init(void);
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct integer_object {
|
|||||||
uint32_t Instance;
|
uint32_t Instance;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
} INTERGER_VALUE_DESCR;
|
} INTERGER_VALUE_DESCR;
|
||||||
|
|
||||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||||
@@ -719,6 +720,38 @@ void Integer_Value_COV_Increment_Set(uint32_t object_instance, uint32_t value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Integer_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct integer_object *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 Integer_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct integer_object *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Integer Value object
|
* @brief Creates a Integer Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -96,16 +96,19 @@ BACNET_STACK_EXPORT
|
|||||||
void Integer_Value_Out_Of_Service_Set(uint32_t instance, bool oos_flag);
|
void Integer_Value_Out_Of_Service_Set(uint32_t instance, bool oos_flag);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Integer_Value_Init(void);
|
void *Integer_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Integer_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Integer_Value_Create(uint32_t object_instance);
|
uint32_t Integer_Value_Create(uint32_t object_instance);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Integer_Value_Delete(uint32_t object_instance);
|
bool Integer_Value_Delete(uint32_t object_instance);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Integer_Value_Cleanup(void);
|
void Integer_Value_Cleanup(void);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Integer_Value_Init(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#define LOAD_CONTROL_TASK_INTERVAL_MS 1000UL
|
#define LOAD_CONTROL_TASK_INTERVAL_MS 1000UL
|
||||||
|
|
||||||
struct object_data {
|
struct object_data {
|
||||||
|
void *Context;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
/* indicates the current load shedding state of the object */
|
/* indicates the current load shedding state of the object */
|
||||||
@@ -1664,6 +1665,38 @@ bool Load_Control_Shed_Level_Array(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Load_Control_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Load_Control_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Load Control object
|
* @brief Creates a Load Control object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -110,6 +110,11 @@ bool Load_Control_Shed_Level_Array(
|
|||||||
uint32_t array_entry,
|
uint32_t array_entry,
|
||||||
struct shed_level_data *value);
|
struct shed_level_data *value);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Load_Control_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Load_Control_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Load_Control_Create(uint32_t object_instance);
|
uint32_t Load_Control_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ struct object_data {
|
|||||||
BACNET_OBJECT_ID Override_Color_Reference;
|
BACNET_OBJECT_ID Override_Color_Reference;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
/* bits */
|
/* bits */
|
||||||
bool Blink_Warn_Enable : 1;
|
bool Blink_Warn_Enable : 1;
|
||||||
bool Egress_Active : 1;
|
bool Egress_Active : 1;
|
||||||
@@ -3377,6 +3378,38 @@ void Lighting_Output_Write_Present_Value_Callback_Set(
|
|||||||
Lighting_Command_Tracking_Value_Callback = cb;
|
Lighting_Command_Tracking_Value_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Lighting_Output_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Lighting_Output_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Color object
|
* @brief Creates a Color object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -221,6 +221,11 @@ BACNET_STACK_EXPORT
|
|||||||
void Lighting_Output_Write_Present_Value_Callback_Set(
|
void Lighting_Output_Write_Present_Value_Callback_Set(
|
||||||
lighting_command_tracking_value_callback cb);
|
lighting_command_tracking_value_callback cb);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Lighting_Output_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Lighting_Output_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Lighting_Output_Create(uint32_t object_instance);
|
uint32_t Lighting_Output_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ struct object_data {
|
|||||||
BACNET_LIFE_SAFETY_OPERATION Operation_Expected;
|
BACNET_LIFE_SAFETY_OPERATION Operation_Expected;
|
||||||
uint8_t Reliability;
|
uint8_t Reliability;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -667,6 +668,38 @@ bool Life_Safety_Point_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Life_Safety_Point_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Life_Safety_Point_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates an object and initialize its properties to defaults
|
* @brief Creates an object and initialize its properties to defaults
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ int Life_Safety_Point_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Life_Safety_Point_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
bool Life_Safety_Point_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Life_Safety_Point_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Life_Safety_Point_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Life_Safety_Point_Create(uint32_t object_instance);
|
uint32_t Life_Safety_Point_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ struct object_data {
|
|||||||
uint8_t Reliability;
|
uint8_t Reliability;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
OS_Keylist Zone_Members;
|
OS_Keylist Zone_Members;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -844,6 +845,38 @@ bool Life_Safety_Zone_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Life_Safety_Zone_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Life_Safety_Zone_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates an object and initialize its properties to defaults
|
* @brief Creates an object and initialize its properties to defaults
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ int Life_Safety_Zone_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
bool Life_Safety_Zone_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
bool Life_Safety_Zone_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Life_Safety_Zone_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Life_Safety_Zone_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Life_Safety_Zone_Create(uint32_t object_instance);
|
uint32_t Life_Safety_Zone_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ struct object_data {
|
|||||||
/* The state text functions expect a list of C strings separated by '\0' */
|
/* The state text functions expect a list of C strings separated by '\0' */
|
||||||
const char *State_Text;
|
const char *State_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -951,6 +952,38 @@ void Multistate_Input_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Multistate_Input_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Multistate_Input_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new object and adds it to the object list
|
* @brief Creates a new object and adds it to the object list
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -117,6 +117,11 @@ BACNET_STACK_EXPORT
|
|||||||
const char *
|
const char *
|
||||||
Multistate_Input_State_Text(uint32_t object_instance, uint32_t state_index);
|
Multistate_Input_State_Text(uint32_t object_instance, uint32_t state_index);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Multistate_Input_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Multistate_Input_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Multistate_Input_Create(uint32_t object_instance);
|
uint32_t Multistate_Input_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ struct object_data {
|
|||||||
/* The state text functions expect a list of C strings separated by '\0' */
|
/* The state text functions expect a list of C strings separated by '\0' */
|
||||||
const char *State_Text;
|
const char *State_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -1245,6 +1246,38 @@ void Multistate_Output_Write_Present_Value_Callback_Set(
|
|||||||
Multistate_Output_Write_Present_Value_Callback = cb;
|
Multistate_Output_Write_Present_Value_Callback = cb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Multistate_Output_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Multistate_Output_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new object and adds it to the object list
|
* @brief Creates a new object and adds it to the object list
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ BACNET_STACK_EXPORT
|
|||||||
bool Multistate_Output_Relinquish_Default_Set(
|
bool Multistate_Output_Relinquish_Default_Set(
|
||||||
uint32_t object_instance, uint32_t value);
|
uint32_t object_instance, uint32_t value);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Multistate_Output_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Multistate_Output_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Multistate_Output_Create(uint32_t object_instance);
|
uint32_t Multistate_Output_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ struct object_data {
|
|||||||
/* The state text functions expect a list of C strings separated by '\0' */
|
/* The state text functions expect a list of C strings separated by '\0' */
|
||||||
const char *State_Text;
|
const char *State_Text;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
static OS_Keylist Object_List;
|
static OS_Keylist Object_List;
|
||||||
@@ -953,6 +954,38 @@ void Multistate_Value_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Multistate_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Multistate_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a new object and adds it to the object list
|
* @brief Creates a new object and adds it to the object list
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -116,6 +116,11 @@ BACNET_STACK_EXPORT
|
|||||||
bool Multistate_Value_Reliability_Set(
|
bool Multistate_Value_Reliability_Set(
|
||||||
uint32_t object_instance, BACNET_RELIABILITY value);
|
uint32_t object_instance, BACNET_RELIABILITY value);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Multistate_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Multistate_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Multistate_Value_Create(uint32_t object_instance);
|
uint32_t Multistate_Value_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ struct object_data {
|
|||||||
float Link_Speed;
|
float Link_Speed;
|
||||||
bacnet_network_port_activate_changes Activate_Changes;
|
bacnet_network_port_activate_changes Activate_Changes;
|
||||||
bacnet_network_port_discard_changes Discard_Changes;
|
bacnet_network_port_discard_changes Discard_Changes;
|
||||||
|
void *Context;
|
||||||
union {
|
union {
|
||||||
struct bacnet_ipv4_port IPv4;
|
struct bacnet_ipv4_port IPv4;
|
||||||
struct bacnet_ipv6_port IPv6;
|
struct bacnet_ipv6_port IPv6;
|
||||||
@@ -4753,6 +4754,38 @@ void Network_Port_Cleanup(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Network_Port_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
unsigned index = 0;
|
||||||
|
|
||||||
|
index = Network_Port_Instance_To_Index(object_instance);
|
||||||
|
if (index < BACNET_NETWORK_PORTS_MAX) {
|
||||||
|
return Object_List[index].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 Network_Port_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
unsigned index = 0;
|
||||||
|
|
||||||
|
index = Network_Port_Instance_To_Index(object_instance);
|
||||||
|
if (index < BACNET_NETWORK_PORTS_MAX) {
|
||||||
|
Object_List[index].Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the Network Port object data
|
* Initializes the Network Port object data
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -386,6 +386,11 @@ BACNET_STACK_EXPORT
|
|||||||
bool Network_Port_Read_Range(
|
bool Network_Port_Read_Range(
|
||||||
BACNET_READ_RANGE_DATA *pRequest, RR_PROP_INFO *pInfo);
|
BACNET_READ_RANGE_DATA *pRequest, RR_PROP_INFO *pInfo);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Network_Port_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Network_Port_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Network_Port_Create(uint32_t object_instance);
|
uint32_t Network_Port_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ struct object_data {
|
|||||||
const char *Description;
|
const char *Description;
|
||||||
BACNET_NODE_TYPE Node_Type;
|
BACNET_NODE_TYPE Node_Type;
|
||||||
const char *Node_Subtype;
|
const char *Node_Subtype;
|
||||||
|
void *Context;
|
||||||
BACNET_SUBORDINATE_DATA *Subordinate_List;
|
BACNET_SUBORDINATE_DATA *Subordinate_List;
|
||||||
BACNET_RELATIONSHIP Default_Subordinate_Relationship;
|
BACNET_RELATIONSHIP Default_Subordinate_Relationship;
|
||||||
BACNET_DEVICE_OBJECT_REFERENCE Represents;
|
BACNET_DEVICE_OBJECT_REFERENCE Represents;
|
||||||
@@ -777,6 +778,38 @@ int Structured_View_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
|||||||
return apdu_len;
|
return apdu_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Structured_View_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Structured_View_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Structured View object
|
* Creates a Structured View object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ BACNET_STACK_EXPORT
|
|||||||
bool Structured_View_Represents_Set(
|
bool Structured_View_Represents_Set(
|
||||||
uint32_t object_instance, const BACNET_DEVICE_OBJECT_REFERENCE *represents);
|
uint32_t object_instance, const BACNET_DEVICE_OBJECT_REFERENCE *represents);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Structured_View_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Structured_View_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Structured_View_Create(uint32_t object_instance);
|
uint32_t Structured_View_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ struct object_data {
|
|||||||
BACNET_TIME Present_Value;
|
BACNET_TIME Present_Value;
|
||||||
const char *Object_Name;
|
const char *Object_Name;
|
||||||
const char *Description;
|
const char *Description;
|
||||||
|
void *Context;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Key List for storing the object data sorted by instance number */
|
/* Key List for storing the object data sorted by instance number */
|
||||||
@@ -763,6 +764,38 @@ void Time_Value_Write_Disable(uint32_t object_instance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 *Time_Value_Context_Get(uint32_t object_instance)
|
||||||
|
{
|
||||||
|
struct object_data *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 Time_Value_Context_Set(uint32_t object_instance, void *context)
|
||||||
|
{
|
||||||
|
struct object_data *pObject;
|
||||||
|
|
||||||
|
pObject = Keylist_Data(Object_List, object_instance);
|
||||||
|
if (pObject) {
|
||||||
|
pObject->Context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Time Value object
|
* Creates a Time Value object
|
||||||
* @param object_instance - object-instance number of the object
|
* @param object_instance - object-instance number of the object
|
||||||
|
|||||||
@@ -93,6 +93,11 @@ bool Time_Value_Change_Of_Value(uint32_t instance);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void Time_Value_Change_Of_Value_Clear(uint32_t instance);
|
void Time_Value_Change_Of_Value_Clear(uint32_t instance);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void *Time_Value_Context_Get(uint32_t object_instance);
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void Time_Value_Context_Set(uint32_t object_instance, void *context);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
uint32_t Time_Value_Create(uint32_t object_instance);
|
uint32_t Time_Value_Create(uint32_t object_instance);
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
|
|||||||
Reference in New Issue
Block a user