From 80023d79dbeeec2b92fa9f340339993eb22ddc4d Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 19 Mar 2008 21:26:54 +0000 Subject: [PATCH] Corrected indentation using the indent tool. --- bacnet-stack/demo/ucov/main.c | 4 ++-- bacnet-stack/ports/atmega168/av.c | 5 +++-- bacnet-stack/ports/atmega168/h_rp.c | 19 ++++++++----------- bacnet-stack/ports/atmega168/main.c | 11 ++++++----- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/bacnet-stack/demo/ucov/main.c b/bacnet-stack/demo/ucov/main.c index f2ec7562..c633d81a 100644 --- a/bacnet-stack/demo/ucov/main.c +++ b/bacnet-stack/demo/ucov/main.c @@ -211,8 +211,8 @@ int main(int argc, char *argv[]) { filename_remove_path(argv[0]), filename_remove_path(argv[0])); return 0; } - /* decode the command line parameters */ cov_data. - subscriberProcessIdentifier = strtol(argv[1], NULL, 0); + /* decode the command line parameters */ + cov_data.subscriberProcessIdentifier = strtol(argv[1], NULL, 0); cov_data.initiatingDeviceIdentifier = strtol(argv[2], NULL, 0); cov_data.monitoredObjectIdentifier.type = strtol(argv[3], NULL, 0); cov_data.monitoredObjectIdentifier.instance = strtol(argv[4], NULL, 0); diff --git a/bacnet-stack/ports/atmega168/av.c b/bacnet-stack/ports/atmega168/av.c index 6026382a..699164d2 100644 --- a/bacnet-stack/ports/atmega168/av.c +++ b/bacnet-stack/ports/atmega168/av.c @@ -83,7 +83,7 @@ unsigned Analog_Value_Instance_To_Index( char *Analog_Value_Name( uint32_t object_instance) { - static char text_string[5] = "AV-"; /* okay for single thread */ + static char text_string[5] = "AV-"; /* okay for single thread */ text_string[3] = '0' + (uint8_t) object_instance; @@ -123,7 +123,8 @@ int Analog_Value_Encode_Property_APDU( case PROP_PRESENT_VALUE: object_index = Analog_Value_Instance_To_Index(object_instance); apdu_len = - encode_application_real(&apdu[0], AV_Present_Value[object_index]); + encode_application_real(&apdu[0], + AV_Present_Value[object_index]); break; case PROP_STATUS_FLAGS: bitstring_init(&bit_string); diff --git a/bacnet-stack/ports/atmega168/h_rp.c b/bacnet-stack/ports/atmega168/h_rp.c index e27def72..bf6400e8 100644 --- a/bacnet-stack/ports/atmega168/h_rp.c +++ b/bacnet-stack/ports/atmega168/h_rp.c @@ -49,7 +49,7 @@ or sets the error, and returns -1 */ int Encode_Property_APDU( uint8_t * apdu, - BACNET_READ_PROPERTY_DATA *rp_data, + BACNET_READ_PROPERTY_DATA * rp_data, BACNET_ERROR_CLASS * error_class, BACNET_ERROR_CODE * error_code) { @@ -61,19 +61,16 @@ int Encode_Property_APDU( if (Device_Valid_Object_Instance_Number(rp_data->object_instance)) { apdu_len = Device_Encode_Property_APDU(&apdu[0], - rp_data->object_property, - rp_data->array_index, - error_class, error_code); + rp_data->object_property, rp_data->array_index, + error_class, error_code); } break; case OBJECT_ANALOG_VALUE: if (Analog_Value_Valid_Instance(rp_data->object_instance)) { apdu_len = Analog_Value_Encode_Property_APDU(&apdu[0], - rp_data->object_instance, - rp_data->object_property, - rp_data->array_index, - error_class, error_code); + rp_data->object_instance, rp_data->object_property, + rp_data->array_index, error_class, error_code); } break; default: @@ -115,7 +112,7 @@ void handler_read_property( service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED, true); goto RP_ABORT; - } + } len = rp_decode_service_request(service_request, service_len, &data); if (len < 0) { /* bad decoding - send an abort */ @@ -131,7 +128,7 @@ void handler_read_property( /* FIXME: add buffer len as passed into function or use smart buffer */ property_len = Encode_Property_APDU(&Handler_Transmit_Buffer[pdu_len + ack_len], - &data, &error_class, &error_code); + &data, &error_class, &error_code); if (property_len >= 0) { len = rp_ack_encode_apdu_object_property_end(&Handler_Transmit_Buffer @@ -154,7 +151,7 @@ void handler_read_property( break; } } -RP_ABORT: + RP_ABORT: pdu_len += len; bytes_sent = datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0], diff --git a/bacnet-stack/ports/atmega168/main.c b/bacnet-stack/ports/atmega168/main.c index bc0febf6..6bc000fc 100644 --- a/bacnet-stack/ports/atmega168/main.c +++ b/bacnet-stack/ports/atmega168/main.c @@ -39,7 +39,7 @@ const char *BACnet_Version = "1.0"; /* For porting to IAR, see: http://www.avrfreaks.net/wiki/index.php/Documentation:AVR_GCC/IarToAvrgcc*/ - + #define LED_NPDU_INIT() BIT_SET(DDRD, DDD5) #define LED_NPDU_ON() BIT_CLEAR(PORTD, PD5) #define LED_NPDU_OFF() BIT_SET(PORTD, PD5) @@ -93,7 +93,7 @@ static void init( /* Configure Specialized Hardware */ RS485_Initialize(); - + /* configure one LED for NPDU indication */ /* default: off, output */ LED_NPDU_OFF(); @@ -142,9 +142,10 @@ static void input_switch_read( } } -static void Analog_Value_Task(void) +static void Analog_Value_Task( + void) { - extern float AV_Present_Value[MAX_ANALOG_VALUES]; + extern float AV_Present_Value[MAX_ANALOG_VALUES]; AV_Present_Value[0] = 3.14159F; } @@ -166,7 +167,7 @@ int main( for (;;) { input_switch_read(); task_milliseconds(); - Analog_Value_Task(); + Analog_Value_Task(); /* other tasks */ /* BACnet handling */ pdu_len = datalink_receive(&src, &PDUBuffer[0], sizeof(PDUBuffer), 0);