简体   繁体   English

如何在C ++中从缓存读取数据

[英]How to read data from the cache in c++

I am using a toolkit to develop client and server , which contains "WriteItems" function. 我正在使用一个工具包来开发客户端和服务器,其中包含“ WriteItems”功能。 Initially server creates some items and client reads these items. 最初,服务器创建一些项目,客户端读取这些项目。 Then client make some changes on this items.The "WriteItems" method will be called every time the client changes the items. 然后客户端对此项目进行一些更改。每次客户端更改项目时,都会调用“ WriteItems”方法。 When "WriteItems" function is called, data will be copied to the cache by the toolkit. 调用“ WriteItems”函数时,该工具包会将数据复制到缓存中。 Now, I have to display this data from cache. 现在,我必须显示来自缓存的数据。

Since I am newbie and searched in the web to read data from cache, i could not find appropriate way of solution. 由于我是新手,并且在网上搜索要从缓存中读取数据,因此找不到合适的解决方案。 I hope that i can get some suggestion. 我希望我能得到一些建议。

The OPC client can issue a SyncRead or AsyncRead. OPC客户端可以发出SyncRead或AsyncRead。 When doing so, you specify whether the requested data should come from the cache or from the device. 这样做时,您可以指定请求的数据是来自缓存还是来自设备。 If you specify cache, the OPC server should return whatever value and quality it currently has in its cache for the requested items. 如果指定了缓存,则OPC服务器应为请求的项目返回其缓存中当前具有的任何值和质量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM