mechaware——理解事件确认
来源:互联网 发布:c#集合和数组的区别 编辑:程序博客网 时间:2024/06/06 13:02
Event Notification 事件确认机理
The best way to understand how event notification works, is to use a mail delivery analogy. Think of yourself as your program. If you use a thread to wait for events (mpiNotifyEventWait), you are waiting for the mail carrier (Event Manager). If you are polling for events (mpiNotifyEventWait), you check the mail periodically.
使用信封传递的例子来理解事件确认(event notification)。把自己当做一个程序,如果使用一个线程等待事件(比如mpiNotifyEventWait线程),你正在等邮递员(event manager)。如果轮询事件(mpiNotifyEventWait),那么你是在定期的查看邮件。这是两种处理事件的方式。
When the firmware sends an event, it is like a friend (MPI Object) sending you (Thread) a letter (ex: Event -- Motion Done). The letter (Event) travels to the post office (Controller Event Pool) where your mail carrier (Event Manager) retrieves it and then delivers it to your mailbox (Notify Object).
当固件(firmware)发送一个事件时,就好像一个朋友(MPI Object)发送给你(线程)一封信(事件之Motion Done)。这封信(事件)先到邮局(控制器事件池),在这里邮递员(event manager)检索它并把它传送到你的邮箱(notify 对象)。
Here are the three common cases:
下面是常见的几个例子:
- Thread Waiting for Events 线程中等待事件
As soon as the mail carrier (Event Manager) shows up, the thread in your program checks the mailbox (Notify Object). 邮递员(event manager)一出现,你的程序中的线程就立即查看邮箱(notify 对象)。 - Thread Polling for Events 线程中轮询事件
The thread in the program periodically checks the mailbox (Notify Object) to see if there is a letter (Event).线程定期的查看邮箱(notify 对象)来看是否有信(event)。 - Thread using mpiNotifyEventWait 线程中使用mpiNotifyEventWait
If the thread in the program does not check the mailbox (Notify object), it will start to fill up with letters. The mail carrier (Event Manager) keeps stuffing more letters into the mailbox and figures that you will eventually check it. If the thread calls an mpiNotifyEventWait(...), it checks the mailbox. But, it can only check one letter at a time。如果程序中的线程不检查邮箱(notify对象),邮箱会填满邮件。邮递员(event manager)持续往邮箱加信,他以为你最终会查看邮箱的。如果线程调用了 mpiNotifyEventWait(...),它会检查邮箱。但是一次只看一封信。 - Thread using mpiNotifyEventFlush 线程中使用mpiNotifyEventFlush
If the thread in the program does not check the mailbox (Notify object), it will start to fill up with letters. The mail carrier (Event Manager) keeps stuffing more letters into the mailbox and figures that you will eventually empty it. If the thread calls mpiNotifyEventFlush(...), mail carrier empties the mailbox and throws all the letters in the trash.如果程序中的线程没有检查邮箱(notify对象),邮箱会逐渐的变满。邮递员(event manager)持续的网邮箱里加邮件,他认为你最终会清空它。如果线程调用mpiNotifyEventFlush(...),邮递员会清空邮箱,并把所有的信扔进垃圾箱。
- mechaware——理解事件确认
- mechaware——PT and PVT Path Motion
- 事件确认方法
- EXTJS删除确认事件
- 《代码之髓》读书笔记(一)——要确认理解正确,首先得表达出来
- TCP的ACK确认系列 — 快速确认
- TCP的ACK确认系列 — 延迟确认
- TCP的ACK确认系列 — 延迟确认
- TCP的ACK确认系列 — 快速确认
- TCP的ACK确认系列 — 快速确认
- TCP的ACK确认系列 — 延迟确认
- C# 事件与委托—个人理解
- 第二章 过程域——确认
- XML指南——XML 确认
- 表单确认按钮——Javascript函数
- 软件质量管理——验证和确认
- 验证和确认——缺一不可
- 验证和确认——缺一不可
- CF
- centos6.5下zabbix3.26搭建
- Codeforces 249E:Endless Matrix
- N!的位数
- ArcGIS水文分析实战教程(1)GIS与水文学
- mechaware——理解事件确认
- Linux内核内存管理之SLAB内存管理算法(三) --slab对象的分配与释放
- Hadoop之旅(2)—伪集群 HDFS 文件读取与上传案例、权限与安全模式
- Activity的启动模式和退出
- TCP与UDP区别总结
- React Native实现微信好友/朋友圈分享功能-Android/iOS双平台通用
- 计算机网络总结之物理层
- Struts2方法调用
- 2017中国商业智能行业研究报告