I connect to AlarmServiceToken. I get the alarms with the “GetAlarmLines” function, I read the alarm, but when I try to update it, it gives me an error. I write the code:
int UpdateAlarm(NS_AlarmServiceToken::AlarmLine2 *Alarm, UnicodeString usToken)
{
IAlarmCommandToken *alarmCommandToken;
TXSDateTime *tiempo;
tiempo= new TXSDateTime();
tiempo->AsDateTime = Now();
try{
alarmCommandToken->UpdateAlarm(usToken,Alarm->Id,u"Cerrar",11,Alarm->Priority,tiempo,Alarm->AssignedTo);
return 0;
}
catch (Exception &N) {
return -1; // The function always returns -1.
}
}
Could you help me? Another question: when i start my application, how can i remove the previous alarms?
I tested my app in customer’s Xprotect and the update is ok, so the problem is in my version (Milestone XProtect VMS Products 2020 R2 System Installer). Is there a free version that works the update?
Another question, is there a quick way to configure the alarms in Xprotect? When you have 2 cameras it’s ok, but if you have 100 cameras the process can be very slow. I attach 2 images with the steps I follow to generate the alarms of a camera.