computercraft.computer – ComputerCraft computer#

This device represents a computer peripheral.

Available methods#

computercraft.computer.turnOn()#

Turn the device on.

computercraft.computer.shutdown()#

Turn the device off.

computercraft.computer.reboot()#

Reboot the device.

computercraft.computer.getID()#

Get the device’s computer identifier.

Returns:

The device’s identifier.

Return type:

number

computercraft.computer.isOn()#

Get whether the device is on or not.

Returns:

Whether the device is on or not.

Return type:

boolean

computercraft.computer.getLabel()#

Get the device’s label.

Returns:

The device’s label.

Return type:

string | nil

Events#

This device does not raise events.