Event_Priorities in Get_Event_Information is read form associated notification-class object.
This commit is contained in:
@@ -895,10 +895,8 @@ int Analog_Input_Event_Information(unsigned index,
|
|||||||
bitstring_set_bit(&getevent_data->eventEnable, TRANSITION_TO_NORMAL,
|
bitstring_set_bit(&getevent_data->eventEnable, TRANSITION_TO_NORMAL,
|
||||||
(AI_Descr[index].Event_Enable & EVENT_ENABLE_TO_NORMAL ) ? true : false );
|
(AI_Descr[index].Event_Enable & EVENT_ENABLE_TO_NORMAL ) ? true : false );
|
||||||
/* Event Priorities */
|
/* Event Priorities */
|
||||||
/* FIXME: finish it */
|
Notification_Class_Get_Priorities(AI_Descr[index].Notification_Class,
|
||||||
getevent_data->eventPriorities[0] = 255;
|
getevent_data->eventPriorities);
|
||||||
getevent_data->eventPriorities[1] = 255;
|
|
||||||
getevent_data->eventPriorities[2] = 255;
|
|
||||||
|
|
||||||
return 1; /* active event */
|
return 1; /* active event */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1006,10 +1006,8 @@ int Analog_Value_Event_Information(unsigned index,
|
|||||||
bitstring_set_bit(&getevent_data->eventEnable, TRANSITION_TO_NORMAL,
|
bitstring_set_bit(&getevent_data->eventEnable, TRANSITION_TO_NORMAL,
|
||||||
(AV_Descr[index].Event_Enable & EVENT_ENABLE_TO_NORMAL ) ? true : false );
|
(AV_Descr[index].Event_Enable & EVENT_ENABLE_TO_NORMAL ) ? true : false );
|
||||||
/* Event Priorities */
|
/* Event Priorities */
|
||||||
/* FIXME: finish it */
|
Notification_Class_Get_Priorities(AV_Descr[index].Notification_Class,
|
||||||
getevent_data->eventPriorities[0] = 255;
|
getevent_data->eventPriorities);
|
||||||
getevent_data->eventPriorities[1] = 255;
|
|
||||||
getevent_data->eventPriorities[2] = 255;
|
|
||||||
|
|
||||||
return 1; /* active event */
|
return 1; /* active event */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -684,6 +684,28 @@ bool Notification_Class_Write_Property(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Notification_Class_Get_Priorities(
|
||||||
|
uint32_t Object_Instance, uint32_t *pPriorityArray)
|
||||||
|
{
|
||||||
|
NOTIFICATION_CLASS_INFO *CurrentNotify;
|
||||||
|
uint32_t object_index;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
object_index = Notification_Class_Instance_To_Index(Object_Instance);
|
||||||
|
|
||||||
|
if (object_index < MAX_NOTIFICATION_CLASSES)
|
||||||
|
CurrentNotify = &NC_Info[object_index];
|
||||||
|
else {
|
||||||
|
for(i = 0; i < 3; i++)
|
||||||
|
pPriorityArray[i] = 255;
|
||||||
|
return; /* unknown object */
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < 3; i++)
|
||||||
pPriorityArray[i] = CurrentNotify->Priority[i];
|
pPriorityArray[i] = CurrentNotify->Priority[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,10 @@ typedef struct Notification_Class_info {
|
|||||||
BACNET_READ_PROPERTY_DATA * rpdata);
|
BACNET_READ_PROPERTY_DATA * rpdata);
|
||||||
|
|
||||||
bool Notification_Class_Write_Property(
|
bool Notification_Class_Write_Property(
|
||||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||||
|
|
||||||
|
void Notification_Class_Get_Priorities(
|
||||||
|
uint32_t Object_Instance, uint32_t *pPriorityArray);
|
||||||
|
|
||||||
void Notification_Class_common_reporting_function(
|
void Notification_Class_common_reporting_function(
|
||||||
BACNET_EVENT_NOTIFICATION_DATA * event_data);
|
BACNET_EVENT_NOTIFICATION_DATA * event_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user