4 Replies Latest reply on Jun 4, 2010 4:21 PM by spilon

    SDK PIValue to API PI_EVENT conversion

    tinklerj

      Since SDK data writes are not currently buffered/replicated, in order for an SDK application to send data to a collective, the PIValue object has to be converted to a PI_EVENT in order to be sent using PI-API.  Any thoughts on the best way to do this (VB.Net)?  E.g. if the PIValue is a DigitalState, how to convert that to the istat in the PI_EVENT?

       

      Jeremy

        • Re: SDK PIValue to API PI_EVENT conversion

          Jeremy,

           

          You can set the Replication_enableSDKWriteValues tuning parameter on the secondary nodes within a collective to allow the SDK writes.  Have a look at this thread for recent discussion on it: http://vcampus.osisoft.com/forums/t/470.aspx

           

          Unless the rules have changed, I don't think PI-API is supported on vCampus.

           

           

            • Re: SDK PIValue to API PI_EVENT conversion
              tinklerj

              I'm aware that PI-API is deprecated technology, not officially supported any more blah blah blah.  However until PI-SDK 1.4 finally comes along (originally promised 3Q2009 as I recall, still no sign of a release date) I don't see any other sensible choice.  I would wait except that this needs to be working right now, and I mean yesterday.

               

              As a cursory look at the thread referred to shows, at the moment you have to jump through even more hoops to get PI-SDK to write to a collective, and you have to do your own buffering etc.  That's a lot of code (if you want it to be reliable) to have to write and then throw away.  I still think the PI-API route is better for a temporary fix (after all that's still what a PIACEPoint does) and I feel it was premature to completely withdraw support for it before the proper SDK-only alternative became available.

               

              Also, I wonder how all that stuff with IPICollective works if the target is not a collective?  Do you have to code specially for that case as well?

               

              I can work this out myself (looks like I'm going to have to) but I just wondered if anyone else had already done it.

                • Re: SDK PIValue to API PI_EVENT conversion

                  Jeremy Tinkler

                  I'm aware that PI-API is deprecated technology, not officially supported any more blah blah blah.
                  As Rhys pointed out, PI API is not supported on vCampus. However, if you are indeed licensed for PI API development, you can contact our regular Technical Support team and they should be able to help you.

                   

                  Jeremy Tinkler

                  still no sign of a release date)
                  H2 2010, per the Engineering Plan.

                   

                  Jeremy Tinkler

                  I feel it was premature to completely withdraw support for it before the proper SDK-only alternative became available
                  As mentioned above, support was not completely withdrawn for PI API - TechSupport does support it.

                   

                   

                  • Re: SDK PIValue to API PI_EVENT conversion

                    Jeremy Tinkler

                    I wonder how all that stuff with IPICollective works if the target is not a collective?
                    Per the PI SDK Programming Reference, all Server objects support the IPICollective secondary interface, which allows a program to access the IsCollectiveMember property and hence  determine if the server is part of a collective. The interface has other methods and properties that provide access to collective specific features but don't apply to Server objects that are not part of a collective.  These calls will return an appropriate error when invoked against non collective server objects.