Update Alarm Problem

Hi!

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?

Thanks,

BR,

David.

Alarm and Event Viewer sample might be helpful, please explore the sample.

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/alarmeventviewer/readme.html&tree=tree_2.html

Hi,

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.

Thanks,

BR,

David.

For the 1st question - If you want to get a trial license, please reach out Milestone pre-sales department in your country/region.

The 2nd question – You can select a camera group or all cameras when you configure an alarm definition on Management Client.