Posted 29 August 2013 - 06:03 AM
Title: Collect IDs of all peripherals on a network
Hi,
I've written some automated power plant monitoring software that connects to a battery of redstone energy cells (that function much like batboxes).
The software works fine, but I'm trying to make it more adaptable. At the moment, I have to manually enter all of the energy cell IDs (redstone_energy_cell_0, etc.) and then it takes those and continues with the program. What I'd like it to do is scan the network for these blocks automatically when the program starts. Is this even possible?
I'm aware that I could set up a computer terminal on each of the energy cells and connect through a modem and send out broadcasts to ping each one, but I'd rather connect directly to the cells, to keep things compact and as simple as possible.
Any help would be greatly appreciated.
Edit:
Oh, I managed to fix it myself.
If Anyone is interested I used the peripheral.getNames() function and rattled each name into a table.
Cheers.
Hi,
I've written some automated power plant monitoring software that connects to a battery of redstone energy cells (that function much like batboxes).
The software works fine, but I'm trying to make it more adaptable. At the moment, I have to manually enter all of the energy cell IDs (redstone_energy_cell_0, etc.) and then it takes those and continues with the program. What I'd like it to do is scan the network for these blocks automatically when the program starts. Is this even possible?
I'm aware that I could set up a computer terminal on each of the energy cells and connect through a modem and send out broadcasts to ping each one, but I'd rather connect directly to the cells, to keep things compact and as simple as possible.
Any help would be greatly appreciated.
Edit:
Oh, I managed to fix it myself.
If Anyone is interested I used the peripheral.getNames() function and rattled each name into a table.
Cheers.