我可以在 shell 中显示 RTP 的全局变量吗?

发布于 2024-07-06 20:01:02 字数 179 浏览 6 评论 0原文

在 VxWorks 中,我可以在 shell 中显示全局变量,如下所示:

-> my_global
my_global = 0x103c4110: value = 4 = 0x4

Is there a way to do the same with a RTP global variable?

In VxWorks, I can display global variables in the shell like so:

-> my_global
my_global = 0x103c4110: value = 4 = 0x4

Is there a way to do the same with a RTP global variable?

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

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

发布评论

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

评论(1

祁梦 2024-07-13 20:01:02

您可以使用命令 (cmd) 解释器并附加到 RTP 来显示特定 RTP 中的全局变量。
这是一个带有括号中注释的示例。

-> cmd                                   (switch to command interpreter)
[vxWorks *]# rtp exec Hello_RTP.vxe &
Launching process 'Hello_RTP.vxe' ...
Process 'Hello_RTP.vxe' (process Id = 0x105e4d50) launched.
Attachment number for process 'Hello_RTP.vxe' is %1.
[vxWorks *]# echo $my_global             (display my_global in the kernel context)
0x4
[vxWorks *]# %1                          (attach to RTP - can also use rtp attach)
[Hello_RTP]# echo $my_global
0x6b7                                    (global variable from RTP context)
[Hello_RTP]# echo $my_global
0x16e1                                   (same global variable..it increments)
[Hello_RTP]# %0                          (detach from RTP. Go to kernel)
[vxWorks *]# echo $my_global             (back to kernel context)
0x4

请注意,这仅在 VxWorks 6.x 中可用。在 6 版本之前,vxWorks 中没有 RTP。

You can display global variables in a specific RTP by using the command (cmd) interpreter and attaching to the RTP.
Here is an example with comments in parenthesis.

-> cmd                                   (switch to command interpreter)
[vxWorks *]# rtp exec Hello_RTP.vxe &
Launching process 'Hello_RTP.vxe' ...
Process 'Hello_RTP.vxe' (process Id = 0x105e4d50) launched.
Attachment number for process 'Hello_RTP.vxe' is %1.
[vxWorks *]# echo $my_global             (display my_global in the kernel context)
0x4
[vxWorks *]# %1                          (attach to RTP - can also use rtp attach)
[Hello_RTP]# echo $my_global
0x6b7                                    (global variable from RTP context)
[Hello_RTP]# echo $my_global
0x16e1                                   (same global variable..it increments)
[Hello_RTP]# %0                          (detach from RTP. Go to kernel)
[vxWorks *]# echo $my_global             (back to kernel context)
0x4

Note that this is only available in VxWorks 6.x Before the 6 release, there was no RTP in vxWorks.

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