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
block:switch:zh [2022/08/14 13:16]
hxt521 [Relay]
block:switch:zh [2024/02/13 03:23] (current)
hfsr [中继器]
Line 3: Line 3:
 {{:​blocks:​switch.png?​nolink&​128|}} {{:​blocks:​switch.png?​nolink&​128|}}
  
-篇文章部分/​全部内容还没有进行翻译+注:旧版本的交换机与无线接入点合并为了中继器
  
-中继允许连接不同网络到彼此。只有网络消息才能被传递,组件在其中不可见。你可以使用它分离网络,同时也允许使用网卡进行通信。这个道理和[[block:​power_distributor:​zh|能量分配器]]不连接相邻网络的道理是一样的:你可能经常需要子网络分开使得不同子网中的计算机无需全部使用无线网络以进行通信。+中继器可用于连接不同网络。只有网络报文可穿过中继器而网络中的组件彼此不可见。使用它可以在保持网络独立的情况下允许使用网卡进行通信。不连接相邻网络的原因如[[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`.   +中继器方块也可以充当CC模组的外设,提供了模仿CC(有线)调制解调器的接口。它将把CC模组发送的网络报文转发到OC模组一侧,如果这一侧的设备安装了[[item:network_card:​zh|网卡]]就可以接收到这些消息。它还会接收OC模组的网络报文,并向连接到适配器的CC电脑推送一个相应的信号。注意,OC模组中的网络报文不像CC模组那样需要“响应端口”。若网络报文的第一个参数为数字,则它将被理解为响应端口,并通知CC的接收方,否则响应端口将被设置为 ​`-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#​印刷电路板|印刷电路板]]
  
 {{:​recipes:​blocks:​switch.png?​nolink&​200|}} {{:​recipes:​blocks:​switch.png?​nolink&​200|}}