Removed ifdef BACFILE where no longer needed. (#1225)
This commit is contained in:
@@ -25,9 +25,7 @@
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/datalink/datalink.h"
|
||||
#include "bacnet/basic/binding/address.h"
|
||||
#if (BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
#endif
|
||||
#if (BACNET_PROTOCOL_REVISION >= 17)
|
||||
#include "bacnet/basic/object/netport.h"
|
||||
#endif
|
||||
|
||||
@@ -58,9 +58,7 @@
|
||||
#if defined(INTRINSIC_REPORTING)
|
||||
#include "bacnet/basic/object/nc.h"
|
||||
#endif /* defined(INTRINSIC_REPORTING) */
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
#endif /* defined(BACFILE) */
|
||||
#include "bacnet/basic/object/bitstring_value.h"
|
||||
#include "bacnet/basic/object/csv.h"
|
||||
#include "bacnet/basic/object/iv.h"
|
||||
@@ -393,7 +391,6 @@ static object_functions_t My_Object_Table[] = {
|
||||
Color_Temperature_Create, Color_Temperature_Delete,
|
||||
Color_Temperature_Timer, Color_Temperature_Writable_Property_List },
|
||||
#endif
|
||||
#if defined(BACFILE)
|
||||
{ OBJECT_FILE, bacfile_init, bacfile_count, bacfile_index_to_instance,
|
||||
bacfile_valid_instance, bacfile_object_name, bacfile_read_property,
|
||||
bacfile_write_property, BACfile_Property_Lists,
|
||||
@@ -402,7 +399,6 @@ static object_functions_t My_Object_Table[] = {
|
||||
NULL /* Add_List_Element */, NULL /* Remove_List_Element */,
|
||||
bacfile_create, bacfile_delete, NULL /* Timer */,
|
||||
BACfile_Writable_Property_List },
|
||||
#endif
|
||||
{ OBJECT_SCHEDULE, Schedule_Init, Schedule_Count,
|
||||
Schedule_Index_To_Instance, Schedule_Valid_Instance,
|
||||
Schedule_Object_Name, Schedule_Read_Property, Schedule_Write_Property,
|
||||
@@ -887,14 +883,9 @@ static list_element_function Device_Remove_List_Element_Callback;
|
||||
#if defined BACNET_BACKUP_RESTORE
|
||||
/* number of backup files */
|
||||
#ifndef BACNET_BACKUP_FILE_COUNT
|
||||
#if defined(BACFILE)
|
||||
#define BACNET_BACKUP_FILE_COUNT 1
|
||||
#else
|
||||
#define BACNET_BACKUP_FILE_COUNT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BACNET_BACKUP_FILE_COUNT
|
||||
/* device A will read the Configuration_Files property of the Device object.
|
||||
This property will be used to determine the files to read and in what
|
||||
order the files will be read. The value of the Configuration_Files
|
||||
@@ -902,7 +893,6 @@ static list_element_function Device_Remove_List_Element_Callback;
|
||||
configuration File object references before the backup request is
|
||||
accepted by device B. */
|
||||
static uint32_t Configuration_Files[BACNET_BACKUP_FILE_COUNT];
|
||||
#endif
|
||||
/* If the restore is successful, no other actions by device A shall
|
||||
be required, and device B will update the Last_Restore_Time property
|
||||
in its Device object. */
|
||||
@@ -3087,11 +3077,9 @@ void Device_Start_Backup(void)
|
||||
property_list.Proprietary.pList, writable_properties,
|
||||
Device_Read_Property);
|
||||
if (len > 0) {
|
||||
#if defined(BACFILE)
|
||||
(void)bacfile_write_offset(
|
||||
Configuration_Files[0], offset, &object_apdu[0],
|
||||
(uint32_t)len);
|
||||
#endif
|
||||
offset += len;
|
||||
}
|
||||
}
|
||||
@@ -3118,14 +3106,10 @@ void Device_Start_Restore(void)
|
||||
bacapp_timestamp_datetime_set(&Last_Restore_Time, &bdateTime);
|
||||
Backup_State = BACKUP_STATE_PREPARING_FOR_RESTORE;
|
||||
/* create objects from the backup file */
|
||||
#if defined(BACFILE)
|
||||
file_size = bacfile_file_size(Configuration_Files[0]);
|
||||
#endif
|
||||
while (offset < file_size) {
|
||||
#if defined(BACFILE)
|
||||
apdu_len = bacfile_read_offset(
|
||||
Configuration_Files[0], offset, &apdu[0], sizeof(apdu));
|
||||
#endif
|
||||
if (apdu_len > 0) {
|
||||
decoded_len = create_object_decode_service_request(
|
||||
apdu, apdu_len, &create_data);
|
||||
|
||||
@@ -37,9 +37,7 @@
|
||||
#include "bacnet/basic/object/mso.h"
|
||||
#include "bacnet/basic/object/ms-input.h"
|
||||
#include "bacnet/basic/object/trendlog.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h" /* object list dependency */
|
||||
#endif
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
/* os specific includes */
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
#include "bacnet/basic/binding/address.h"
|
||||
#include "bacnet/basic/object/trendlog.h"
|
||||
#include "bacnet/datalink/datalink.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h" /* object list dependency */
|
||||
#endif
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
|
||||
/* number of demo objects */
|
||||
#ifndef MAX_TREND_LOGS
|
||||
|
||||
@@ -1266,14 +1266,9 @@ static uint32_t Interval_Offset_Minutes;
|
||||
#if defined BACNET_BACKUP_RESTORE
|
||||
/* number of backup files */
|
||||
#ifndef BACNET_BACKUP_FILE_COUNT
|
||||
#if defined(BACFILE)
|
||||
#define BACNET_BACKUP_FILE_COUNT 1
|
||||
#else
|
||||
#define BACNET_BACKUP_FILE_COUNT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if BACNET_BACKUP_FILE_COUNT
|
||||
/* device A will read the Configuration_Files property of the Device object.
|
||||
This property will be used to determine the files to read and in what
|
||||
order the files will be read. The value of the Configuration_Files
|
||||
@@ -1281,7 +1276,6 @@ static uint32_t Interval_Offset_Minutes;
|
||||
configuration File object references before the backup request is
|
||||
accepted by device B. */
|
||||
static uint32_t Configuration_Files[BACNET_BACKUP_FILE_COUNT];
|
||||
#endif
|
||||
/* If the restore is successful, no other actions by device A shall
|
||||
be required, and device B will update the Last_Restore_Time property
|
||||
in its Device object. */
|
||||
@@ -3410,11 +3404,9 @@ void Device_Start_Backup(void)
|
||||
property_list.Proprietary.pList, writable_properties,
|
||||
Device_Read_Property);
|
||||
if (len > 0) {
|
||||
#if defined(BACFILE)
|
||||
(void)bacfile_write_offset(
|
||||
Configuration_Files[0], offset, &object_apdu[0],
|
||||
(uint32_t)len);
|
||||
#endif
|
||||
offset += len;
|
||||
}
|
||||
}
|
||||
@@ -3441,14 +3433,10 @@ void Device_Start_Restore(void)
|
||||
bacapp_timestamp_datetime_set(&Last_Restore_Time, &bdateTime);
|
||||
Backup_State = BACKUP_STATE_PREPARING_FOR_RESTORE;
|
||||
/* create objects from the backup file */
|
||||
#if defined(BACFILE)
|
||||
file_size = bacfile_file_size(Configuration_Files[0]);
|
||||
#endif
|
||||
while (offset < file_size) {
|
||||
#if defined(BACFILE)
|
||||
apdu_len = bacfile_read_offset(
|
||||
Configuration_Files[0], offset, &apdu[0], sizeof(apdu));
|
||||
#endif
|
||||
if (apdu_len > 0) {
|
||||
decoded_len = create_object_decode_service_request(
|
||||
apdu, apdu_len, &create_data);
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#include "bacnet/reject.h"
|
||||
#include "bacnet/arf.h"
|
||||
/* basic objects, services, TSM, and datalink */
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
#endif
|
||||
#include "bacnet/basic/tsm/tsm.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/basic/sys/debug.h"
|
||||
@@ -79,7 +77,6 @@ last octet or record of the file, then the 'End Of File' parameter
|
||||
shall be TRUE, otherwise FALSE.
|
||||
*/
|
||||
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_read_file(
|
||||
uint8_t *service_request,
|
||||
uint16_t service_len,
|
||||
@@ -196,4 +193,3 @@ ARF_ABORT:
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/apdu.h"
|
||||
#include "bacnet/arf.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
#endif
|
||||
/* basic objects, services, TSM, and datalink */
|
||||
#include "bacnet/basic/object/device.h"
|
||||
#include "bacnet/basic/tsm/tsm.h"
|
||||
@@ -27,7 +25,6 @@
|
||||
/* Note: it does not have to be the same file=instance */
|
||||
/* that someone can read from us. It is common to */
|
||||
/* use the description as the file name. */
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_read_file_ack(
|
||||
uint8_t *service_request,
|
||||
uint16_t service_len,
|
||||
@@ -54,4 +51,3 @@ void handler_atomic_read_file_ack(
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/basic/sys/debug.h"
|
||||
#include "bacnet/datalink/datalink.h"
|
||||
#if defined(BACFILE)
|
||||
#include "bacnet/basic/object/bacfile.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
from BACnet SSPC-135-2004
|
||||
@@ -59,7 +57,6 @@ of the BACnet device is a local matter and is not defined by this
|
||||
standard.
|
||||
*/
|
||||
|
||||
#if defined(BACFILE)
|
||||
void handler_atomic_write_file(
|
||||
uint8_t *service_request,
|
||||
uint16_t service_len,
|
||||
@@ -161,4 +158,3 @@ AWF_ABORT:
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user