I would like to store some custom text about an Alarm line.
I don’t want to use the AlarmCommandClient.UpdateAlarm method because I’d need to provide a State and I’m concerned that the State will change on the server before I know about it on the client and then the client will overwrite that change.
I see another method called UpdateAlarmValues() and one of the values is a field called “Comment”. If I use that method to update this field, how can I retrieve the comment later? Where on the Alarm does it get saved?
You can add a comment using the UpdateAlarmValues method, using VideoOS.Platform.Data.AlarmUpdateKey.Comment as key.
The comment(s) can be retrieved using the GetAlarmUpdateHistory(Guid id) method which will return an array of AlarmUpdate.
In this array, you can look up the entries having VideoOS.Platform.Data.AlarmUpdateKey.Comment as key to get the list of comments added.
This is helpful.
We noticed that if we use this UpdateAlarmValues method, it results in 3 entries in the history of the AlarmLine all with identical timestamps and content. We are only expecting 1 entry. Have you seen this behavior before? Here is the code were are running to update the AlarmLines:
KeyValuePair<string, string>[] values = new KeyValuePair<string, string>[1];
values[0] = new KeyValuePair<string, string>(“Comment”, “Test”);
_alarmCommandClient.UpdateAlarmValues(AlarmLine.Id, values);
Should not generate 3 entries - I will check around.
What version is your event server and MIPSDK ?
We’re using 2018R1 for both the event server and SDK.
Thanks - we will correct and make a hotfix
I really appreciate your attention to this issue.
Mike, please try this hotfix (contains only VideoOS.Platform.dll), and place it with your solution.
It is ONLY intended to be used with MIPSDK 2018R1.
http://download.milestonesys.com/mipsdk/Hotfix/TFS179067/Bugfix179067_12.1.zip
Thank you very much for this, Anders. We will give this a shot soon and I’ll let you know if it fixes the issue for us.