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:
Kari Argillander
2024-08-25 22:13:57 +03:00
committed by GitHub
parent 9e0657424e
commit 369da70f2a
455 changed files with 7147 additions and 7249 deletions
+2 -2
View File
@@ -124,10 +124,10 @@ int npdu_send_what_is_network_number(BACNET_ADDRESS *dst)
* If src->net and src->len are 0, there is no
* routing source information.
* @param npdu_data [in] Contains a filled-out structure with information
* decoded from the NCPI and other NPDU
* decoded from the NCPI and other NPDU
* bytes.
* @param npdu [in] Buffer containing the rest of the NPDU, following the
* bytes that have already been decoded.
* bytes that have already been decoded.
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
*/
static void network_control_handler(
+2 -2
View File
@@ -42,10 +42,10 @@
* @param DNET_list [in] List of our reachable downstream BACnet Network
* numbers. Normally just one valid entry; terminated with a -1 value.
* @param npdu_data [in] Contains a filled-out structure with information
* decoded from the NCPI and other NPDU
* decoded from the NCPI and other NPDU
* bytes.
* @param npdu [in] Buffer containing the rest of the NPDU, following the
* bytes that have already been decoded.
* bytes that have already been decoded.
* @param npdu_len [in] The length of the remaining NPDU message in npdu[].
*/
static void network_control_handler(BACNET_ADDRESS *src,
+1 -1
View File
@@ -28,7 +28,7 @@
* The contents of iArgs are are, per message type:
* - NETWORK_MESSAGE_WHO_IS_ROUTER_TO_NETWORK: Single int for DNET requested
* - NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK: Array of DNET(s) to send,
* terminated with -1
* terminated with -1
* - NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK: array of 2 ints,
* first is reason, second is DNET of interest
* - NETWORK_MESSAGE_ROUTER_BUSY_TO_NETWORK: same as I-Am-Router msg
+1 -4
View File
@@ -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
+2 -2
View File
@@ -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) {
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+4 -4
View File
@@ -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 */
+2 -2
View File
@@ -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;
}
+5 -5
View File
@@ -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 */
+2 -2
View File
@@ -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 };
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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
*/
+5 -5
View File
@@ -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 */
+1 -1
View File
@@ -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
*/
+1 -1
View File
@@ -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
*/
+3 -3
View File
@@ -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 =
+6 -6
View File
@@ -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 };
+1 -1
View File
@@ -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
*/
+5 -5
View File
@@ -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)
+2 -3
View File
@@ -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();
}
}
+4 -4
View File
@@ -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 */
+4 -4
View File
@@ -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
+3 -3
View File
@@ -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 -2
View File
@@ -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 -1
View File
@@ -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
*/
+2 -2
View File
@@ -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);
+3 -4
View File
@@ -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
+5 -5
View File
@@ -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;
+3 -3
View File
@@ -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 };
/**
+3 -3
View File
@@ -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;
}
+1 -1
View File
@@ -111,7 +111,7 @@ void handler_alarm_ack(uint8_t *service_request,
data.ackSource.value, (unsigned long)data.ackProcessIdentifier);
#endif
/* BACnet Testing Observed Incident oi00105
/* BACnet Testing Observed Incident oi00105
ACK of a non-existent object returned the incorrect error code
Revealed by BACnet Test Client v1.8.16 (
www.bac-test.com/bacnet-test-client-download ) BC 135.1: 9.1.3.3-A Any
+2 -2
View File
@@ -139,9 +139,9 @@ void handler_read_property_ack(uint8_t *service_request,
* @param apdu [in] The received apdu data.
* @param apdu_len [in] Total length of the apdu.
* @param read_access_data [out] Pointer to the head of the linked list
* where the RP data is to be stored.
* where the RP data is to be stored.
* @return Number of decoded bytes (could be less than apdu_len),
* or -1 on decoding error.
* or -1 on decoding error.
*/
int rp_ack_fully_decode_service_request(
uint8_t *apdu, int apdu_len, BACNET_READ_ACCESS_DATA *read_access_data)
+4 -4
View File
@@ -39,7 +39,7 @@ static uint8_t Temp_Buf[MAX_APDU] = { 0 };
/**
* @brief Fetches the lists of properties (array of BACNET_PROPERTY_ID's) for
* this object type and the special properties ALL or REQUIRED or OPTIONAL.
* @param pPropertyList reference for the list of ALL, REQUIRED, and OPTIONAL
* @param pPropertyList reference for the list of ALL, REQUIRED, and OPTIONAL
* properties.
* @param special_property The special property ALL, REQUIRED, or OPTIONAL
* to fetch.
@@ -82,7 +82,7 @@ static BACNET_PROPERTY_ID RPM_Object_Property(
/**
* @brief Fetches the number of properties (array of BACNET_PROPERTY_ID's) for
* this object type belonging to the special properties ALL or REQUIRED or
* this object type belonging to the special properties ALL or REQUIRED or
* OPTIONAL.
* @param pPropertyList reference for the list of ALL, REQUIRED, and OPTIONAL
* properties.
@@ -108,7 +108,7 @@ static unsigned RPM_Object_Property_Count(
return count;
}
/**
/**
* @brief Encode the RPM property returning the length of the encoding,
* or 0 if there is no room to fit the encoding.
* @param apdu [out] The buffer to encode the property into.
@@ -516,7 +516,7 @@ void handler_read_property_multiple(uint8_t *service_request,
bytes_sent = datalink_send_pdu(
src, &npdu_data, &Handler_Transmit_Buffer[0], pdu_len);
if (bytes_sent <= 0) {
debug_fprintf(stderr, "RPM: Failed to send PDU (errno=%d)!\n",
debug_fprintf(stderr, "RPM: Failed to send PDU (errno=%d)!\n",
errno);
}
}
+1 -1
View File
@@ -35,7 +35,7 @@
* @param apdu [in] The received apdu data.
* @param apdu_len [in] Total length of the apdu.
* @param read_access_data [out] Pointer to the head of the linked list
* where the RPM data is to be stored.
* where the RPM data is to be stored.
* @return The number of bytes decoded, or -1 on error
*/
int rpm_ack_decode_service_request(
+1 -1
View File
@@ -97,7 +97,7 @@ void handler_who_is_unicast(
* @param service_len [in] Length of the service_request message.
* @param src [in] The BACNET_ADDRESS of the message's source.
* @param is_unicast [in] True if should send unicast response(s)
* back to the src, else False if should broadcast
* back to the src, else False if should broadcast
* response(s).
*/
static void check_who_is_for_routing(uint8_t *service_request,
-1
View File
@@ -388,4 +388,3 @@ bool tsm_invoke_id_failed(uint8_t invokeID)
return status;
}
#endif
+1 -1
View File
@@ -24,7 +24,7 @@ extern "C" {
#endif /* __cplusplus */
/* FIXME: modify basic service handlers to use TSM rather than this buffer! */
BACNET_STACK_EXPORT extern
BACNET_STACK_EXPORT extern
uint8_t Handler_Transmit_Buffer[MAX_PDU];
#ifdef __cplusplus
+118 -118
View File
@@ -73,27 +73,27 @@ Create a device instance configuration
Example Device configuration:
config dev '0'
option description 'Openwrt Router'
option modelname 'Openwrt Router'
option location 'Europe'
option app_ver '12.09'
option name 'openwrt-router-bip'
option id '4711'
option port '47808'
option net '0'
option iface 'lan'
option bacdl 'bip'
option description 'Openwrt Router'
option modelname 'Openwrt Router'
option location 'Europe'
option app_ver '12.09'
option name 'openwrt-router-bip'
option id '4711'
option port '47808'
option net '0'
option iface 'lan'
option bacdl 'bip'
config dev '1'
option description 'Openwrt Router'
option modelname 'Openwrt Router'
option location 'Europe'
option app_ver '12.09'
option name 'openwrt-router-ethernet'
option id '4712'
option net '0'
option iface 'lan'
option bacdl 'ethernet'
option description 'Openwrt Router'
option modelname 'Openwrt Router'
option location 'Europe'
option app_ver '12.09'
option name 'openwrt-router-ethernet'
option id '4712'
option net '0'
option iface 'lan'
option bacdl 'ethernet'
Create a Notification Class configuration:
@@ -102,23 +102,23 @@ Create a Notification Class configuration:
Example Notification Class configuration:
config nc 'default'
option description 'Notification Class default'
option name 'Notification Class'
option group 'ZF'
option description 'Notification Class default'
option name 'Notification Class'
option group 'ZF'
config nc '0'
option description 'Network Monitoring'
option name 'Komunikationfehler'
option group 'ZF'
list recipient '65535'
list recipient '1,104.13.8.92:47808'
option description 'Network Monitoring'
option name 'Komunikationfehler'
option group 'ZF'
list recipient '65535'
list recipient '1,104.13.8.92:47808'
config nc '1'
option description 'Modbus Sensor Fehler'
option name 'Sensor Fehler'
option group 'ZF'
list recipient '65535'
list recipient '1,104.13.8.92:47808'
option description 'Modbus Sensor Fehler'
option name 'Sensor Fehler'
option group 'ZF'
list recipient '65535'
list recipient '1,104.13.8.92:47808'
Create a Trendlog configuration:
touch /etc/config/bacnet_tl
@@ -126,18 +126,18 @@ Create a Trendlog configuration:
Example Trendlog configuration:
config tl 'default'
option description 'Analog Value'
option nc '1'
option interval '300'
option device_type 8
option object_type 2
option description 'Analog Value'
option nc '1'
option interval '300'
option device_type 8
option object_type 2
config tl '0'
option object_instance '0'
option interval '10'
option object_instance '0'
option interval '10'
config tl '1'
option object_instance '1'
option object_instance '1'
Create a Analog Value configuration:
@@ -146,42 +146,42 @@ Create a Analog Value configuration:
Example Analog Value configuration:
config av 'default'
option si_unit '98'
option description 'Analog Value'
option nc '1'
option event '7'
option limit '3'
option high_limit '40'
option low_limit '0'
option dead_limit '0'
option cov_increment '0.1'
option value '23.8'
option si_unit '98'
option description 'Analog Value'
option nc '1'
option event '7'
option limit '3'
option high_limit '40'
option low_limit '0'
option dead_limit '0'
option cov_increment '0.1'
option value '23.8'
config av '0'
option pgroup 'ZF_EZR08'
option name 'R801_RT'
option description 'Raumtemperatur'
option addr '1'
option tagname 'modbus-s1'
option si_unit '62'
option dead_limit '0.5'
option cov_increment '0.2'
option resolution 'doublefloat'
option value '0.000000'
option Out_Of_Service '0'
option value_time '1384274334'
option pgroup 'ZF_EZR08'
option name 'R801_RT'
option description 'Raumtemperatur'
option addr '1'
option tagname 'modbus-s1'
option si_unit '62'
option dead_limit '0.5'
option cov_increment '0.2'
option resolution 'doublefloat'
option value '0.000000'
option Out_Of_Service '0'
option value_time '1384274334'
config av '1'
option pgroup 'ZF_EZR08'
option name 'R802_RT'
option description 'Raumtemperatur'
option tagname 'modbus-s1'
option si_unit '62'
option resolution 'doublefloat'
option addr '3'
option value '0.000000'
option Out_Of_Service '0'
option value_time '1384274334'
option pgroup 'ZF_EZR08'
option name 'R802_RT'
option description 'Raumtemperatur'
option tagname 'modbus-s1'
option si_unit '62'
option resolution 'doublefloat'
option addr '3'
option value '0.000000'
option Out_Of_Service '0'
option value_time '1384274334'
Create a Multistate Value configuration
@@ -190,26 +190,26 @@ Create a Multistate Value configuration
Example Analog Value configuration:
config mv 'default'
list state 'up'
list state 'down'
list state 'unreachable'
list state 'flaping'
list alarmstate 'down'
list alarmstate 'unreachable'
list alarmstate 'flaping'
option description 'Multi State Value'
option nc '1'
option event '7'
list state 'up'
list state 'down'
list state 'unreachable'
list state 'flaping'
list alarmstate 'down'
list alarmstate 'unreachable'
list alarmstate 'flaping'
option description 'Multi State Value'
option nc '1'
option event '7'
config mv '0'
option name 'TR_EZR00_SV01'
option value '1'
option description '192.168.100.29'
option name 'TR_EZR00_SV01'
option value '1'
option description '192.168.100.29'
config mv '1'
option name 'TR_EZR01_SV01'
option value '1'
option description '192.168.100.30'
option name 'TR_EZR01_SV01'
option value '1'
option description '192.168.100.30'
Create a Binary Value configuration:
@@ -218,40 +218,40 @@ Create a Binary Value configuration:
Example Analog Value configuration:
config bv 'default'
option description 'Binary Value'
option inactive 'AUS'
option active 'EIN'
option nc '1'
option event '7'
option time_delay '3'
option description 'Binary Value'
option inactive 'AUS'
option active 'EIN'
option nc '1'
option event '7'
option time_delay '3'
config bv '0'
option name 'BV_00'
option alarm_value '0'
option tagname 'modbus-s1'
option addr '5'
option bit '0'
option resolution 'dword'
option active 'Ein'
option inactive 'Aus'
option description 'Datenwort 2 Bit 0'
option value '0'
option Out_Of_Service '0'
option value_time '1384274334'
option name 'BV_00'
option alarm_value '0'
option tagname 'modbus-s1'
option addr '5'
option bit '0'
option resolution 'dword'
option active 'Ein'
option inactive 'Aus'
option description 'Datenwort 2 Bit 0'
option value '0'
option Out_Of_Service '0'
option value_time '1384274334'
config bv '1'
option name 'BV_01'
option alarm_value '0'
option tagname 'modbus-s1'
option addr '5'
option bit '1'
option resolution 'dword'
option active 'Ein'
option inactive 'Aus'
option description 'Datenwort 2 Bit 1'
option Out_Of_Service '0'
option value '0'
option value_time '1384274334'
option name 'BV_01'
option alarm_value '0'
option tagname 'modbus-s1'
option addr '5'
option bit '1'
option resolution 'dword'
option active 'Ein'
option inactive 'Aus'
option description 'Datenwort 2 Bit 1'
option Out_Of_Service '0'
option value '0'
option value_time '1384274334'
## Run
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 John Crispin <blogic@openwrt.org>
*
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008 John Crispin <blogic@openwrt.org>
* Copyright (C) 2008 John Crispin <blogic@openwrt.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/