Added multiple uBASIC program objects to stm32f4xx example port. (#995)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user