Socket Peripheral API
Peripheral Type: neo_socket
The neo_socket peripheral allows computers to query and interact with expansion modules housed inside a Socket Block.
Methods
hashModule(slot)
Checks if a module is currently present in the specified socket slot.
- Arguments:
slot(number): Slot index (0 to 3).- Returns:
boolean-trueif a module is present,falseotherwise.
getModule(slot)
Retrieves the peripheral wrapper for the module in the specified slot.
- Arguments:
slot(number): Slot index (0 to 3).- Returns:
table|nil- The module peripheral table (allowing direct calls to module methods likescanForSubLevels), ornilif empty.
findModule(module_type)
Searches for the first installed module matching the specified type string.
- Arguments:
module_type(string): Module type identifier (e.g.,"neo_radar").- Returns:
table|nil- The module peripheral table, ornilif not found.