mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-02 18:47:07 -04:00
6
Component Abstract Bus
Vexatos edited this page 2014-07-13 05:30:02 -07:00
For those that don't like images: the wiki has moved to a new place, http://ocdoc.cil.li/.
This wiki will no longer be updated.
This card allows for interfacing with Stargate Tech 2's Abstract Bus system.
Component name: abstract_bus
.
Callbacks:
getEnabled(): boolean
Returns whether the local bus interface is enabled.setEnabled(enabled: boolean)
Sets whether the local bus interface should be enabledgetAddress(): number
Returns the local interface address.number
is a 16 bit hexadecimal number (0xFFFF being a broadcast). Returns0
if an address has not yet been set.setAddress(address: number)
Sets the local interface address.number
is a 16bit hexadecimal number.send(address: number, data: table): boolean
Sends data across the abstract bus. The tabledata
is in the form of key-value pairs, e.g.lua> component.abstract_bus.send(0xFFFF, { ["action"]="dial", ["address"]="Losomdeh Salothirt Erpac" })
- See SGTech2 documentation for more info on the Abstract Bus.
maxPacketSize(): number
Returns the maximum size a packet can be sent over the bus.
The abstract bus generates a signal named bus_message
if a message is received. See the signals reference.