This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
zonedabone's profile picture

Does Rednet Have A Built In Token System?

Started by zonedabone, 14 February 2012 - 01:45 AM
zonedabone #1
Posted 14 February 2012 - 02:45 AM
I'm looking at rednet, and it looks awesome, but in order to implement an automated network, I need some sort of token/m-s configuration to ensure that machines aren't messing with each other. Does rednet have anything like this included, or would it be easy to implement myself?

Also, is there a way to listen for rednet messages that aren't targeted at you?
Advert #2
Posted 14 February 2012 - 10:26 AM
I'm looking at rednet, and it looks awesome, but in order to implement an automated network, I need some sort of token/m-s configuration to ensure that machines aren't messing with each other. Does rednet have anything like this included, or would it be easy to implement myself?

Also, is there a way to listen for rednet messages that aren't targeted at you?

Could you please elaborate? I'm not sure what you want.

Not sure if this is relevant, but i'll post it anyway:

1) Rednet is very prone to collisions:
If two machines transmit at the same time, you'll get a garbled mess, and both the messages will be lost.

2) There is no data checksum in rednet.

3) You could listen to messages not targeted to you by modifying the rednet API, or implementing your own listener.

??) By token, do you mean something like:
send(computerID, "data1", "data2", "data3")
?
If you find a function to split/explode a string, you could do that by sending something like:
send(computerID, "data1;data2;data3")
tehdetox #3
Posted 16 February 2012 - 10:45 PM
i believe he's on about CSMA/CD to prevent data collisions.

as for the token, thats the network architecture such as token bus or token ring which passes a data token around the computers. Which ever computer holds the token can transmit its data before passing the token to the next computer in the network.

As for the original question, I have no idea :D/>/>