diff --git a/bacnet-stack/demo/handler/h_wpm.c b/bacnet-stack/demo/handler/h_wpm.c index 9495efe2..2a205621 100644 --- a/bacnet-stack/demo/handler/h_wpm.c +++ b/bacnet-stack/demo/handler/h_wpm.c @@ -97,7 +97,7 @@ void handler_write_property_multiple( decode_len = 0; do { - // decode Object Identifier + /* decode Object Identifier */ len = wpm_decode_object_id(&service_request[decode_len], service_len - decode_len, &wp_data); if (len > 0) @@ -105,13 +105,13 @@ void handler_write_property_multiple( uint8_t tag_number = 0; decode_len += len; - // Opening tag 1 - List of Properties + /* Opening tag 1 - List of Properties */ if (decode_is_opening_tag_number(&service_request[decode_len++], 1)) { do { - // decode a 'Property Identifier'; (3) an optional 'Property Array Index'; - // (4) a 'Property Value'; and (5) an optional 'Priority'. + /* decode a 'Property Identifier'; (3) an optional 'Property Array Index'; */ + /* (4) a 'Property Value'; and (5) an optional 'Priority'. */ len = wpm_decode_object_property(&service_request[decode_len], service_len - decode_len, &wp_data); if (len > 0) @@ -120,7 +120,7 @@ void handler_write_property_multiple( if (Device_Write_Property(&wp_data) == false) { error = true; - break; // do while (decoding List of Properties) + break; /* do while (decoding List of Properties) */ } } else @@ -131,23 +131,23 @@ void handler_write_property_multiple( wp_data.error_class = ERROR_CLASS_PROPERTY; wp_data.error_code = ERROR_CODE_OTHER; error = true; - break; // do while (decoding List of Properties) + break; /* do while (decoding List of Properties) */ } - // Closing tag 1 - List of Properties + /* Closing tag 1 - List of Properties */ if (decode_is_closing_tag_number(&service_request[decode_len], 1)) { tag_number = 1; decode_len++; } else - tag_number = 0; // it was not tag 1, decode next Property Identifier ... + tag_number = 0; /* it was not tag 1, decode next Property Identifier ... */ } - while(tag_number != 1); // end decoding List of Properties for "that" object + while(tag_number != 1); /* end decoding List of Properties for "that" object */ if (error) - break; //do while (decode service request) + break; /*do while (decode service request) */ } } else @@ -158,7 +158,7 @@ void handler_write_property_multiple( wp_data.error_class = ERROR_CLASS_OBJECT; wp_data.error_code = ERROR_CODE_OTHER; error = true; - break; //do while (decode service request) + break; /*do while (decode service request) */ } } while(decode_len < service_len); diff --git a/bacnet-stack/demo/object/av.c b/bacnet-stack/demo/object/av.c index 3521f6a6..dd06006e 100644 --- a/bacnet-stack/demo/object/av.c +++ b/bacnet-stack/demo/object/av.c @@ -435,7 +435,7 @@ int Analog_Value_Read_Property( bitstring_set_bit(&bit_string, TRANSITION_TO_FAULT, true); bitstring_set_bit(&bit_string, TRANSITION_TO_NORMAL, true); - /// Fixme: finish it + /*/ Fixme: finish it */ apdu_len = encode_application_bitstring(&apdu[0], &bit_string); break; diff --git a/bacnet-stack/demo/object/nc.c b/bacnet-stack/demo/object/nc.c index c9c8dece..d65323d2 100644 --- a/bacnet-stack/demo/object/nc.c +++ b/bacnet-stack/demo/object/nc.c @@ -104,31 +104,31 @@ void Notification_Class_Init(void) } /* init with special values for tests */ -// NC_Info[0].Ack_Required = TRANSITION_TO_NORMAL_MASKED; -// NC_Info[0].Priority[0] = 248; -// NC_Info[0].Priority[1] = 192; -// NC_Info[0].Priority[2] = 200; -// NC_Info[0].Recipient_List[0].ValidDays = 0x1F; /* from monday to friday */ -// NC_Info[0].Recipient_List[0].FromTime.hour = 6; -// NC_Info[0].Recipient_List[0].FromTime.min = 15; -// NC_Info[0].Recipient_List[0].FromTime.sec = 10; -// NC_Info[0].Recipient_List[0].FromTime.hundredths = 0; -// NC_Info[0].Recipient_List[0].ToTime.hour = 23; -// NC_Info[0].Recipient_List[0].ToTime.min = 48; -// NC_Info[0].Recipient_List[0].ToTime.sec = 59; -// NC_Info[0].Recipient_List[0].ToTime.hundredths = 0; -// NC_Info[0].Recipient_List[0].Recipient.RecipientType = RECIPIENT_TYPE_ADDRESS; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[0] = 0xC0; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[1] = 0xA8; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[2] = 0x01; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[3] = 0xFF; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[4] = 0xBA; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac[5] = 0xC0; -// NC_Info[0].Recipient_List[0].Recipient._.Address.mac_len = 6; -// NC_Info[0].Recipient_List[0].ProcessIdentifier = 112233; -// NC_Info[0].Recipient_List[0].ConfirmedNotify = true; -// NC_Info[0].Recipient_List[0].Transitions = -// TRANSITION_TO_OFFNORMAL_MASKED | TRANSITION_TO_NORMAL_MASKED; +/* NC_Info[0].Ack_Required = TRANSITION_TO_NORMAL_MASKED; */ +/* NC_Info[0].Priority[0] = 248; */ +/* NC_Info[0].Priority[1] = 192; */ +/* NC_Info[0].Priority[2] = 200; */ +/* NC_Info[0].Recipient_List[0].ValidDays = 0x1F; /* from monday to friday */ */ +/* NC_Info[0].Recipient_List[0].FromTime.hour = 6; */ +/* NC_Info[0].Recipient_List[0].FromTime.min = 15; */ +/* NC_Info[0].Recipient_List[0].FromTime.sec = 10; */ +/* NC_Info[0].Recipient_List[0].FromTime.hundredths = 0; */ +/* NC_Info[0].Recipient_List[0].ToTime.hour = 23; */ +/* NC_Info[0].Recipient_List[0].ToTime.min = 48; */ +/* NC_Info[0].Recipient_List[0].ToTime.sec = 59; */ +/* NC_Info[0].Recipient_List[0].ToTime.hundredths = 0; */ +/* NC_Info[0].Recipient_List[0].Recipient.RecipientType = RECIPIENT_TYPE_ADDRESS; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[0] = 0xC0; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[1] = 0xA8; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[2] = 0x01; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[3] = 0xFF; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[4] = 0xBA; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac[5] = 0xC0; */ +/* NC_Info[0].Recipient_List[0].Recipient._.Address.mac_len = 6; */ +/* NC_Info[0].Recipient_List[0].ProcessIdentifier = 112233; */ +/* NC_Info[0].Recipient_List[0].ConfirmedNotify = true; */ +/* NC_Info[0].Recipient_List[0].Transitions = */ +/* TRANSITION_TO_OFFNORMAL_MASKED | TRANSITION_TO_NORMAL_MASKED; */ return; @@ -422,7 +422,7 @@ bool Notification_Class_Write_Property( CurrentNotify = &NC_Info[Notification_Class_Instance_To_Index(wp_data->object_instance)]; - // decode the some of the request + /* decode the some of the request */ len = bacapp_decode_application_data(wp_data->application_data, wp_data->application_data_len, &value); @@ -439,7 +439,7 @@ bool Notification_Class_Write_Property( wp_data->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; } else if (wp_data->array_index == BACNET_ARRAY_ALL) { - /// FIXME: wite all array + /*/ FIXME: wite all array */ } else if (wp_data->array_index <= 3) { CurrentNotify->Priority[wp_data->array_index - 1] = @@ -693,8 +693,8 @@ bool Notification_Class_Write_Property( } else if (CurrentNotify->Recipient_List[idx].Recipient.RecipientType == RECIPIENT_TYPE_ADDRESS) { /* copy Address */ - ///src = CurrentNotify->Recipient_List[idx].Recipient._.Address; - ///address_bind_request(BACNET_MAX_INSTANCE, &max_apdu, &src); + /*/src = CurrentNotify->Recipient_List[idx].Recipient._.Address; */ + /*/address_bind_request(BACNET_MAX_INSTANCE, &max_apdu, &src); */ } } @@ -810,7 +810,7 @@ void Notification_Class_common_reporting_function( TRANSITION_TO_NORMAL) ? true : false; break; - default: // shouldn't happen + default: /* shouldn't happen */ break; } diff --git a/bacnet-stack/demo/object/nc.h b/bacnet-stack/demo/object/nc.h index d36825ea..b2898fe8 100644 --- a/bacnet-stack/demo/object/nc.h +++ b/bacnet-stack/demo/object/nc.h @@ -121,4 +121,4 @@ typedef struct Notification_Class_info { Notification_Class_Write_Property, Notification_Class_Property_Lists, \ NULL, NULL, NULL -#endif // NC_H +#endif /* NC_H */ diff --git a/bacnet-stack/src/wpm.c b/bacnet-stack/src/wpm.c index 3ae7422c..b2a35be6 100644 --- a/bacnet-stack/src/wpm.c +++ b/bacnet-stack/src/wpm.c @@ -44,7 +44,7 @@ int wpm_decode_object_id(uint8_t * apdu, uint16_t apdu_len, if((apdu )&& (apdu_len)) { - // Context tag 0 - Object ID + /* Context tag 0 - Object ID */ len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); if(tag_number == 0) { @@ -78,7 +78,7 @@ int wpm_decode_object_property(uint8_t * apdu, wp_data->priority = BACNET_NO_PRIORITY; wp_data->application_data_len = 0; - // tag 0 - Property Identifier + /* tag 0 - Property Identifier */ len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); if(tag_number == 0) { @@ -88,7 +88,7 @@ int wpm_decode_object_property(uint8_t * apdu, else return -1; - // tag 1 - Property Array Index - optional + /* tag 1 - Property Array Index - optional */ len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); if(tag_number ==1) { @@ -97,7 +97,7 @@ int wpm_decode_object_property(uint8_t * apdu, len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); } - // tag 2 - Property Value + /* tag 2 - Property Value */ if((tag_number == 2) && (decode_is_opening_tag(&apdu[len-1]))) { len--; @@ -105,20 +105,20 @@ int wpm_decode_object_property(uint8_t * apdu, apdu_len - len, wp_data->object_property); len++; - // copy application data + /* copy application data */ for(i = 0; i < wp_data->application_data_len; i++) wp_data->application_data[i] = apdu[len+i]; len += wp_data->application_data_len; len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); - // closing tag 2 + /* closing tag 2 */ if((tag_number != 2) &&(decode_is_closing_tag(&apdu[len-1]))) return -1; } else return -1; - // tag 3 - Priority - optional + /* tag 3 - Priority - optional */ len += decode_tag_number_and_value(&apdu[len], &tag_number, &len_value); if(tag_number == 3) {