在 LabVIEW 中,无需加载 VI 即可获取被调用者

发布于 2024-07-25 17:58:12 字数 114 浏览 6 评论 0原文

这是周五早上的一个晦涩难懂的问题:

在 LabVIEW 中是否可以在不将整个 VI 加载到内存中的情况下获取 VI 的被调用者? 例如,通过从二进制文件中读取静态信息?

谢谢

Here's an obscure Friday Morning question:

Is it possible in LabVIEW to get the callees of a VI without loading the entire VI into memory? For instance, by reading static information from the binary?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

鹿港巷口少年归 2024-08-01 17:58:12

那么有私有/scriptig方法App。从文件中读取链接器信息,我不认为这会将VI加载到内存中,有关更多信息,请查看LabVIEW wiki当前离线,这里是Google 缓存页面) 链接器方法上的页面。

链接器方法将返回VI及其外部需求(VI、DLL、CHM等)的所有信息。

Well there is the private/scriptig method App.Read Linker Info From File, I don't think this will load the VI into memory, for more info have a look at the LabVIEW wiki (currently off-line , here is a Google cached page) page on the linker method.

The linker method will return all the info on the VI and it's external needs (VIs, DLLs, CHMs etc).

Ton

我要还你自由 2024-08-01 17:58:12

不,我不这么认为。 当您打开对顶层VI的引用时,它将被加载到内存中。 甚至在您有机会查询它的被调用者之前。

No, I don't believe so. When you open a reference to the top-level VI, it will be loaded into memory. That's even before you have the opportunity to query it for its callees.

野稚 2024-08-01 17:58:12

托恩的回答是正确的。 上述方法是应用程序实例方法,而不是VI引用方法。 您向该方法提供相关VI的路径,然后它将解析VI结构并提取所有相关的链接器信息,而不将VI本身加载到内存中(显然它会将信息从文件读入内存以进行解析但它不会加载/实例化 VI 本身)。

然而,该节点的问题在于它是私有的,因为它过去已经更改了其接口,并且将来可能会在没有警告的情况下再次这样做。 甚至在 7.0 和 7.1 之间甚至出现过这样的情况,界面在没有任何警告的情况下以断箭头的形式发生了变化,但是当使用旧的数据结构执行它时,它就会崩溃。 作为完全有效的私有节点,因为不对私有节点的功能做出任何保证。

Ton's answer is correct. The mentioned method is an application instance method not a VI reference method. You supply the path to the VI in question to that method and it will then parse the VI structure and extract all the relevant linker information without loading the VI as such into memory (Obviously it will read in the information from the file into memory to parse it but it will not load/instantiate the VI itself).

The problem with that node is however that it is private, because it has changed its interface in the past and may do so in the future again without warning. There even was a case between 7.0 and 7.1 or so, where the interface changed without any warning in the form of a broken arrow, but when executing it with the old data structure it would simply crash. As a private node that is fully valid, as no warranties are made about the functionality of private nodes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文