Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
block:switch:zh [2022/08/14 13:00]
hxt521 created
block:switch:zh [2022/08/14 13:56]
hxt521 [中继器]
Line 1: Line 1:
-Relay+中继器
 ====== ======
 {{:​blocks:​switch.png?​nolink&​128|}} {{:​blocks:​switch.png?​nolink&​128|}}
  
-The Relay allows connecting different networks to each other. Only network messages will be passed along, components will not be visible through this. Use this to separate networks while still allowing communication using Network Cards. The reasoning is the same as for the [[block:​power_distributor|power distributor]] not connecting its adjacent networks: you may often wish to keep your sub-networks separate. This allows computers in different sub-networks to communicate without having to go all out and use wireless networks.+中继允许连接不同的网络到彼此。只有网络信息才能被传递,其他元件在其中不可见。你可以使用它使网络保持独立,同时也允许使用网卡进行通信。这个道理和 ​[[block:​power_distributor:zh|能量分配器]] 不连接相邻网络的道理是一样的:你可能经常需要将子网络分开。这使得不同子网络中的计算机无需全部使用无线网络就可以进行通信。
  
-Note that relays have a limited bandwidth. They will only transfer one packet per ticks (250ms) and their internal queue is limited to 20 packets. If you exceed this limit you will experience dropped packets. Also note that packets can be relayed no more than times. After that the packet is dropped.+注意中继器只有一个有限的带宽。它们每 ​tick(250ms)只传输一个数据包,它们的内部队列限制为 ​20 个数据包。如果超过这个限制,就会出现丢包的情况。还需要注意的是,数据包的转发次数不能超过 ​次。在此之后,数据包将被遗弃。
  
-Relays will not route packets back where they came from, but it is still possible to generate loops where packets will then arrive multiple times, so keep that in mind.+中继不会将数据包传递回它们原本的地方,但当数据包多次传递时仍然可能产生循环,所以一定要注意。
  
-A Wireless or Linked Relay may be created by first right-clicking on the Relay, and inserting a Wireless or Linked Card into the resultant ​GUI.+无线或有线中继器可以通过首先右键点击中继器,再将无线网卡或连接卡插入到生成的 ​GUI 中来创建。
  
-The Relay block also serves as a ComputerCraft ​peripheral, providing an interface imitating that of ComputerCraft's (wired) modems. It will forward network messages sent from ComputerCraft ​to the OpenComputers ​side, which can be received if a [[item:lan_card|network card]] is installed. It will also receive ​OpenComputers' network messages and push a corresponding signal in CC computers attached to the adapter. Note that network messages in OpenComputers ​do not require a "​response port" like ComputerCraft ​does. If the first argument for the network message is a number, it will be interpreted as the response port to tell ComputerCraft ​receivers, otherwise the response port will be set to `-1`.   +中继器块也可以用作 ​ComputerCraft ​的外设,提供一个模仿 ​ComputerCraft ​的(有线)调制解调器的接口。它将把 ​ComputerCraft ​发送的网络消息转发到 ​OpenComputers ​端,如果安装了 ​[[item:network_card:​zh|网卡]] ,就可以接收到这些消息。它还将接收 ​OpenComputers ​的网络消息,并在 ​CC 中推送一个相应的信号,连接到适配器上。注意,OpenComputers ​中的网络消息不像 ​ComputerCraft ​那样需要一个“响应端口”。如果网络消息的第一个参数是一个数字,它将被解释为响应端口,告诉 ​ComputerCraft ​接收器,否则响应端口将被设置为 ​`-1` 
-*Note*: this functionality was available via the Adapter block before 1.1.0.+
  
-The Relay is crafted using the following recipe:  +注意:该功能在 1.1.0 之前也可以通过适配器块使用。 
-  * 3 x [[block:​cable|Cable]] + 
-  * 4 x Iron Ingot +中继器的制作方法如下
-  * 1 x [[item:​network_card|Network Card]] +  * 3 x [[block:​cable:zh|线缆]] 
-  * 1 x [[item:​materials|Printed Circuit Board]]+  * 4 x 铁锭 
 +  * 1 x [[item:​network_card:zh|网卡]] 
 +  * 1 x [[item:​materials:zh|印刷电路板(PCB)]]
  
 {{:​recipes:​blocks:​switch.png?​nolink&​200|}} {{:​recipes:​blocks:​switch.png?​nolink&​200|}}