07-25-2015, 12:00 AM
Well, here is as I understand:
Two redstone wires will connect a switch to another switch, one each way. Each switch has a maximum of four connection to neighboring switches. When a packet arrives, the provided address is 'translated' to a 2 bit number which codes for which of it's four connections the original packet should be sent.
This process is repeated over and over until the packet reaches it's intended destination.
Each device (but not switches!) connected to intOREnet receives a universal 8 bit address.
This consists of two parts
The first 6 bits is the address of the 'hub' it is connected to. A hub is like a switch, but altered slightly so that it works with local networks.
The last 2 bits is which physical port on the 'hub' it is connected to. There are three ports on each hub (not four).
Each switch has a pile of memory that stores which of it's connections a packet must be sent for EACH 6 bit address it is not calculated on-the-fly as this would take a long time.
These 8-bit addresses are not unlike IP addresses, the main difference being these cannot be changed after assignment (although you can switch the physical port a dilevice is connected to thus changing the last two bits)
Never, ever, ever, ever send a packet to 00000000, because this is special and used for assignment.
Address 111111XX can be used similarly to 192.168.X.X, it is internal. The XX is the physical port the local device is connected to (00, 01 or 10). Since it is impossible for anything to have the address 11111111, it can be used like 127.0.0.1.
intOREnet does NOT guarantee the safe delivery of a packet, nor does it guarantee that a packet sent to the same address twice will take the same time to be delivered each time.
So, a packet sent from your devices must contain the following elements, in this order:
Two redstone wires will connect a switch to another switch, one each way. Each switch has a maximum of four connection to neighboring switches. When a packet arrives, the provided address is 'translated' to a 2 bit number which codes for which of it's four connections the original packet should be sent.
This process is repeated over and over until the packet reaches it's intended destination.
Each device (but not switches!) connected to intOREnet receives a universal 8 bit address.
This consists of two parts
The first 6 bits is the address of the 'hub' it is connected to. A hub is like a switch, but altered slightly so that it works with local networks.
The last 2 bits is which physical port on the 'hub' it is connected to. There are three ports on each hub (not four).
Each switch has a pile of memory that stores which of it's connections a packet must be sent for EACH 6 bit address it is not calculated on-the-fly as this would take a long time.
These 8-bit addresses are not unlike IP addresses, the main difference being these cannot be changed after assignment (although you can switch the physical port a dilevice is connected to thus changing the last two bits)
Never, ever, ever, ever send a packet to 00000000, because this is special and used for assignment.
Address 111111XX can be used similarly to 192.168.X.X, it is internal. The XX is the physical port the local device is connected to (00, 01 or 10). Since it is impossible for anything to have the address 11111111, it can be used like 127.0.0.1.
intOREnet does NOT guarantee the safe delivery of a packet, nor does it guarantee that a packet sent to the same address twice will take the same time to be delivered each time.
So, a packet sent from your devices must contain the following elements, in this order:
- A lead bit
- An 8 bit destination address as explained above.
- A lead bit (these make things easier when cutting up the serial packet.)
- An 8 bit source address (your address)
- Another lead bit
- 4 bits that will be a packet number. (Although strictly not necessary, this will allow clients to stitch data sent over multiple packets together should they be received in a different order)
- Another lead bit
- 4 bytes (yes, bytes) that is a blank canvas. This is your 'data'. It will not be altered or read by the switches themselves, and any structure or such can be placed within here. It does not have to fill all 4 bytes.