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:
skarg
2011-04-01 22:25:26 +00:00
parent deab12a5e1
commit 7b1f8c7f5e
2 changed files with 19 additions and 4 deletions
+16 -2
View File
@@ -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(