Added object-name c-string getter function to basic objects so they can be referenced to free if dynamically created. (#754)
* Added basic object-name get for ASCII names to enable free if they were dynamically created. Added unit testing to validate the basic object ASCII object-name API. * Removed static scope on character array used for name since the array gets copied into characterstring array and static is not needed.
This commit is contained in:
@@ -13,6 +13,17 @@
|
||||
#include <bacnet/rpm.h>
|
||||
#include <bacnet/wp.h>
|
||||
|
||||
/* function API pattern for testing ASCII name get/set */
|
||||
typedef bool (*object_name_ascii_set_function) (uint32_t object_instance,
|
||||
char *new_name);
|
||||
typedef const char * (*object_name_ascii_function) (
|
||||
uint32_t object_instance);
|
||||
|
||||
void bacnet_object_name_ascii_test(
|
||||
uint32_t object_instance,
|
||||
object_name_ascii_set_function ascii_set,
|
||||
object_name_ascii_function ascii_get);
|
||||
|
||||
void bacnet_object_properties_read_write_test(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
|
||||
Reference in New Issue
Block a user