Can you please indicate why you intend using C / C++ and also on what platform (Windows, Linux ..)?
Please forgive me but what you are asking appears pretty uncommon to me.
I am new to PI Web API and am looking for some sample applets or client applications that uses PI Web API (ie C /C ++ code which uses libcurl api). Preferably something that pulls PI data from server and displays it.
Our requirement is on C / C ++ and we are working on Linux (Ubuntu) Platform .
1 of 1 people found this helpful
As mentioned by Gregor Beck, we would like to know more about what you want to do and your requirements so we can help you better.
For your purpose you should use PI Web API, which is a RESTful interface to the PI system. It gives client applications read and write access to their AF and PI data over HTTPS.
Writing your own libraries in C/C++ can be tedious, especially when dealing with Web Requests and JSON objects and strings. Are you planning on using any third partly implementations like Boost C++ Libraries? Even this can become a little tricky when dealing with various Controllers in Web API.
An OpenAPI 2.0 specification (also known as a Swagger specification) is a specially-formatted document that describes a RESTful API. The document can be used to generate client libraries using code generators. You can find the Swagger specification for PI Web API core services here. Please refer to the Swagger website for more information on the specification and how to generate various client libraries using the specification.
My recommended approach would be generate client libraries in RestCPP or C using Swagger. The Swagger Codegen can autogenerate your API’s boilerplate code in 20+ languages from your API’s design, allowing you to only focus on your API’s core business logic.
If you would like to explore similarly generated client libraries in other languages check out PI Web API Client libraries already published
Thanks for the reply .
Am working on Linux (Ubuntu ) Platform , we are planning to Implement C Code using libcurl libraries to connect PI server .
please share any sample C Application /code to get the tag values in PI server .
Thanks in advance.