Indented.

This commit is contained in:
skarg
2010-08-18 00:11:35 +00:00
parent 1165f94cf5
commit b769dcbe1d
40 changed files with 286 additions and 302 deletions
+4 -5
View File
@@ -345,9 +345,8 @@ static bool cov_send_request(
value_list[1].next = NULL;
switch (cov_subscription->monitoredObjectIdentifier.type) {
case OBJECT_BINARY_INPUT:
Binary_Input_Encode_Value_List
(cov_subscription->monitoredObjectIdentifier.instance,
&value_list[0]);
Binary_Input_Encode_Value_List(cov_subscription->
monitoredObjectIdentifier.instance, &value_list[0]);
break;
default:
goto COV_FAILED;
@@ -464,8 +463,8 @@ static bool cov_subscribe(
switch (cov_data->monitoredObjectIdentifier.type) {
case OBJECT_BINARY_INPUT:
if (Binary_Input_Valid_Instance
(cov_data->monitoredObjectIdentifier.instance)) {
if (Binary_Input_Valid_Instance(cov_data->
monitoredObjectIdentifier.instance)) {
status =
cov_list_subscribe(src, cov_data, error_class, error_code);
} else {
+6 -6
View File
@@ -218,8 +218,8 @@ void rpm_ack_print_data(
#if PRINT_ENABLED
if (listOfProperties->propertyIdentifier < 512) {
fprintf(stdout, " %s: ",
bactext_property_name(listOfProperties->
propertyIdentifier));
bactext_property_name
(listOfProperties->propertyIdentifier));
} else {
fprintf(stdout, " proprietary %u: ",
(unsigned) listOfProperties->propertyIdentifier);
@@ -260,10 +260,10 @@ void rpm_ack_print_data(
#if PRINT_ENABLED
/* AccessError */
fprintf(stdout, "BACnet Error: %s: %s\r\n",
bactext_error_class_name((int) listOfProperties->
error.error_class),
bactext_error_code_name((int) listOfProperties->
error.error_code));
bactext_error_class_name((int) listOfProperties->error.
error_class),
bactext_error_code_name((int) listOfProperties->error.
error_code));
#endif
}
listOfProperties = listOfProperties->next;
+2 -2
View File
@@ -104,8 +104,8 @@ void handler_ucov_notification(
fprintf(stderr, "UCOV: ");
if (pProperty_value->propertyIdentifier < 512) {
fprintf(stderr, "%s ",
bactext_property_name
(pProperty_value->propertyIdentifier));
bactext_property_name(pProperty_value->
propertyIdentifier));
} else {
fprintf(stderr, "proprietary %u ",
pProperty_value->propertyIdentifier);
+3 -3
View File
@@ -79,8 +79,8 @@ void handler_who_has(
&object_instance);
if (found)
Send_I_Have(Device_Object_Instance_Number(),
(BACNET_OBJECT_TYPE)object_type,
object_instance, object_name);
(BACNET_OBJECT_TYPE) object_type, object_instance,
object_name);
} else {
/* valid object in my device? */
object_name =
@@ -88,7 +88,7 @@ void handler_who_has(
data.object.identifier.instance);
if (object_name)
Send_I_Have(Device_Object_Instance_Number(),
(BACNET_OBJECT_TYPE)data.object.identifier.type,
(BACNET_OBJECT_TYPE) data.object.identifier.type,
data.object.identifier.instance, object_name);
}
}
+2 -2
View File
@@ -174,8 +174,8 @@ bool WPValidateString(
(characterstring_length(&pValue->type.Character_String) ==
0)) {
*pErrorCode = ERROR_CODE_VALUE_OUT_OF_RANGE;
} else if (characterstring_length(&pValue->
type.Character_String) >= iMaxLen) {
} else if (characterstring_length(&pValue->type.
Character_String) >= iMaxLen) {
*pErrorClass = ERROR_CLASS_RESOURCES;
*pErrorCode = ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY;
} else
+7 -8
View File
@@ -69,15 +69,16 @@ void Send_WhoIs_To_Network(
/* encode the NPDU portion of the packet */
npdu_encode_npdu_data(&npdu_data, false, MESSAGE_PRIORITY_NORMAL);
pdu_len =
npdu_encode_pdu(&Handler_Transmit_Buffer[0],target_address, NULL, &npdu_data);
npdu_encode_pdu(&Handler_Transmit_Buffer[0], target_address, NULL,
&npdu_data);
/* encode the APDU portion of the packet */
len =
whois_encode_apdu(&Handler_Transmit_Buffer[pdu_len], low_limit,
high_limit);
pdu_len += len;
bytes_sent =
datalink_send_pdu(target_address, &npdu_data, &Handler_Transmit_Buffer[0],
pdu_len);
datalink_send_pdu(target_address, &npdu_data,
&Handler_Transmit_Buffer[0], pdu_len);
#if PRINT_ENABLED
if (bytes_sent <= 0)
fprintf(stderr, "Failed to Send Who-Is Request (%s)!\n",
@@ -145,9 +146,8 @@ void Send_WhoIs_Local(
int loop;
for(loop = 0; loop < 6; loop++)
{
dest.mac[loop] = temp[loop];
for (loop = 0; loop < 6; loop++) {
dest.mac[loop] = temp[loop];
}
Send_WhoIs_To_Network(&dest, low_limit, high_limit);
@@ -171,7 +171,7 @@ void Send_WhoIs_Remote(
if (!dcc_communication_enabled())
return;
Send_WhoIs_To_Network(target_address, low_limit, high_limit);
Send_WhoIs_To_Network(target_address, low_limit, high_limit);
}
/** Send a global Who-Is request for a specific device, a range, or any device.
@@ -191,4 +191,3 @@ void Send_WhoIs(
{
Send_WhoIs_Global(low_limit, high_limit);
}
+2 -3
View File
@@ -155,9 +155,8 @@ uint8_t Send_Write_Property_Request(
#if PRINT_ENABLED_DEBUG
fprintf(stderr, "WriteProperty service: " "%s tag=%d\n",
(object_value->context_specific ? "context" : "application"),
(int) (object_value->
context_specific ? object_value->context_tag : object_value->
tag));
(int) (object_value->context_specific ? object_value->
context_tag : object_value->tag));
#endif
len = bacapp_encode_data(&application_data[apdu_len], object_value);
if ((len + apdu_len) < MAX_APDU) {