本帖最后由 wenluderen 于 2021-3-26 16:14 编辑
Process: Sync"
××××
×××
这个分支 JKI组织没有给出解释
××
查看
this method is used to syschronize processes during launcher or shutdown
此方法用于在启动或关闭过程中使进程同步
里面调用了好几层
999https://forums.ni.com/t5/JKI-Sta ... file.language=zh-CN
×××××××××××
Hi Bruce, thanks for uploading this code example. The issue is that your splash screen never completes its startup process because the registration is occurring during the registration process of your caller UI. There are two considerations to solve your issue.
First of all, the "Process: Sync" frame is extremely important in "Process.vi" for any SMOs. That's the step that notifies the framework that event registrations have completed and that your component will not miss any important messages such as state changes, errors or more importantly, shutdown or abort signals... The overall state of your state machine object will remain "Created" until the stack of children implementations all reach the Process Sync frame, at which point the SMO will transition to "Started".
嗨布鲁斯,
感谢您上传此代码示例。问题是您的初始屏幕永远不会完成其启动过程,因为注册是在呼叫者UI的注册过程中进行的。
解决您的问题有两个注意事项。
首先,对于任何SMO,“ Process.vi”框架在“ Process.vi”中都非常重要。 这是向框架通知事件注册已完成的步骤,并且您的组件不会丢失任何重要消息, 例如状态更改,错误或更重要的是关闭或中止信号…… 状态机对象的总体状态将保持为“已创建”, 直到所有子实现都到达“流程同步”帧,此时SMO将过渡到“已启动”。
××
×××
In your "Acquire and Log UI.lvclass:Process.vi", you need to perform all actions instantaneously or asynchronously to allow your SMO to start (aka. reach the Process: Sync frame). 在“获取并记录UI.lvclass:Process.vi”中,您需要立即或异步执行所有操作,以允许您的SMO启动(也就是到达Process:Sync框架)。
As you can see in the screenshot, your app currently waits forever in the "UI: Launch Splash Screen" and cannot sync, which is why it waits forever in the Start Processes vi.
从屏幕快照中可以看到,您的应用程序当前在“ UI:启动启动屏幕”中永远等待,并且无法同步,这就是为什么它在“启动流程” vi中永远等待的原因。
×××
We will remove the blocking part (event structure) and interact with the splash screen asynchronously 我们将删除阻塞部分(事件结构),并与初始屏幕进行异步交互。 ××
Secondly, it is not possible at the moment to Start a subprocess (SMO Splash in this case) while you are in the process of Starting your caller subsystem (Acquire and Log SMO). This means that you cannot call the "Start" method until after the "Process: Sync". But this is not what you want... so the current option is to call it before the Process.vi is called: essentially, you can override the "onStart" method to start your Splash screen before the process is launched. You can then use the "onStarted" override to close your splash screen.
Alternatively, I will be looking into a way to launch a component subsystem during the startup process: it is possible by making the Register Process method re-entrant... however I want to run unit tests to make sure this does not mess with other features, so this is not an option at the moment.
其次,在启动呼叫者子系统(获取并记录SMO)的过程中,目前无法启动子过程(在这种情况下为SMO Splash)。 这意味着您必须在“过程:同步”之后才能调用“开始”方法。 但这不是您想要的...,因此当前的选择是在调用Process.vi之前调用它:本质上,您可以覆盖“ onStart”方法以在启动进程之前启动您的启动画面。 然后,您可以使用“ onStarted”替代关闭初始屏幕。
另外,我将研究一种在启动过程中启动组件子系统的方法:可以通过使Register Process方法重新进入来实现...但是我想运行单元测试以确保它不会与其他组件混淆 功能,因此目前无法选择。
|