For anyone who is interested, the below code solves the previously unsolved problem. Current versions of OpenComputers add the .store method on ME controllers, allowing the storing of item information in a database for use with the export bus. In-world configuration has an adapter touching an export bus and an ME controller, and has a database upgrade in the adapter.
This code solves the problem of exporting one of each item, which I found of particular interest due to Thaumcraft's fancy new scan-everything-in-a-chest feature...
--Required API's
local component = require "component"
local serialization = require "serialization"
local sides = require "sides"
--adapter is connected to an ME controller, and export bus.
local me = component.me_controller
--export bus is has a redstone card set so it doesn't auto-exportlocal bus = component.me_exportbus
--adapter has an database upgrade
local db = component.database
--Loop over items in the me network
for key,item in ipairs(me.getItemsInNetwork())do--printout each item for debugging; serializing to see the entire data table
print(item.name.." :: "..serialization.serialize(me.getItemsInNetwork(item)))--Use the item as a filter to find an item in the me network,and store its
--itemstack data into the database
me.store(item,db.address,1,1)--configure the export bus to export that item
bus.setExportConfiguration(sides.left,1,db.address,1)--trigger an export
bus.exportIntoSlot(sides.left,1)--clear out the database entry.Mightnot be needed...
db.clear(1)end
Applied Energistics 2 using OC as an advanced import/export system
in Requests
Posted
For anyone who is interested, the below code solves the previously unsolved problem. Current versions of OpenComputers add the .store method on ME controllers, allowing the storing of item information in a database for use with the export bus. In-world configuration has an adapter touching an export bus and an ME controller, and has a database upgrade in the adapter.
This code solves the problem of exporting one of each item, which I found of particular interest due to Thaumcraft's fancy new scan-everything-in-a-chest feature...
https://pastebin.com/wQJNJkej
Hopefully this is helpful.