Converted comments to C style using convert.sh script.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
*/
|
||||
@@ -422,7 +422,7 @@ bool Notification_Class_Write_Property(
|
||||
/* only array properties can have array options */
|
||||
if ((apdu_len >= 0) && (rpdata->object_property != PROP_PRIORITY) &&
|
||||
(rpdata->array_index != BACNET_ARRAY_ALL))
|
||||
// decode the some of the request
|
||||
{
|
||||
rpdata->error_class = ERROR_CLASS_PROPERTY;
|
||||
rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
|
||||
apdu_len = BACNET_STATUS_ERROR;
|
||||
@@ -439,7 +439,7 @@ bool Notification_Class_Write_Property(
|
||||
NOTIFICATION_CLASS_INFO TmpNotify;
|
||||
BACNET_APPLICATION_DATA_VALUE value;
|
||||
bool status = false;
|
||||
/// FIXME: wite all array
|
||||
int iOffset = 0;
|
||||
uint8_t idx = 0;
|
||||
int len = 0;
|
||||
|
||||
@@ -693,8 +693,8 @@ bool Notification_Class_Write_Property(
|
||||
return false;
|
||||
}
|
||||
iOffset += len;
|
||||
///src = CurrentNotify->Recipient_List[idx].Recipient._.Address;
|
||||
///address_bind_request(BACNET_MAX_INSTANCE, &max_apdu, &src);
|
||||
|
||||
/* Increasing element of list */
|
||||
if (++idx >= NC_MAX_RECIPIENTS) {
|
||||
wp_data->error_class = ERROR_CLASS_RESOURCES;
|
||||
wp_data->error_code = ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY;
|
||||
@@ -810,7 +810,7 @@ void Notification_Class_common_reporting_function(
|
||||
|
||||
/* Initiating Device Identifier */
|
||||
event_data->initiatingObjectIdentifier.type = OBJECT_DEVICE;
|
||||
default: // shouldn't happen
|
||||
event_data->initiatingObjectIdentifier.instance =
|
||||
Device_Object_Instance_Number();
|
||||
|
||||
/* Priority and AckRequired*/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user