indented per coding standard using indent.sh

This commit is contained in:
skarg
2006-05-24 19:57:35 +00:00
parent 500d324b0f
commit 648af404d6
12 changed files with 673 additions and 719 deletions
+25 -26
View File
@@ -35,7 +35,7 @@
#include "bi.h" /* object list dependency */
#include "bo.h" /* object list dependency */
#include "ao.h" /* object list dependency */
#include "lsp.h" /* object list dependency */
#include "lsp.h" /* object list dependency */
#include "wp.h" /* write property handling */
#include "device.h" /* me */
#if BACFILE
@@ -67,11 +67,11 @@ static char Description[16] = "server";
/* static uint8_t Max_Segments_Accepted = 0; */
/* VT_Classes_Supported */
/* Active_VT_Sessions */
BACNET_TIME Local_Time; /* rely on OS, if there is one */
BACNET_DATE Local_Date; /* rely on OS, if there is one */
BACNET_TIME Local_Time; /* rely on OS, if there is one */
BACNET_DATE Local_Date; /* rely on OS, if there is one */
/* BACnet UTC is inverse of standard offset - i.e. relative to local */
static int UTC_Offset = 5;
static bool Daylight_Savings_Status = false; /* rely on OS */
static int UTC_Offset = 5;
static bool Daylight_Savings_Status = false; /* rely on OS */
/* APDU_Segment_Timeout */
static uint16_t APDU_Timeout = 3000;
static uint8_t Number_Of_APDU_Retries = 3;
@@ -405,7 +405,7 @@ bool Device_Object_List_Identifier(unsigned array_index,
}
/* file objects */
#if BACFILE
if (!status) {
if (!status) {
/* normalize the index since
we know it is not the previous objects */
object_index -= Life_Safety_Point_Count();
@@ -541,32 +541,32 @@ int Device_Encode_Property_APDU(uint8_t * apdu,
Application_Software_Version);
apdu_len = encode_tagged_character_string(&apdu[0], &char_string);
break;
/* FIXME: if you support time */
/* FIXME: if you support time */
case PROP_LOCAL_TIME:
/* FIXME: get the actual value */
Local_Time.hour = 7;
Local_Time.min = 0;
Local_Time.sec = 3;
Local_Time.hundredths = 1;
apdu_len =
encode_tagged_time(&apdu[0], &Local_Time);
break;
/* FIXME: if you support time */
apdu_len = encode_tagged_time(&apdu[0], &Local_Time);
break;
/* FIXME: if you support time */
case PROP_UTC_OFFSET:
/* NOTE: if your UTC offset is -5, then BACnet UTC offset is 5 */
apdu_len = encode_tagged_signed(&apdu[0], UTC_Offset);
break;
/* FIXME: if you support date */
/* FIXME: if you support date */
case PROP_LOCAL_DATE:
/* FIXME: get the actual value instead of April Fool's Day */
Local_Date.year = 2006; /* AD */
Local_Date.month = 4; /* 1=Jan */
Local_Date.day = 1; /* 1..31 */
Local_Date.wday = 6; /* 1=Monday */
apdu_len = encode_tagged_date(&apdu[0],&Local_Date);
Local_Date.year = 2006; /* AD */
Local_Date.month = 4; /* 1=Jan */
Local_Date.day = 1; /* 1..31 */
Local_Date.wday = 6; /* 1=Monday */
apdu_len = encode_tagged_date(&apdu[0], &Local_Date);
break;
case PROP_DAYLIGHT_SAVINGS_STATUS:
apdu_len = encode_tagged_boolean(&apdu[0], Daylight_Savings_Status);
apdu_len =
encode_tagged_boolean(&apdu[0], Daylight_Savings_Status);
break;
case PROP_PROTOCOL_VERSION:
apdu_len =
@@ -601,18 +601,18 @@ int Device_Encode_Property_APDU(uint8_t * apdu,
/* FIXME: indicate the objects that YOU support */
bitstring_set_bit(&bit_string, OBJECT_DEVICE, true);
if (Analog_Input_Count())
bitstring_set_bit(&bit_string, OBJECT_ANALOG_INPUT, true);
bitstring_set_bit(&bit_string, OBJECT_ANALOG_INPUT, true);
if (Analog_Output_Count())
bitstring_set_bit(&bit_string, OBJECT_ANALOG_OUTPUT, true);
bitstring_set_bit(&bit_string, OBJECT_ANALOG_OUTPUT, true);
if (Binary_Input_Count())
bitstring_set_bit(&bit_string, OBJECT_BINARY_INPUT, true);
bitstring_set_bit(&bit_string, OBJECT_BINARY_INPUT, true);
if (Binary_Output_Count())
bitstring_set_bit(&bit_string, OBJECT_BINARY_OUTPUT, true);
bitstring_set_bit(&bit_string, OBJECT_BINARY_OUTPUT, true);
if (Life_Safety_Point_Count())
bitstring_set_bit(&bit_string, OBJECT_LIFE_SAFETY_POINT, true);
bitstring_set_bit(&bit_string, OBJECT_LIFE_SAFETY_POINT, true);
#if BACFILE
if (bacfile_count())
bitstring_set_bit(&bit_string, OBJECT_FILE, true);
bitstring_set_bit(&bit_string, OBJECT_FILE, true);
#endif
apdu_len = encode_tagged_bitstring(&apdu[0], &bit_string);
break;
@@ -681,8 +681,7 @@ int Device_Encode_Property_APDU(uint8_t * apdu,
/* FIXME: encode the list here, if it exists */
break;
case PROP_DATABASE_REVISION:
apdu_len =
encode_tagged_unsigned(&apdu[0], Database_Revision);
apdu_len = encode_tagged_unsigned(&apdu[0], Database_Revision);
break;
default:
*error_class = ERROR_CLASS_PROPERTY;