Component/ae2common: Difference between revisions
Jump to navigation
Jump to search
imported>OCDoc Import Imported from legacy OpenComputers documentation at ocdoc.cil.li |
Clean up Markdown artifacts from DokuWiki migration |
||
| Line 1: | Line 1: | ||
=== NetworkController Trait API === | === NetworkController Trait API === | ||
* | * <code>getCpus():table</code> | ||
<pre>Get a list of tables representing the available CPUs in the network. | <pre>Get a list of tables representing the available CPUs in the network. | ||
</pre> | </pre> | ||
* | * <code>getCraftables([filter:table]):table</code> | ||
<pre>Get a list of known item recipes. These can be used to issue crafting requests. | <pre>Get a list of known item recipes. These can be used to issue crafting requests. | ||
</pre> | </pre> | ||
* | * <code>getItemsInNetwork([filter:table]):table</code> | ||
<pre>Get a list of the stored items in the network. | <pre>Get a list of the stored items in the network. | ||
</pre> | </pre> | ||
* | * <code>store([filter:table,] [dbAddress:string,] [startSlot:number,] [count:number]): bool</code> | ||
<pre>Store items in the network matching the specified filter in the database with the specified address. | <pre>Store items in the network matching the specified filter in the database with the specified address. | ||
</pre> | </pre> | ||
* | * <code>getFluidsInNetwork():table</code> | ||
<pre>Get a list of the stored fluids in the network. | <pre>Get a list of the stored fluids in the network. | ||
</pre> | </pre> | ||
* | * <code>getAvgPowerInjection():number</code> | ||
<pre>Get the average power injection into the network. | <pre>Get the average power injection into the network. | ||
</pre> | </pre> | ||
* | * <code>getAvgPowerUsage():number</code> | ||
<pre>Get the average power usage of the network. | <pre>Get the average power usage of the network. | ||
</pre> | </pre> | ||
* | * <code>getIdlePowerUsage():number</code> | ||
<pre>Get the idle power usage of the network. | <pre>Get the idle power usage of the network. | ||
</pre> | </pre> | ||
* | * <code>getMaxStoredPower():number</code> | ||
<pre>Get the maximum stored power in the network. | <pre>Get the maximum stored power in the network. | ||
</pre> | </pre> | ||
* | * <code>getStoredPower():number</code> | ||
<pre>Get the stored power in the network. | <pre>Get the stored power in the network. | ||
| Line 43: | Line 43: | ||
=== Craftable API === | === Craftable API === | ||
* | * <code>getItemStack():table</code> | ||
<pre>Returns the item stack representation of the crafting result. | <pre>Returns the item stack representation of the crafting result. | ||
</pre> | </pre> | ||
* | * <code>request([amount:int[, prioritizePower:boolean[, cpuName:string]]]):userdata</code> | ||
<pre>Requests the item to be crafted, returning an object that allows tracking the crafting status. | <pre>Requests the item to be crafted, returning an object that allows tracking the crafting status. | ||
| Line 53: | Line 53: | ||
=== CraftingStatus API === | === CraftingStatus API === | ||
* | * <code>isCanceled():boolean</code> | ||
<pre>Get whether the crafting request has been canceled. | <pre>Get whether the crafting request has been canceled. | ||
</pre> | </pre> | ||
* | * <code>isDone():boolean</code> | ||
<pre>Get whether the crafting request is done. | <pre>Get whether the crafting request is done. | ||
| Line 63: | Line 63: | ||
=== Environment API === | === Environment API === | ||
* | * <code>getEnergyStored():number</code> | ||
<pre>Returns the amount of stored energy on the connected side. | <pre>Returns the amount of stored energy on the connected side. | ||
</pre> | </pre> | ||
* | * <code>getMaxEnergyStored():number</code> | ||
<pre>Returns the maximum amount of stored energy on the connected side. | <pre>Returns the maximum amount of stored energy on the connected side. | ||
</pre> | </pre> | ||
* | * <code>canExtract():number</code> | ||
<pre>Returns whether this component can have energy extracted from the connected side. | <pre>Returns whether this component can have energy extracted from the connected side. | ||
</pre> | </pre> | ||
* | * <code>canReceive():number</code> | ||
<pre>Returns whether this component can receive energy on the connected side. | <pre>Returns whether this component can receive energy on the connected side. | ||
| Line 81: | Line 81: | ||
=== Interface API === | === Interface API === | ||
* | * <code>getInterfaceConfiguration([slot:number]):table</code> | ||
<pre>Get the configuration of the interface. | <pre>Get the configuration of the interface. | ||
</pre> | </pre> | ||
* | * <code>setInterfaceConfiguration([slot:number][, database:address, entry:number[, size:number]]):boolean</code> | ||
<pre>Configure the interface. | <pre>Configure the interface. | ||
| Line 91: | Line 91: | ||
=== ImportBus API === | === ImportBus API === | ||
* | * <code>getImportConfiguration(side:number[, slot:number]):boolean</code> | ||
<pre>Get the configuration of the import bus pointing in the specified direction. | <pre>Get the configuration of the import bus pointing in the specified direction. | ||
</pre> | </pre> | ||
* | * <code>setImportConfiguration(side:number[, slot:number][, database:address, entry:number]):boolean</code> | ||
<pre>Configure the import bus pointing in the specified direction to import item stacks matching the specified descriptor. | <pre>Configure the import bus pointing in the specified direction to import item stacks matching the specified descriptor. | ||
| Line 101: | Line 101: | ||
=== ExportBus API === | === ExportBus API === | ||
* | * <code>getExportConfiguration(side:number, [ slot:number]):boolean</code> | ||
<pre>Get the configuration of the export bus pointing in the specified direction. | <pre>Get the configuration of the export bus pointing in the specified direction. | ||
</pre> | </pre> | ||
* | * <code>setExportConfiguration(side:number[, slot:number][, database:address, entry:number):boolean</code> | ||
<pre>Configure the export bus pointing in the specified direction to export item stacks matching the specified descriptor. | <pre>Configure the export bus pointing in the specified direction to export item stacks matching the specified descriptor. | ||
</pre> | </pre> | ||
* | * <code>exportIntoSlot(side:number, slot:number):boolean</code> | ||
<pre>Make the export bus facing the specified direction perform a single export operation into the specified slot. | <pre>Make the export bus facing the specified direction perform a single export operation into the specified slot. | ||
</pre> | </pre> | ||
Latest revision as of 20:27, 24 August 2026
NetworkController Trait API
getCpus():table
Get a list of tables representing the available CPUs in the network.
getCraftables([filter:table]):table
Get a list of known item recipes. These can be used to issue crafting requests.
getItemsInNetwork([filter:table]):table
Get a list of the stored items in the network.
store([filter:table,] [dbAddress:string,] [startSlot:number,] [count:number]): bool
Store items in the network matching the specified filter in the database with the specified address.
getFluidsInNetwork():table
Get a list of the stored fluids in the network.
getAvgPowerInjection():number
Get the average power injection into the network.
getAvgPowerUsage():number
Get the average power usage of the network.
getIdlePowerUsage():number
Get the idle power usage of the network.
getMaxStoredPower():number
Get the maximum stored power in the network.
getStoredPower():number
Get the stored power in the network.
Craftable API
getItemStack():table
Returns the item stack representation of the crafting result.
request([amount:int[, prioritizePower:boolean[, cpuName:string]]]):userdata
Requests the item to be crafted, returning an object that allows tracking the crafting status.
CraftingStatus API
isCanceled():boolean
Get whether the crafting request has been canceled.
isDone():boolean
Get whether the crafting request is done.
Environment API
getEnergyStored():number
Returns the amount of stored energy on the connected side.
getMaxEnergyStored():number
Returns the maximum amount of stored energy on the connected side.
canExtract():number
Returns whether this component can have energy extracted from the connected side.
canReceive():number
Returns whether this component can receive energy on the connected side.
Interface API
getInterfaceConfiguration([slot:number]):table
Get the configuration of the interface.
setInterfaceConfiguration([slot:number][, database:address, entry:number[, size:number]]):boolean
Configure the interface.
ImportBus API
getImportConfiguration(side:number[, slot:number]):boolean
Get the configuration of the import bus pointing in the specified direction.
setImportConfiguration(side:number[, slot:number][, database:address, entry:number]):boolean
Configure the import bus pointing in the specified direction to import item stacks matching the specified descriptor.
ExportBus API
getExportConfiguration(side:number, [ slot:number]):boolean
Get the configuration of the export bus pointing in the specified direction.
setExportConfiguration(side:number[, slot:number][, database:address, entry:number):boolean
Configure the export bus pointing in the specified direction to export item stacks matching the specified descriptor.
exportIntoSlot(side:number, slot:number):boolean
Make the export bus facing the specified direction perform a single export operation into the specified slot.