Turbine Computer Port

From Technic Wiki
Revision as of 13:20, 29 June 2014 by Erogenous Beef (talk | contribs) (Lua Methods (0.3))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Turbine Computer Port
Turbine Computer Port.png
Turbine Computer Port
Mod

Big Reactors

Type

Multiblock Part

Durability

N/A

Stackable

Yes (64)

Energy

?

Storage

?

A Turbine Computer Port is a utility block that can be used to monitor or control a Multiblock Turbine remotely, using ComputerCraft's Computers.

The Computer Port provides the finest level of control over a turbine's operation, and is capable of querying and controlling a turbine much faster than either Redstone or RedNet. It acts like a standard ComputerCraft Peripheral.

A Computer Port may be placed on any exterior turbine face, within the outer frame. This includes the top and bottom faces.

Crafting

Turbine Housing
Gold Ingot
Turbine Housing
Redstone Dust
Redstone Repeater
Redstone Dust
Turbine Housing
Gold Ingot
Turbine Housing
Turbine Computer Port


Lua Methods (0.3)

Method Name Arguments Return Type Description
getConnected None Boolean Returns true if the computer port is connected to a valid Multiblock Turbine.
getActive None Boolean Returns true if the turbine is active (consuming hot fluid and generating power), false otherwise.
getEnergyStored None Integer Returns the amount of energy stored in the Multiblock Turbine's internal energy buffer, in Redstone Flux (RF) units
getRotorSpeed None Float Returns the rotational velocity of the Multiblock Turbine's rotor, in Rotations Per Minute (RPMs)
getInputAmount None Integer Returns the amount of fluid contained in the Multiblock Turbine's hot-fluid intake tank, in milli-buckets (mB)
getInputType None String or Nil Returns the Fluid Dictionary name of the fluid contained in the Multiblock Turbine's hot-fluid intake tank, or Nil if the tank is empty
getOutputAmount None Integer Returns the amount of fluid contained in the Multiblock Turbine's effluent outlet tank, in milli-buckets (mB)
getOutputType None String or Nil Returns the Fluid Dictionary name of the fluid contained in the Multiblock Turbine's effluent outlet tank, or Nil if the tank is empty
getFluidAmountMax None Integer Returns the maximum amount of fluid which the Turbine's fluid tanks may contain, in milli-buckets (mB)
getFluidFlowRate None Integer Returns the amount of hot fluid which the turbine consumed in the last tick, in milli-buckets (mB)
getFluidFlowRateMax None Integer Returns the user setting governing the maximum desired amount of fluid for the Multiblock Turbine to consume per tick, in milli-buckets (mB)
getFluidFlowRateMaxMax None Integer Returns the maximum permissible user setting for the desired fluid flow rate, in milli-buckets (mB). Normally returns 2000 mB
getEnergyProducedLastTick None Float Returns the amount of energy the Multiblock Turbine produced in the last tick, in Redstone Flux (RF) units
getInductorEngaged None Boolean Returns true if the Multiblock Turbine's induction coils are engaged, false otherwise.
setActive Boolean: active? None Sets the reactor to be active if the argument is true, or inactive if the argument is false
setFluidFlowRateMax Integer: flow rate (0 through FluidFlowRateMaxMax) None Sets the player's desired maximum rate at which the Multiblock Turbine will consume intake fluids. Range is from 0 (not inserted) to the return value of getFluidFlowRateMaxMax (normally 2000).
setVentOff None None Sets the Multiblock Turbine to never vent its condensed/cooled fluids. This is identical to pressing the "Vent: None" button in the turbine's GUI.
setVentOverflow None None Sets the Multiblock Turbine to vent its condensed/cooled fluids if they cannot be placed in the condensed fluid (outlet) tank. This is identical to pressing the "Vent: Overflow" button in the turbine's GUI.
setVentAll None None Sets the Multiblock Turbine to always vent its condensed/cooled fluids, so the turbine will never create condensed fluid when processing hot fluids. This is identical to pressing the "Vent: All" button in the turbine's GUI.
setInductorEngaged Boolean: engaged? None Activates or deactivates the Multiblock Turbine's induction coils. When inactive, power will not be generated and less energy will be removed from the turbine's rotor.

Notes

When writing programs to control your turbine, you should always ensure that the Computer Port is actually connected. Turbines located far away may disassemble and deactivate due to chunks unloading from the world. If your turbine is not chunkloaded, make sure to call getConnected().

If a Computer Port receives a non-getConnected() call and is not connected to a valid turbine, it will throw a Lua exception back to the Computer.

Example

Assuming your Computer Port is directly behind your Computer:

local turbine
turbine= peripheral.wrap("back")
turbine.getRotorSpeed()
turbine.setActive(true)