0

下面系统中调度员的相关性是什么?

这是一种模式/原则吗?

请求电梯

我无法推测Dispatcher这里的相关性。

根据文献,Dispatcher每辆车都有一个,其主要功能是计算汽车的目标移动方向和目的地,以及保持车门的打开时间。与系统中几乎所有的Dispatcher控制对象交互,除了LanternControl

怎么不HalButtonController直接跟大佬聊Drivecontrol呢?什么是 aDriveControl不能履行的责任 - 并且需要 a Dispatcher

4

1 回答 1

0

The button and drivecontrol are stateless - the dispatcher is responsible for maintaining the state in the system. Without the dispatcher, then if two buttons were pushed then they'd both send their inputs to the drive control and the system would crap out (or else the drive control would simply ignore one of the inputs); instead, the dispatcher intercepts the button inputs and queues them appropriately (i.e. changes the system state to reflect the button inputs), then sequentially dispatches them to the drive control.

于 2013-04-21T04:05:58.660 回答