Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
block:switch:zh [2022/08/14 13:16]
hxt521 [Relay]
block:switch:zh [2022/08/14 13:56]
hxt521 [中继器]
Line 3: Line 3:
 {{:​blocks:​switch.png?​nolink&​128|}} {{:​blocks:​switch.png?​nolink&​128|}}
  
-本篇文章/全部内容还没有进行翻译+中继允许连接不同网络到彼此。只有网络信息才能被传递,其他元件在其中不可见。你可以使用它使网络保持独立,同时也允许使用网卡进行通信。这个道理和 [[block:​power_distributor:​zh|能量配器]] 不连接相邻网络的道理是一样的:你可能经常需要将子网络分开。这使得不同子网络中的计算机无需全部使用无线网络就可以进行通信
  
-中继允许连接不同网络到彼此。只有网络消息才能被组件在其中不可见。你可以使用分离网络,同时也允许使用网卡进行通信。这个道理和[[block:​power_distributor:​zh|能量分配器]]不连接相邻网络道理一样:你可经常需要将子网络分开这使得不同子网络中的计算机无需全部使用无线网络就可以进行通信+注意中继器只有一个有限带宽它们每 5 tick(250ms)只传输一个数据包,它们的内部队列限制为 20 个数据包如果超过这个限制,就会出现丢包的情况。还需要注意的是,数据包转发次数不超过 5 次在此之后,数据包将被遗弃
  
-Note that relays have a limited bandwidth. They will only transfer one packet per 5 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 5 times. After that the packet is dropped.+中继不会将数据包传递回它们原本的地方,但当数据包多次传递时仍然可能产生循环,所以一定要注意。
  
-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.+无线或有线中继器可以通过首先右键点击中继器,再将无线网卡或连接卡插入到生成的 GUI 中来创建。
  
-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.+中继器块也可以用作 ComputerCraft 的外设,提供一个模仿 ComputerCraft 的(有线)调制解调器的接口。它将把 ComputerCraft 发送的网络消息转发到 OpenComputers 端,如果安装了 [[item:​network_card:​zh|网卡]] ,就可以接收到这些消息。它还将接收 OpenComputers 的网络消息,并在 CC 中推送一个相应的信号,连接到适配器上。注意,OpenComputers 中的网络消息不像 ComputerCraft 那样需要一个“响应端口”。如果网络消息的第一个参数是一个数字,它将被解释为响应端口,告诉 ComputerCraft 接收器,否则响应端口将被设置为 `-1` 。
  
-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`.   +注意:该功能在 ​1.1.0 之前也可以通过适配器块使用。
-*Note*: this functionality was available via the Adapter block before ​1.1.0.+
  
-The Relay is crafted using the following recipe:  +中继器的制作方法如下
-  * 3 x [[block:​cable|Cable]] +  * 3 x [[block:​cable:zh|线缆]] 
-  * 4 x Iron Ingot +  * 4 x 铁锭 
-  * 1 x [[item:​network_card|Network Card]] +  * 1 x [[item:​network_card:zh|网卡]] 
-  * 1 x [[item:​materials|Printed Circuit Board]]+  * 1 x [[item:​materials:zh|印刷电路板(PCB)]]
  
 {{:​recipes:​blocks:​switch.png?​nolink&​200|}} {{:​recipes:​blocks:​switch.png?​nolink&​200|}}