Exercise 3 - Add Notifications for High Temperatures

Version 5

    Estimated Completion Time: 60 - 90 min

     

    Objective: Modify Exercise 2 to find all the notification rules and the notification instances within a specified period of time for a selected element.  Note: you will be using Notifications 2016 or later, in which case the notification instances are actually AFEventFrame(s).

     

    In this exercise, you are first going to create an analysis template to detect when the temperature of the city template is above two different levels. This means that you also need to create two different states (Hot and Very Hot for example) as shown in the video lectures. The state Hot should have a Warning Severity and the state Very Hot should have a Major Severity.  You will also create a new Notification Rule Template associated with the analysis template.

     

    You will want to make sure five analyses, one for each city element, are enabled.

     

    Modify Exercise 2, adding a button called View Notifications.  You may use a ListBox or DataGridView to display items.

     

    Exercise 3_1.png

     

     

     

    After clicking on this new button, a new Form will open showing all the notification rules related to the selected element/city. Once the notification rule is selected, it should be possible to view all the notification instances (event frames) of the selected notification rule by selecting a period of time, as shown in the example below:

     

         Exercise 3_2.png

     

     

    Namespaces

     

    The following namespaces will need to be added to the new form:

     

    • OSIsoft.AF.Asset
    • OSIsoft.AF.Time
    • OSIsoft.AF.Search
    • OSIsoft.AF.EventFrame
    • OSIsoft.AF.Notification

     

    You may create multiple event frames or just one.  You may have multiple analyses that each perform a single trigger or one analysis that performs multiple triggers.  If you use multiple triggers, you will need to filter the event frames further to eliminate those that are the parent event frames to multiple triggered child.

     

    Please use this discussion forum to discuss any ideas or questions related to Exercise 3