Corrected indentation using the indent tool.

This commit is contained in:
skarg
2008-03-19 21:26:54 +00:00
parent fb453ae1aa
commit 80023d79db
4 changed files with 19 additions and 20 deletions
+2 -2
View File
@@ -211,8 +211,8 @@ int main(int argc, char *argv[]) {
filename_remove_path(argv[0]), filename_remove_path(argv[0])); filename_remove_path(argv[0]), filename_remove_path(argv[0]));
return 0; return 0;
} }
/* decode the command line parameters */ cov_data. /* decode the command line parameters */
subscriberProcessIdentifier = strtol(argv[1], NULL, 0); cov_data.subscriberProcessIdentifier = strtol(argv[1], NULL, 0);
cov_data.initiatingDeviceIdentifier = strtol(argv[2], NULL, 0); cov_data.initiatingDeviceIdentifier = strtol(argv[2], NULL, 0);
cov_data.monitoredObjectIdentifier.type = strtol(argv[3], NULL, 0); cov_data.monitoredObjectIdentifier.type = strtol(argv[3], NULL, 0);
cov_data.monitoredObjectIdentifier.instance = strtol(argv[4], NULL, 0); cov_data.monitoredObjectIdentifier.instance = strtol(argv[4], NULL, 0);
+3 -2
View File
@@ -83,7 +83,7 @@ unsigned Analog_Value_Instance_To_Index(
char *Analog_Value_Name( char *Analog_Value_Name(
uint32_t object_instance) 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; text_string[3] = '0' + (uint8_t) object_instance;
@@ -123,7 +123,8 @@ int Analog_Value_Encode_Property_APDU(
case PROP_PRESENT_VALUE: case PROP_PRESENT_VALUE:
object_index = Analog_Value_Instance_To_Index(object_instance); object_index = Analog_Value_Instance_To_Index(object_instance);
apdu_len = apdu_len =
encode_application_real(&apdu[0], AV_Present_Value[object_index]); encode_application_real(&apdu[0],
AV_Present_Value[object_index]);
break; break;
case PROP_STATUS_FLAGS: case PROP_STATUS_FLAGS:
bitstring_init(&bit_string); bitstring_init(&bit_string);
+7 -10
View File
@@ -49,7 +49,7 @@
or sets the error, and returns -1 */ or sets the error, and returns -1 */
int Encode_Property_APDU( int Encode_Property_APDU(
uint8_t * apdu, uint8_t * apdu,
BACNET_READ_PROPERTY_DATA *rp_data, BACNET_READ_PROPERTY_DATA * rp_data,
BACNET_ERROR_CLASS * error_class, BACNET_ERROR_CLASS * error_class,
BACNET_ERROR_CODE * error_code) BACNET_ERROR_CODE * error_code)
{ {
@@ -61,19 +61,16 @@ int Encode_Property_APDU(
if (Device_Valid_Object_Instance_Number(rp_data->object_instance)) { if (Device_Valid_Object_Instance_Number(rp_data->object_instance)) {
apdu_len = apdu_len =
Device_Encode_Property_APDU(&apdu[0], Device_Encode_Property_APDU(&apdu[0],
rp_data->object_property, rp_data->object_property, rp_data->array_index,
rp_data->array_index, error_class, error_code);
error_class, error_code);
} }
break; break;
case OBJECT_ANALOG_VALUE: case OBJECT_ANALOG_VALUE:
if (Analog_Value_Valid_Instance(rp_data->object_instance)) { if (Analog_Value_Valid_Instance(rp_data->object_instance)) {
apdu_len = apdu_len =
Analog_Value_Encode_Property_APDU(&apdu[0], Analog_Value_Encode_Property_APDU(&apdu[0],
rp_data->object_instance, rp_data->object_instance, rp_data->object_property,
rp_data->object_property, rp_data->array_index, error_class, error_code);
rp_data->array_index,
error_class, error_code);
} }
break; break;
default: default:
@@ -131,7 +128,7 @@ void handler_read_property(
/* FIXME: add buffer len as passed into function or use smart buffer */ /* FIXME: add buffer len as passed into function or use smart buffer */
property_len = property_len =
Encode_Property_APDU(&Handler_Transmit_Buffer[pdu_len + ack_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) { if (property_len >= 0) {
len = len =
rp_ack_encode_apdu_object_property_end(&Handler_Transmit_Buffer rp_ack_encode_apdu_object_property_end(&Handler_Transmit_Buffer
@@ -154,7 +151,7 @@ void handler_read_property(
break; break;
} }
} }
RP_ABORT: RP_ABORT:
pdu_len += len; pdu_len += len;
bytes_sent = bytes_sent =
datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0], datalink_send_pdu(src, &npdu_data, &Handler_Transmit_Buffer[0],
+4 -3
View File
@@ -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; AV_Present_Value[0] = 3.14159F;
} }
@@ -166,7 +167,7 @@ int main(
for (;;) { for (;;) {
input_switch_read(); input_switch_read();
task_milliseconds(); task_milliseconds();
Analog_Value_Task(); Analog_Value_Task();
/* other tasks */ /* other tasks */
/* BACnet handling */ /* BACnet handling */
pdu_len = datalink_receive(&src, &PDUBuffer[0], sizeof(PDUBuffer), 0); pdu_len = datalink_receive(&src, &PDUBuffer[0], sizeof(PDUBuffer), 0);