Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
@@ -80,7 +80,7 @@ extern "C" {
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_UNSIGNED_INTEGER Accumulator_Present_Value(uint32_t object_instance);
|
||||
BACNET_UNSIGNED_INTEGER Accumulator_Present_Value(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Accumulator_Present_Value_Set(
|
||||
uint32_t object_instance,
|
||||
@@ -112,6 +112,3 @@ extern "C" {
|
||||
Accumulator_Name, Accumulator_Read_Property, Accumulator_Write_Property, \
|
||||
Accumulator_Property_Lists, NULL, NULL
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ int Access_Credential_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
break;
|
||||
case PROP_AUTHENTICATION_FACTORS:
|
||||
apdu_len = bacnet_array_encode(rpdata->object_instance,
|
||||
rpdata->array_index,
|
||||
rpdata->array_index,
|
||||
Access_Credential_Authentication_Factor_Array_Encode,
|
||||
ac_descr[object_index].auth_factors_count, apdu, apdu_size);
|
||||
if (apdu_len == BACNET_STATUS_ABORT) {
|
||||
@@ -276,7 +276,7 @@ int Access_Credential_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
break;
|
||||
case PROP_ASSIGNED_ACCESS_RIGHTS:
|
||||
apdu_len = bacnet_array_encode(rpdata->object_instance,
|
||||
rpdata->array_index,
|
||||
rpdata->array_index,
|
||||
Access_Credential_Assigned_Access_Rights_Array_Encode,
|
||||
ac_descr[object_index].assigned_access_rights_count, apdu, apdu_size);
|
||||
if (apdu_len == BACNET_STATUS_ABORT) {
|
||||
|
||||
@@ -260,7 +260,7 @@ bool Access_Door_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_ACCESS_DOORS) {
|
||||
snprintf(text, sizeof(text), "ACCESS DOOR %lu",
|
||||
snprintf(text, sizeof(text), "ACCESS DOOR %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ bool Access_Point_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_ACCESS_POINTS) {
|
||||
snprintf(text, sizeof(text), "ACCESS POINT %lu",
|
||||
snprintf(text, sizeof(text), "ACCESS POINT %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ bool Access_Rights_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_ACCESS_RIGHTSS) {
|
||||
snprintf(text, sizeof(text), "ACCESS RIGHTS %lu",
|
||||
snprintf(text, sizeof(text), "ACCESS RIGHTS %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ bool Access_User_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_ACCESS_USERS) {
|
||||
snprintf(text, sizeof(text), "ACCESS USER %lu",
|
||||
snprintf(text, sizeof(text), "ACCESS USER %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ bool Access_Zone_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_ACCESS_ZONES) {
|
||||
snprintf(text, sizeof(text), "ACCESS ZONE %lu",
|
||||
snprintf(text, sizeof(text), "ACCESS ZONE %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -38,18 +38,18 @@ static const int Properties_Required[] = {
|
||||
PROP_OUT_OF_SERVICE, PROP_UNITS, -1
|
||||
};
|
||||
|
||||
static const int Properties_Optional[] = {
|
||||
static const int Properties_Optional[] = {
|
||||
PROP_DESCRIPTION, PROP_RELIABILITY, PROP_COV_INCREMENT,
|
||||
#if defined(INTRINSIC_REPORTING)
|
||||
PROP_TIME_DELAY, PROP_NOTIFICATION_CLASS, PROP_HIGH_LIMIT,
|
||||
PROP_LOW_LIMIT, PROP_DEADBAND, PROP_LIMIT_ENABLE, PROP_EVENT_ENABLE,
|
||||
PROP_ACKED_TRANSITIONS, PROP_NOTIFY_TYPE, PROP_EVENT_TIME_STAMPS,
|
||||
#endif
|
||||
-1
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Properties_Proprietary[] = {
|
||||
-1
|
||||
static const int Properties_Proprietary[] = {
|
||||
-1
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ bool Analog_Output_Present_Value_Set(
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY) &&
|
||||
(value >= pObject->Min_Pres_Value) &&
|
||||
(value >= pObject->Min_Pres_Value) &&
|
||||
(value <= pObject->Max_Pres_Value)) {
|
||||
pObject->Relinquished[priority - 1] = false;
|
||||
pObject->Priority_Array[priority - 1] = value;
|
||||
@@ -891,7 +891,7 @@ bool Analog_Output_Encode_Value_List(
|
||||
status = cov_value_list_encode_real(value_list, pObject->Prior_Value,
|
||||
in_alarm, fault, overridden, pObject->Out_Of_Service);
|
||||
}
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,18 +41,18 @@ static const int Analog_Value_Properties_Required[] = {
|
||||
PROP_OUT_OF_SERVICE, PROP_UNITS, -1
|
||||
};
|
||||
|
||||
static const int Analog_Value_Properties_Optional[] = {
|
||||
static const int Analog_Value_Properties_Optional[] = {
|
||||
PROP_DESCRIPTION, PROP_RELIABILITY, PROP_COV_INCREMENT,
|
||||
#if defined(INTRINSIC_REPORTING)
|
||||
PROP_TIME_DELAY, PROP_NOTIFICATION_CLASS, PROP_HIGH_LIMIT,
|
||||
PROP_LOW_LIMIT, PROP_DEADBAND, PROP_LIMIT_ENABLE, PROP_EVENT_ENABLE,
|
||||
PROP_LOW_LIMIT, PROP_DEADBAND, PROP_LIMIT_ENABLE, PROP_EVENT_ENABLE,
|
||||
PROP_ACKED_TRANSITIONS, PROP_NOTIFY_TYPE, PROP_EVENT_TIME_STAMPS,
|
||||
#endif
|
||||
-1
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Analog_Value_Properties_Proprietary[] = {
|
||||
-1
|
||||
static const int Analog_Value_Properties_Proprietary[] = {
|
||||
-1
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ static const int Properties_Required[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Properties_Optional[] = {
|
||||
static const int Properties_Optional[] = {
|
||||
PROP_RELIABILITY,
|
||||
PROP_DESCRIPTION,
|
||||
PROP_ACTIVE_TEXT,
|
||||
@@ -98,7 +98,7 @@ static const int Properties_Optional[] = {
|
||||
PROP_EVENT_TIME_STAMPS,
|
||||
PROP_EVENT_DETECTION_ENABLE,
|
||||
#endif
|
||||
-1
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Properties_Proprietary[] = { -1 };
|
||||
|
||||
@@ -668,7 +668,7 @@ bool BitString_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
break;
|
||||
default:
|
||||
if (property_lists_member(
|
||||
Properties_Required, Properties_Optional,
|
||||
Properties_Required, Properties_Optional,
|
||||
Properties_Proprietary, wp_data->object_property)) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2005
|
||||
* @brief A basic BACnet Binary Output object implementation.
|
||||
* The Binary Lighting Output object is a commandable object, and the
|
||||
* present-value property uses a priority array and an enumerated 2-state
|
||||
* The Binary Lighting Output object is a commandable object, and the
|
||||
* present-value property uses a priority array and an enumerated 2-state
|
||||
* data type.
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
@@ -72,13 +72,13 @@ static binary_value_write_present_value_callback
|
||||
/* clang-format off */
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Binary_Value_Properties_Required[] = {
|
||||
PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME,
|
||||
PROP_OBJECT_TYPE,
|
||||
PROP_OBJECT_TYPE,
|
||||
PROP_PRESENT_VALUE,
|
||||
PROP_STATUS_FLAGS,
|
||||
PROP_STATUS_FLAGS,
|
||||
PROP_EVENT_STATE,
|
||||
PROP_OUT_OF_SERVICE,
|
||||
PROP_OUT_OF_SERVICE,
|
||||
-1
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ static const int Binary_Value_Properties_Optional[] = {
|
||||
};
|
||||
|
||||
static const int Binary_Value_Properties_Proprietary[] = {
|
||||
-1
|
||||
-1
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @file
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2013
|
||||
* @brief The Channel object is a command object without a priority array,
|
||||
* @brief The Channel object is a command object without a priority array,
|
||||
* and the present-value property proxies an ANY data type (sort of)
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @file
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2013
|
||||
* @brief The Channel object is a command object without a priority array,
|
||||
* @brief The Channel object is a command object without a priority array,
|
||||
* and the present-value property proxies an ANY data type (sort of)
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
@@ -702,7 +702,7 @@ bool Color_Object_Name(
|
||||
|
||||
/**
|
||||
* For a given object instance-number, sets the object-name
|
||||
*
|
||||
*
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param new_name - holds the object-name to be set
|
||||
*
|
||||
@@ -815,11 +815,11 @@ static void Color_Fade_To_Color_Handler(
|
||||
x3 = (float)pObject->Color_Command.transit.fade_time;
|
||||
y1 = old_value.x_coordinate;
|
||||
y3 = pObject->Color_Command.target.color.x_coordinate;
|
||||
pObject->Tracking_Value.x_coordinate = linear_interpolate(x1, x2,
|
||||
pObject->Tracking_Value.x_coordinate = linear_interpolate(x1, x2,
|
||||
x3, y1, y3);
|
||||
y1 = old_value.y_coordinate;
|
||||
y3 = pObject->Color_Command.target.color.y_coordinate;
|
||||
pObject->Tracking_Value.y_coordinate = linear_interpolate(x1, x2,
|
||||
pObject->Tracking_Value.y_coordinate = linear_interpolate(x1, x2,
|
||||
x3, y1, y3);
|
||||
pObject->Color_Command.transit.fade_time -= milliseconds;
|
||||
pObject->In_Progress =
|
||||
|
||||
@@ -35,14 +35,14 @@ static COMMAND_DESCR Command_Descr[MAX_COMMANDS];
|
||||
|
||||
/* clang-format off */
|
||||
/* These arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Command_Properties_Required[] = {
|
||||
static const int Command_Properties_Required[] = {
|
||||
PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME,
|
||||
PROP_OBJECT_TYPE,
|
||||
PROP_PRESENT_VALUE,
|
||||
PROP_OBJECT_NAME,
|
||||
PROP_OBJECT_TYPE,
|
||||
PROP_PRESENT_VALUE,
|
||||
PROP_IN_PROCESS,
|
||||
PROP_ALL_WRITES_SUCCESSFUL,
|
||||
PROP_ACTION,
|
||||
PROP_ALL_WRITES_SUCCESSFUL,
|
||||
PROP_ACTION,
|
||||
-1 };
|
||||
|
||||
static const int Command_Properties_Optional[] = { -1 };
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @file
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2005
|
||||
* @brief API for handling all BACnet objects belonging to a BACnet device,
|
||||
* @brief API for handling all BACnet objects belonging to a BACnet device,
|
||||
* as well as Device-specific properties.
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
@@ -227,13 +227,13 @@ bool Routed_Device_Address_Lookup(int idx, uint8_t dlen, uint8_t *dadr)
|
||||
* functions.
|
||||
*
|
||||
* @param dest [in] The BACNET_ADDRESS of the message's destination.
|
||||
* If the Length of the mac_adress[] field is 0, then this is a
|
||||
* If the Length of the mac_adress[] field is 0, then this is a
|
||||
* MAC broadcast. Otherwise, size is determined by the DLL type (eg, 6 for BIP
|
||||
* and 2 for MSTP).
|
||||
* @param DNET_list [in] List of our reachable downstream BACnet Network
|
||||
* numbers. Normally just one valid entry; terminated with a -1 value.
|
||||
* @param cursor [in,out] The concept of the cursor is that it is a starting
|
||||
* "hint" for the search; on return, it is updated to provide
|
||||
* "hint" for the search; on return, it is updated to provide
|
||||
* the cursor value to use with a subsequent GetNext call, or it equals -1 if
|
||||
* there are no further matches. Set it to 0 on entry to access the main,
|
||||
* gateway Device entry, or to start looping through the routed devices.
|
||||
@@ -241,7 +241,7 @@ bool Routed_Device_Address_Lookup(int idx, uint8_t dlen, uint8_t *dadr)
|
||||
* calling function should not alter or interpret it.
|
||||
*
|
||||
* @return True if the MAC addresses match (or if BACNET_BROADCAST_NETWORK and
|
||||
* the dest->len is 0, meaning MAC bcast, so it's an automatic
|
||||
* the dest->len is 0, meaning MAC bcast, so it's an automatic
|
||||
* match). Else False if no match or invalid idx is given; the cursor will be
|
||||
* returned as -1 in these cases.
|
||||
*/
|
||||
@@ -307,12 +307,12 @@ bool Routed_Device_GetNext(BACNET_ADDRESS *dest, int *DNET_list, int *cursor)
|
||||
* or local or else broadcast.
|
||||
*
|
||||
* @param dest_net [in] The BACnet network number of a message's destination.
|
||||
* Success if it is our virtual network number, or 0 (local for
|
||||
* Success if it is our virtual network number, or 0 (local for
|
||||
* the gateway, or 0xFFFF for a broadcast network number.
|
||||
* @param DNET_list [in] List of our reachable downstream BACnet Network
|
||||
* numbers. Normally just one valid entry; terminated with a -1 value.
|
||||
* @return True if matches our virtual network, or is for the local network
|
||||
* Device (the gateway), or is BACNET_BROADCAST_NETWORK,
|
||||
* Device (the gateway), or is BACNET_BROADCAST_NETWORK,
|
||||
* which is an automatic match. Else False if not a reachable network.
|
||||
*/
|
||||
bool Routed_Device_Is_Valid_Network(uint16_t dest_net, int *DNET_list)
|
||||
|
||||
@@ -506,9 +506,9 @@ bool Integer_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
break;
|
||||
default:
|
||||
if (property_lists_member(
|
||||
Integer_Value_Properties_Required,
|
||||
Integer_Value_Properties_Required,
|
||||
Integer_Value_Properties_Optional,
|
||||
Integer_Value_Properties_Proprietary,
|
||||
Integer_Value_Properties_Proprietary,
|
||||
wp_data->object_property)) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
@@ -708,4 +708,3 @@ void Integer_Value_Init(void)
|
||||
Object_List = Keylist_Create();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,14 +115,14 @@ static const int Load_Control_Properties_Required[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Load_Control_Properties_Optional[] = {
|
||||
static const int Load_Control_Properties_Optional[] = {
|
||||
PROP_DESCRIPTION,
|
||||
PROP_FULL_DUTY_BASELINE,
|
||||
-1
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Load_Control_Properties_Proprietary[] = {
|
||||
-1
|
||||
static const int Load_Control_Properties_Proprietary[] = {
|
||||
-1
|
||||
};
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Life_Safety_Point_Present_Value_Set(
|
||||
uint32_t object_instance,
|
||||
uint32_t object_instance,
|
||||
BACNET_LIFE_SAFETY_STATE present_value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
@@ -61,21 +61,21 @@ extern "C" {
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Life_Safety_Point_Silenced_Set(
|
||||
uint32_t object_instance,
|
||||
uint32_t object_instance,
|
||||
BACNET_SILENCED_STATE value);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_LIFE_SAFETY_MODE Life_Safety_Point_Mode(
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Life_Safety_Point_Mode_Set(
|
||||
uint32_t object_instance,
|
||||
uint32_t object_instance,
|
||||
BACNET_LIFE_SAFETY_MODE value);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_LIFE_SAFETY_OPERATION Life_Safety_Point_Operation_Expected(
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Life_Safety_Point_Operation_Expected_Set(
|
||||
uint32_t object_instance,
|
||||
uint32_t object_instance,
|
||||
BACNET_LIFE_SAFETY_OPERATION value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
@@ -1078,9 +1078,9 @@ bool Multistate_Output_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
break;
|
||||
default:
|
||||
if (property_lists_member(
|
||||
Properties_Required,
|
||||
Properties_Optional,
|
||||
Properties_Proprietary,
|
||||
Properties_Required,
|
||||
Properties_Optional,
|
||||
Properties_Proprietary,
|
||||
wp_data->object_property)) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @file
|
||||
* @author Krzysztof Malorny <malornykrzysztof@gmail.com>
|
||||
* @author Ed Hague <edward@bac-test.com>
|
||||
* @date 2011, 2018
|
||||
* @date 2011, 2018
|
||||
* @brief A basic BACnet Notification Class object
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
@@ -135,7 +135,7 @@ bool Notification_Class_Object_Name(
|
||||
|
||||
index = Notification_Class_Instance_To_Index(object_instance);
|
||||
if (index < MAX_NOTIFICATION_CLASSES) {
|
||||
snprintf(text, sizeof(text), "NOTIFICATION CLASS %lu",
|
||||
snprintf(text, sizeof(text), "NOTIFICATION CLASS %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file
|
||||
* @author Krzysztof Malorny <malornykrzysztof@gmail.com>
|
||||
* @date 2011
|
||||
* @date 2011
|
||||
* @brief API for a basic BACnet Notification Class object
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
@@ -123,7 +123,7 @@ extern "C" {
|
||||
bool Network_Port_MSTP_MAC_Address_Set(
|
||||
uint32_t object_instance,
|
||||
uint8_t value);
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint8_t Network_Port_MSTP_Max_Master(
|
||||
uint32_t object_instance);
|
||||
@@ -195,7 +195,7 @@ extern "C" {
|
||||
uint32_t object_instance,
|
||||
uint8_t a, uint8_t b, uint8_t c, uint8_t d);
|
||||
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Network_Port_IP_DHCP_Enable(
|
||||
uint32_t object_instance);
|
||||
|
||||
@@ -45,7 +45,7 @@ extern "C" {
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool objects_device_delete(int index);
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
OBJECT_DEVICE_T *objects_device_new(uint32_t device_instance);
|
||||
|
||||
@@ -54,10 +54,10 @@ extern "C" {
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
OBJECT_DEVICE_T *objects_device_data(int index);
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int objects_device_count(void);
|
||||
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t objects_device_id(int index);
|
||||
|
||||
@@ -69,4 +69,3 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ static int Schedule_Weekly_Schedule_Encode(
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
pObject = Schedule_Object(object_instance);
|
||||
if (!pObject) {
|
||||
if (!pObject) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
day = array_index;
|
||||
@@ -275,10 +275,10 @@ static int Schedule_Exception_Schedule_Encode(
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
pObject = Schedule_Object(object_instance);
|
||||
if (!pObject) {
|
||||
if (!pObject) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
apdu_len = bacnet_special_event_encode(apdu,
|
||||
apdu_len = bacnet_special_event_encode(apdu,
|
||||
&pObject->Exception_Schedule[array_index]);
|
||||
|
||||
return apdu_len;
|
||||
@@ -346,7 +346,7 @@ int Schedule_Read_Property(BACNET_READ_PROPERTY_DATA *rpdata)
|
||||
case PROP_EXCEPTION_SCHEDULE:
|
||||
apdu_len = bacnet_array_encode(
|
||||
rpdata->object_instance, rpdata->array_index,
|
||||
Schedule_Exception_Schedule_Encode,
|
||||
Schedule_Exception_Schedule_Encode,
|
||||
BACNET_EXCEPTION_SCHEDULE_SIZE, apdu, apdu_max);
|
||||
if (apdu_len == BACNET_STATUS_ABORT) {
|
||||
rpdata->error_code =
|
||||
@@ -439,7 +439,7 @@ bool Schedule_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
break;
|
||||
default:
|
||||
if (property_lists_member(
|
||||
Schedule_Properties_Required, Schedule_Properties_Optional,
|
||||
Schedule_Properties_Required, Schedule_Properties_Optional,
|
||||
Schedule_Properties_Proprietary, wp_data->object_property)) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
|
||||
@@ -60,9 +60,9 @@ static const int Time_Value_Properties_Proprietary[] = { -1 };
|
||||
|
||||
/* standard properties that are arrays for this object,
|
||||
but not necessary supported in this object */
|
||||
static const int BACnetARRAY_Properties[] = {
|
||||
PROP_PRIORITY_ARRAY, PROP_EVENT_TIME_STAMPS, PROP_EVENT_MESSAGE_TEXTS,
|
||||
PROP_EVENT_MESSAGE_TEXTS_CONFIG, PROP_VALUE_SOURCE_ARRAY,
|
||||
static const int BACnetARRAY_Properties[] = {
|
||||
PROP_PRIORITY_ARRAY, PROP_EVENT_TIME_STAMPS, PROP_EVENT_MESSAGE_TEXTS,
|
||||
PROP_EVENT_MESSAGE_TEXTS_CONFIG, PROP_VALUE_SOURCE_ARRAY,
|
||||
PROP_COMMAND_TIME_ARRAY, PROP_TAGS, -1 };
|
||||
|
||||
/**
|
||||
|
||||
@@ -234,7 +234,7 @@ bool Trend_Log_Object_Name(
|
||||
bool status = false;
|
||||
|
||||
if (object_instance < MAX_TREND_LOGS) {
|
||||
snprintf(text, sizeof(text), "Trend Log %lu",
|
||||
snprintf(text, sizeof(text), "Trend Log %lu",
|
||||
(unsigned long)object_instance);
|
||||
status = characterstring_init_ansi(object_name, text);
|
||||
}
|
||||
@@ -664,7 +664,7 @@ bool Trend_Log_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
|
||||
case PROP_LOG_DEVICE_OBJECT_PROPERTY:
|
||||
len = bacnet_device_object_property_reference_decode(
|
||||
wp_data->application_data,wp_data->application_data_len,
|
||||
wp_data->application_data,wp_data->application_data_len,
|
||||
&TempSource);
|
||||
if (len <= 0) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
@@ -1478,7 +1478,7 @@ int TL_encode_entry(uint8_t *apdu, int iLog, int iEntry)
|
||||
case TL_TYPE_ANY:
|
||||
/* Should never happen as we don't support this at the moment */
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user