2 Replies Latest reply on May 23, 2016 11:17 PM by jgolla

    What's the data format used in dataUpdate function when making Coresight custom symbols

    hzhao

      Hi all,

       

      I'm playing around creating custom symbols in PI Coresight 2016, I'm a little bit confused by the data format that we used in dataUpdate, convertToChartData function, such as this repository, entry 9. PI-Coresight-Custom-Symbols/README.md at master · osisoft/PI-Coresight-Custom-Symbols · GitHub , It looks different from the response returned by PI Web API.

       

      Thank you very much!

        • Re: What's the data format used in dataUpdate function when making Coresight custom symbols
          pthivierge

          Hello Chandler,

           

          After looking in PI Coresight 2016 Extensibility Documentation, P.8:

          Based on the symbol's configuration and its datasources, Coresight requests data and calls the dataUpdate method that is defined when the symbol is initialized. The object passed to this function depends on the symbol's DataShape.

          So if your DataShape is different than the one in the example, that will be different for sure.

           

          I don't know if the returns are documented somewhere, for sure you could put a break point and add a watch with your browser developer's tools, that should be easy to do.

          Otherwise maybe Jason Golla can help.

           

          Hope this helps,

          • Re: What's the data format used in dataUpdate function when making Coresight custom symbols
            jgolla

            Hi Chandler,

             

            I am not really sure I understand your question, but I will do my best to explain. First off, all of the documentation for the CTP can be found here. At this time, the format is different then PI WebAPI. We plan on having direct PI WebAPI support in a later version of the extensibility model.

             

            What the example on GitHub is trying to do is show how to use the PI Coresight TimeSeries shaper along with an out of the box charting library. The convertToChartData function is used only to convert from the input format (PI Coresight) to the expected input for the HighCharts trend.

             

            As far as the format of the data, from the doc linked:

             

            TimeSeries

            Data: Array containing data objects for each individual data source associated with the symbol.

            Each item can contain the fields:

            Metadata, error fields

            Values array, containing Time and Value

             

            I hope this helps.

            1 of 1 people found this helpful