Added multiple uBASIC program objects to stm32f4xx example port. (#995)

This commit is contained in:
Steve Karg
2025-05-19 14:57:43 -05:00
committed by GitHub
parent 62bf8274f7
commit b5b2fd5b7b
9 changed files with 218 additions and 80 deletions
+16
View File
@@ -942,6 +942,22 @@ bool Program_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
return status;
}
/**
* @brief Set the context used with load, unload, run, halt, and restart
* @param object_instance [in] BACnet object instance number
* @param context [in] pointer to the context
*/
void *Program_Context_Get(uint32_t object_instance)
{
struct object_data *pObject = Object_Data(object_instance);
if (pObject) {
return pObject->Context;
}
return NULL;
}
/**
* @brief Set the context used with load, unload, run, halt, and restart
* @param object_instance [in] BACnet object instance number
+2
View File
@@ -114,6 +114,8 @@ void Program_Init(void);
note: return value is 0 for success, non-zero for failure
*/
BACNET_STACK_EXPORT
void *Program_Context_Get(uint32_t object_instance);
BACNET_STACK_EXPORT
void Program_Context_Set(uint32_t object_instance, void *context);
BACNET_STACK_EXPORT
void Program_Load_Set(uint32_t object_instance, int (*load)(void *context));