Construction

Note: If one or both of the cache files becomes invalid at any time during the construction process, the PI API will disable the point caching feature and continue to operate in the normal operation profile. During normal operation, a connection to the PI Server is required for the application to start.

During construction mode, the cache files are populated with necessary digital state and point attribute data.

Construction of the digital cache file is determined as follows. If the application requires caching of the system digital state set, then all the system digital states will be retrieved from the PI Server and stored in the digital cache file. If the application receives a digital point from the PI Server or queries the server for a digital point, all the digital states for the digital set associated with the PI point will be cached. Multiple points with the same digital state set will only require the complete digital set to be cached once.

The point cache file is constructed in a similar fashion to the digital cache file. During application startup, the application may request and receive all points matching the required point source. Upon receipt of the requested points from the PI Server, the point record along with the associated extended attributes are requested from the PI Server and immediately stored in the point cache file. The application may request additional points not associated with the point source listed in the SCacheConfig structure by calling one of the pipt_ functions that return point attribute information. As a rule, any point requested by the application that requires the point record to be retrieved from the PI Server will result in that point record and associated extended attributes being cached.

The following pipt_ functions will cause the point to be added to the cache.

pipt_compspecs pipt_compspecseng pipt_dates
pipt_descriptor pipt_descriptorx pipt_digcodefortag
pipt_digpointers pipt_displaydigits pipt_excspecseng
pipt_exdesc pipt_exdescx pipt_findpoint
pipt_inprocbits pipt_instrumenttag pipt_instrumenttagx
pipt_location pipt_nextptwsource pipt_nextptwsourcelong
pipt_pointid pipt_pointsource pipt_pointsourcelong
pipt_pointtype pipt_pointtypex pipt_recordtype
pipt_rescode pipt_scale pipt_scan
pipt_sourcept pipt_squareroot pipt_tag
pipt_taglong Pipt_tagnamex pipt_tagpreferred
pipt_totalspecs pipt_typicalvalue pipt_updates
pipt_userattribs

The initial construction of the cache files will require additional startup time for the application. When constructing the digital cache file, network latency may add to the startup time if the entire SYSTEM digital set table is cached because an additional 1,024 network calls (one for each possible system digital state) will need to be executed because the application is only capable of retrieving a single digital state from the PI API for a given call. PI points with large digital sets will also require additional caching time. The caching of the point record and extended attributes will add additional startup time to the application as well.

However, restarting the application in a point caching configuration with a fully constructed point cache file will eliminate all network calls and latency associated with communicating with the PI Server. This will dramatically reduce the application startup time for subsequent application restarts and allow the application to collect data from the Data Source much quicker than without running in a point caching configuration.

Note: The SCacheConfig structure contains a member variable m_bNoDigitalStateStrings that can be set to false if digital state string values are not needed.

Enabling Operational Intelligence