This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
api:computer [2016/06/17 18:36] payonel |
api:computer [2018/09/10 00:27] payonel |
||
---|---|---|---|
Line 50: | Line 50: | ||
- `computer.pullSignal([timeout: number]): name, ...` | - `computer.pullSignal([timeout: number]): name, ...` | ||
Tries to pull a signal from the queue, waiting up to the specified amount of time before failing and returning `nil`. If no timeout is specified waits forever. | Tries to pull a signal from the queue, waiting up to the specified amount of time before failing and returning `nil`. If no timeout is specified waits forever. | ||
- | The first returned result is the signal name, following results correspond to what was pushed in `pushSignal`, for example. These vary based on the even type. | + | The first returned result is the signal name, following results correspond to what was pushed in `pushSignal`, for example. These vary based on the event type. |
- | | + | Generally it is more convenient to use `event.pull` from the [[api:event|event]] library. The return value is the very same, but the `event` library provides some more options. |
- | **important** Please use `event.pull` instead. It returns the same data, provides a more advanced API, and does not interfere with proper driver operation. Do not call this method unless | + | - `computer.beep([frequency:string or number[, duration: number])` |
- | - You do not have the [[api:event|event]] library available, or | + | Causes the computer to produce a beep sound at `frequency` Hz for `duration` seconds. This method is overloaded taking a single string parameter as a pattern of dots `.` and dashes `.` for short and long beeps respectively. |
- | - Your intent is to disable driver code from functioning normally (such as [[api:component|component]], [[api:filesystem|filesystem]], [[api:keyboard|keyboard]], and [[api:term|term]]) | + | |
Contents | Contents | ||
----------- | ----------- | ||
{{page>api:contents&noheader&noeditbutton&nouser&nofooter}} | {{page>api:contents&noheader&noeditbutton&nouser&nofooter}} |