Modem API
  | 
  |||||||||
| Closes a channel on a modem. A channel must be open to receive messages from it. A modem can only have 128 channels open at the same time. channel must be a number between 0 and 65535. | |||||||||
| Syntax | modem.close(
  | 
  ||||||||
| Returns | nil | ||||||||
| Part of | CC:Tweaked (source) | ||||||||
| API | modem | ||||||||
  | |||||||||
  | 
  |||||||||
| Closes all channels on a modem. A channel must be open to receive messages on it. A modem can only have 128 channels open at the same time. | |||||||||
| Syntax | modem.closeAll() | ||||||||
| Returns | nil | ||||||||
| Part of | CC:Tweaked (source) | ||||||||
| API | modem | ||||||||
  | |||||||||
  | 
  |||||||||||
| Checks if a channel is open. A channel must be open to receive messages on it. A modem can only have 128 channels open at the same time. channel must be a Number between 0 and 65535. | |||||||||||
| Syntax | modem.isOpen(
  | 
  ||||||||||
| Returns | boolean open | ||||||||||
| Part of | CC:Tweaked (source) | ||||||||||
| API | modem | ||||||||||
  | |||||||||||
  | 
  |||||||||||
| Returns whether the modem is wireless. | |||||||||||
| Syntax | modem.isWireless() | ||||||||||
| Returns | boolean isWireless | ||||||||||
| Part of | CC:Tweaked (source) | ||||||||||
| API | modem | ||||||||||
  | |||||||||||
  | 
  |||||||||
| Opens a channel on a modem. A channel must be opened to receive messages from it. A modem can only have 128 channels open at the same time. channel must be a number between 0 and 65535. | |||||||||
| Syntax | modem.open(
  | 
  ||||||||
| Returns | nil | ||||||||
| Part of | CC:Tweaked (source) | ||||||||
| API | modem | ||||||||
  | |||||||||
  | 
  |||||||||
| Sends a modem message to a certain channel. If the modem is wired this will queue a modem_message event on all computers connected to the wired network that have the specified channel open. If the modem is wireless it will queue a modem_message event on all computers in range that have the specified channel open.
 | 
  |||||||||
| Syntax | modem.transmit(
  | 
  ||||||||
| Returns | nil | ||||||||
| API | modem | ||||||||
  | |||||||||
    This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.