Standardized the comments and indentation using the comment.sh and indent.sh scripts.
This commit is contained in:
@@ -54,8 +54,7 @@ static uint8_t Temp_Buf[MAX_APDU] = { 0 };
|
||||
|
||||
void handler_read_property(uint8_t * service_request,
|
||||
uint16_t service_len,
|
||||
BACNET_ADDRESS * src,
|
||||
BACNET_CONFIRMED_SERVICE_DATA * service_data)
|
||||
BACNET_ADDRESS * src, BACNET_CONFIRMED_SERVICE_DATA * service_data)
|
||||
{
|
||||
BACNET_READ_PROPERTY_DATA data;
|
||||
int len = 0;
|
||||
|
||||
@@ -67,11 +67,11 @@ static void PrintReadPropertyData(BACNET_READ_PROPERTY_DATA * data)
|
||||
#endif
|
||||
application_data = data->application_data;
|
||||
application_data_len = data->application_data_len;
|
||||
/* FIXME: what if application_data_len is bigger than 255? */
|
||||
/* FIXME: what if application_data_len is bigger than 255? */
|
||||
/* value? need to loop until all of the len is gone... */
|
||||
for (;;) {
|
||||
len = bacapp_decode_application_data(application_data,
|
||||
(uint8_t)application_data_len, &value);
|
||||
(uint8_t) application_data_len, &value);
|
||||
if (first_value && (len < application_data_len)) {
|
||||
first_value = false;
|
||||
fprintf(stdout, "{");
|
||||
|
||||
@@ -259,7 +259,8 @@ void handler_write_property(uint8_t * service_request,
|
||||
SERVICE_CONFIRMED_WRITE_PROPERTY, error_class,
|
||||
error_code);
|
||||
#if PRINT_ENABLED
|
||||
fprintf(stderr, "Sending Write Access Error for Load Control!\n");
|
||||
fprintf(stderr,
|
||||
"Sending Write Access Error for Load Control!\n");
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -89,7 +89,8 @@ uint8_t Send_Read_Property_Request(uint32_t device_id, /* destination device */
|
||||
max_apdu in the address binding table. */
|
||||
if ((unsigned) pdu_len < max_apdu) {
|
||||
tsm_set_confirmed_unsegmented_transaction(invoke_id, &dest,
|
||||
&npdu_data, &Handler_Transmit_Buffer[0], (uint16_t)pdu_len);
|
||||
&npdu_data, &Handler_Transmit_Buffer[0],
|
||||
(uint16_t) pdu_len);
|
||||
bytes_sent =
|
||||
datalink_send_pdu(&dest, &npdu_data,
|
||||
&Handler_Transmit_Buffer[0], pdu_len);
|
||||
|
||||
@@ -81,8 +81,8 @@ uint8_t Send_Write_Property_Request(uint32_t device_id, /* destination device */
|
||||
data.object_property = object_property;
|
||||
data.array_index = array_index;
|
||||
data.application_data_len =
|
||||
bacapp_encode_application_data(
|
||||
&data.application_data[0],object_value);
|
||||
bacapp_encode_application_data(&data.application_data[0],
|
||||
object_value);
|
||||
data.priority = priority;
|
||||
len = wp_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||
invoke_id, &data);
|
||||
@@ -94,7 +94,8 @@ uint8_t Send_Write_Property_Request(uint32_t device_id, /* destination device */
|
||||
max_apdu in the address binding table. */
|
||||
if ((unsigned) pdu_len < max_apdu) {
|
||||
tsm_set_confirmed_unsegmented_transaction(invoke_id, &dest,
|
||||
&npdu_data, &Handler_Transmit_Buffer[0], (uint16_t)pdu_len);
|
||||
&npdu_data, &Handler_Transmit_Buffer[0],
|
||||
(uint16_t) pdu_len);
|
||||
bytes_sent =
|
||||
datalink_send_pdu(&dest, &npdu_data,
|
||||
&Handler_Transmit_Buffer[0], pdu_len);
|
||||
|
||||
Reference in New Issue
Block a user