I want to get real time LPR event data using MIP SDK.
I created one simple c# console application that is using the MIP SDK and getting LPR events but the events take 2-4 mins to come through in my application.
Can anyone suggest how we can get LOR events in realtime or at least within a few seconds?
using System;
using System.Net;
using VideoOS.Platform;
using VideoOS.Platform.Messaging;
using VideoOS.Platform.Proxy.Alarm;
using VideoOS.Platform.Proxy.AlarmClient;
namespace LPREventDataGet
{
class Program
{
public static object _obj1, _obj2, _obj3;
public static AlarmClientManager _alarmClientManager;
public static MessageCommunication _messageCommunication;
public static void Main(string[] args)
{
try
{
VideoOS.Platform.SDK.Environment.Initialize();
VideoOS.Platform.SDK.UI.Environment.Initialize();
VideoOS.Platform.EnvironmentManager.Instance.TraceMessageCommunication = true;
Uri uri = new Uri("http://localhost/");
NetworkCredential nc = new NetworkCredential("xyz", "*******");
VideoOS.Platform.SDK.Environment.AddServer(uri, nc);
try
{
VideoOS.Platform.SDK.Environment.Login(uri, false);
}
catch (Exception)
{
// Report "Other error connecting to: " + uri.DnsSafeHost;
}
MessageCommunicationManager.Start(EnvironmentManager.Instance.MasterSite.ServerId);
_messageCommunication = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);
_alarmClientManager = new AlarmClientManager();
IAlarmClient alarmClient = _alarmClientManager.GetAlarmClient(EnvironmentManager.Instance.MasterSite.ServerId);
// getting LPR event data from below Code but getting LPR event data after 2-3 minutes by below Code
EventLine[] events = alarmClient.GetEventLines(0, 1,
new VideoOS.Platform.Proxy.Alarm.EventFilter()
{
Conditions = new Condition[] { new Condition() { Operator = Operator.Equals,
Target = Target.Type, Value = "LPR Event" } }
});
}
catch (Exception ex)
{
throw;
}
Console.ReadLine();
}
}
}