14 Replies Latest reply on Oct 20, 2011 12:02 PM by spilon

    AF SDK eventing

    sandeep.narang

       

       

      Hi Team

       

      As per our requirement, we have to implement the AF ADK eventing. Whenever an element or attribute changes in AF database, we have to send a event notification to our .NET application for the same. We have done the same for PI SDK using event pipes. Can you please guide me through the required examples, code snippets, links or documentation?

       

       

       

      Thanks

       

      Sachin

        • Re: AF SDK eventing
          hanyong

          Hello Sachin,

           

          You can find an example that is included in AF SDK Programming Reference (available for download on the Library). In the programming reference under the Examples section, there is an Event example that you can refer to. If you have more questions after looking through the example, feel free to ask them here. =)

            • Re: AF SDK eventing

              To add to Han Yong's post; note that AF doesn't provide system eventing (at the moment) only eventing within the scope of an application consuming AF SDK.

                • Re: AF SDK eventing
                  sandeep.narang

                  Hi Han

                   

                  I have downloaded the .chm but unable to view the contents." Navigation error" is hown on the content page. Can you please tell if the file is corrupted or other issue?

                   

                  Thanks

                   

                  Sachin

                    • Re: AF SDK eventing
                      sandeep.narang

                      I am able to open it. It was a blocked file so unblocked it.

                        • Re: AF SDK eventing
                          dtakara

                          Glad you were able to figure out how open the chm file, Sachin!

                           

                          On a related note, people found themselves in this same situation before, like in this forum post. Also, Bryan made an interesting CHM files on the intrinsically unsafe list! in his blog about this matter.

                            • Re: AF SDK eventing
                              hanyong

                              Nice catch Rhys! You are right about that. 

                               

                              @Sachin: This is another post on a similar question that may give you some useful ideas to go about implementing what you want. Hope it helps.

                                • Re: AF SDK eventing
                                  Rafik.Rezine

                                  Actually I tried the Event example found in the AF SDK chm file some days ago, and it works in getting value change for a PI AF attribute ... except when it is referencing a PI Point. In this case if the value of the PI point changes (and thus the value of the PI AF attribute), no event is triggered ... too sad :(

                                   

                                  I guess I need to go through eventing from PI SDK if I want to get datachange events from these specific PI AF attributes?

                                    • Re: AF SDK eventing

                                      Changes are coming in the form of Rich Data Access (PI SDK and AF SDK merged) where you can expect objects like "AFEventPipe".  That said, I am not totally sure if there will be changes to the Data Reference plugin object model to allow data events to be generated by a custom DR to be consumed by an AFEventPipe - or maybe the AFEventPipe is only a wrapper for the PI Point DR, which itself is using PI SDK (thus PI SDK EventPipes).  Cue AF PM/Developers...

                                       

                                      As this is likely to be some way off, like you suggest for all your AF Attributes using the PI Point DR you can obtain the PI Point configured and create Event Pipes for new events.

                                       

                                      Have you considered using PI Notifications instead of building the logic of monitoring data in to your custom application?

                                      • Re: AF SDK eventing
                                        mhalhead

                                        I suspect that the events are only fired when there is a change to the AF database.

                                         

                                        Rafik Rezine

                                        I guess I need to go through eventing from PI SDK if I want to get datachange events from these specific PI AF attributes?

                                         

                                        We are doing something similar with AF to improve the scalability and performance of our AF calculation engine. When we load the AF Attribute we check whether it is a PI Point DR if it is we resolve the PI Point from the DR; there is a method in the AF SDK to do this something like GetPIPoint (I can't remember the exact name). Then simply use this with the existing PI SDK methods like EventPipes.

                                         

                                        Rhys @ RJK Solutions

                                        Rich Data Access (PI SDK and AF SDK merged) where you can expect objects like "AFEventPipe".  

                                         

                                        I hadn't heard of this but it sound logical and Rhys is pretty much on top of these developments.