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:
@@ -28,7 +28,7 @@ static void testAnalogOutput(void)
|
||||
bool status = false;
|
||||
unsigned count = 0;
|
||||
uint32_t object_instance = BACNET_MAX_INSTANCE, test_object_instance = 0;
|
||||
const int skip_fail_property_list[] = { PROP_PRIORITY_ARRAY, -1 };
|
||||
const int skip_fail_property_list[] = { -1 };
|
||||
|
||||
Analog_Output_Init();
|
||||
object_instance = Analog_Output_Create(object_instance);
|
||||
@@ -40,6 +40,10 @@ static void testAnalogOutput(void)
|
||||
OBJECT_ANALOG_OUTPUT, object_instance, Analog_Output_Property_Lists,
|
||||
Analog_Output_Read_Property, Analog_Output_Write_Property,
|
||||
skip_fail_property_list);
|
||||
bacnet_object_name_ascii_test(
|
||||
object_instance,
|
||||
Analog_Output_Name_Set,
|
||||
Analog_Output_Name_ASCII);
|
||||
status = Analog_Output_Delete(object_instance);
|
||||
zassert_true(status, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user