I am able to read alarms using VideoOS.Platform.Proxy.AlarmClient.IAlarmClient. However I can not figure out how to use VideoOS.Platform.Proxy.AlarmClient.IAlarmClient.Add(alarm). Maybe this isn’t the correct function to call. My goal is to have an application using the MIP .NET library trigger an alarm and continue to set properties of the alarm after it has been created.
Thanks in advance for any help.
I suggest you use the message: NewAlarmCommand or NewEventCommand.
Also, we aware that if you create alarms directly in your plugin, the end-user will not have any way to configure when it should be on or off. Consider to create an event, and let the end-user define an Alarm Definition for when the event should trigger an alarm.
Maybe I’m going about this the wrong way. Let me explain what I’m trying to accomplish and maybe someone can suggest a method.
I want to programmatically trigger an alarm. I want the end user to see the alarm as a new triggered alarm but I don’t want to allow them to close the alarm until another condition has been met in my code. I was planning on just setting the alarm state to “new” via a loop until the other condition has been met.
Any suggestions are greatly appreciated. Thanks!
Also I know that it seems like the most recomended way to trigger an alarm is to send an event message. However if I do that how do I get a reference to the alarm that was triggered by the event? Ideally I would need the guid of the alarm but I don’t get that if I send an event.
Alarms are normally created to get the operators attention, and have him close it afterwards.
Also all alarms are related to a source, could be a camera, microphone.
If you are working with some item that is not a camera, like a temperature measure, you can create a new MIP item, and then have two messages that relates to this item like “Temp-Too-High”, “Temp-Normal”. You can also associate two different images for the temperature item - so it is easy to see on a map that the temp is too high.
The SensorMonitor sample show how to do this.
Thanks for the response. In our situation the alarm is to indicate a physical problem and we do not want to allow the operator to close the alarm until the physical problem has been resolved. So what I want to do is trigger an alarm, and then in my code get a handle to that alarm. Do you know if that’s possible?
You have to create your alarm, and then read last xx alarms and find it - not very good.
But what if your system has 5 physical problems?
What source would you refer to?
I still think it make sense for you try the SenserMonitor sample - it runs without any modification, and you can create alarms etc for multiple sensers.
The source is an IO board that is configured within milestone. I’ll take a look at the sample and see if it fits my needs. However the most important requirement in my case is that the user cannot close the alarm until the code has determined that it should be alllowed.
I had also thought of the solution of reading the last xxx alarms and guessing which is the correct one based on description and timing but I also want to avoid that if at all possible. There are just too many situations where that could cause a problem.