Updated the example File object to have the same Object_Name API. Moved the File object header file to the demo/object directory with the rest of the demo object header files.
This commit is contained in:
@@ -94,8 +94,7 @@ void BACfile_Property_Lists(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
char *bacfile_name(
|
||||
static char * bacfile_name(
|
||||
uint32_t instance)
|
||||
{
|
||||
uint32_t index = 0;
|
||||
@@ -113,6 +112,21 @@ char *bacfile_name(
|
||||
return filename;
|
||||
}
|
||||
|
||||
bool bacfile_object_name(
|
||||
uint32_t instance,
|
||||
BACNET_CHARACTER_STRING *object_name)
|
||||
{
|
||||
bool status = false;
|
||||
char *filename = NULL;
|
||||
|
||||
filename = bacfile_name(instance);
|
||||
if (filename) {
|
||||
status = characterstring_init_ansi(object_name, filename);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
bool bacfile_valid_instance(
|
||||
uint32_t object_instance)
|
||||
{
|
||||
|
||||
@@ -52,8 +52,9 @@ extern "C" {
|
||||
const int **pRequired,
|
||||
const int **pOptional,
|
||||
const int **pProprietary);
|
||||
char *bacfile_name(
|
||||
uint32_t instance);
|
||||
bool bacfile_object_name(
|
||||
uint32_t object_instance,
|
||||
BACNET_CHARACTER_STRING *object_name);
|
||||
bool bacfile_valid_instance(
|
||||
uint32_t object_instance);
|
||||
uint32_t bacfile_count(
|
||||
Reference in New Issue
Block a user