Posted 21 November 2013 - 09:34 PM
Problem: rednet.receive() refuses to be triggered (not even tickled) and rednet.broadcast(); refuses to fire at times (most of the time…)
Context: I'm currently (once again) in the process of writting a reactor manager. im currently on the sensor data gather step. the issue here is that when i try to send An array of a reactor's contents, the data is generated, but not sent. nothing will pick it up when i try and send the data at more than one message a second.
Acknowledgement: i realize that i could just serialize the entire array and send it as a single string instead of sending it piece-meal to get around this whole issue, but i still want to know if this is just an API limitation, or something im doing wrong in my code.
heres my code…. I know its alot, i know my commenting isn't the greatest, but cut me some slack. I can't comment the thing like a story book because it just isn't finished yet, and im just a senior in highschool to boot…
Code: http://pastebin.com/xhGYpmUj
the issue im having can be traced specifically to the "netSendReactorMap()" function near the top of the program. the function that does the dirty work of sending off the generated data is handed to the "sendWords()" function. I think the problem is localized to those functions, i can't be sure. Before i put the filter on the"os.pullEvent()" command in my main method, the server was usually genrating all kinds of weird event records, which tells me i have NO idea how rednet really works.
so if in my comments i act like i know what im doing, i now stand corrected, because i don't.
Context: I'm currently (once again) in the process of writting a reactor manager. im currently on the sensor data gather step. the issue here is that when i try to send An array of a reactor's contents, the data is generated, but not sent. nothing will pick it up when i try and send the data at more than one message a second.
Acknowledgement: i realize that i could just serialize the entire array and send it as a single string instead of sending it piece-meal to get around this whole issue, but i still want to know if this is just an API limitation, or something im doing wrong in my code.
heres my code…. I know its alot, i know my commenting isn't the greatest, but cut me some slack. I can't comment the thing like a story book because it just isn't finished yet, and im just a senior in highschool to boot…
Code: http://pastebin.com/xhGYpmUj
the issue im having can be traced specifically to the "netSendReactorMap()" function near the top of the program. the function that does the dirty work of sending off the generated data is handed to the "sendWords()" function. I think the problem is localized to those functions, i can't be sure. Before i put the filter on the"os.pullEvent()" command in my main method, the server was usually genrating all kinds of weird event records, which tells me i have NO idea how rednet really works.
so if in my comments i act like i know what im doing, i now stand corrected, because i don't.
Edited on 21 November 2013 - 09:15 PM