I am working on a Smart Client Plugin for an LPR project and have encountered several issues related to fetching and modifying events.
One of the pages in the plugin displays a history of plates, and we want to export filtered plates (e.g., only violated plates) to an Excel sheet. The challenge arises when exporting a large number of plates, which could take a significant amount of time. My proposed solution is to divide the plates into smaller batches and process them using subprocesses that run on separate threads. For example, I could process every 5,000 plates on one thread, and have up to four threads running concurrently. To do this, I need to know the total number of plates to export, so I can determine the appropriate number of subprocesses. However, the AlarmClientManager which we are using to filter and fetch events does not provide a way to retrieve the total number of events.
Additionally, we need to add a new tab to the plugin where users can view violated plates and modify the events if there are confidence issues with our AI. Unfortunately, the
AlarmClientManager does not support these functionalities. While there is an
updateAlarm method, it does not allow for updating all event data.
Here is how I am currently using the alarm manager:
private readonly AlarmClientManager _alarmClientManager = new AlarmClientManager();
IAlarmClient alarmClient = _alarmClientManager.GetAlarmClient(EnvironmentManager.Instance.MasterSite.ServerId);
EventLine[] events = alarmClient.GetEventLines((currentPage - 1) * number, number,
new EventFilter()
{
Conditions = _conditions.ToArray(),
Orders = new[]
{
new OrderBy()
{
Order = Order.Descending,
Target = Target.Timestamp
}
}
});
I have searched for solutions but, unfortunately, haven’t found any that address these issues.
Any help or guidance would be greatly appreciated!