ComputerCraftの非公式Wikiです。

Peripheral
メソッド名戻り値概要
peripheral.getNames()テーブル周辺機器が存在する方向を返します。例){"back","left","top"}
peripheral.isPresent( side )周辺機器が存在する場合true指定した方向に周辺機器が存在するかを返します。
peripheral.getType( side )周辺機器の名前指定した方向に周辺機器が存在する場合、その名前を返します。
driveディスクドライブ
computerコンピュータ/アドバンスドコンピュータ
monitorモニタ/アドバンスドモニタ
turtleタートル/アドバンスドタートル
printerプリンタ
modem有線モデム/ワイヤレスモデム
peripheral.getMethods( side )テーブル「指定した方向にある周辺機器」のメソッド名の一覧を返します。
【drive】 isDiskPresent / getDiskLabel / setDiskLabel / hasData / getMountPath / hasAudio / getAudioTitle / playAudio / stopAudio / ejectDisk / getDiskID
【computer/turtle】 turnOn / shutdown / reboot / getID / isOn
【monitor】 write / scroll / setCursorPos / setCursorBlink / getCursorPos / getSize / clear / clearLine / setTextScale / setTextColour / setTextColor / setBackgroundColour / setBackgroundColor / isColour / isColor
【printer】 write / setCursorPos / getCursorPos / getPageSize / newPage / endPage / getInkLevel / setPageTitle / getPaperLevel
【modem】(ワイヤレスモデムの場合) open / isOpen / close / closeAll / transmit / isWireless
【modem】(有線モデムの場合) open / isOpen / close / closeAll / transmit / isWireless / getNamesRemote / isPresentRemote / getTypeRemote / getMethodsRemote / callRemote
peripheral.call( side, _sMethod, ... )
peripheral.wrap( side )
peripheral.find( sType, fnFilter )
※sideには top、bottom、left、right、front、back が指定できます。
有線モデムで使用できる関数
メソッド名戻り値概要
getNamesRemote()テーブル有線のネットワークに接続されている機器の名前の一覧を返します。
getTypeRemote( name )指定した名前の機器が、有線のネットワークに接続されている場合、その種類を返します。
getMethodsRemote( name )指定した名前の機器が、有線のネットワークに接続されている場合、実行できる関数の名前の一覧を返します。
isPresentRemote( name )指定した名前の機器が、有線のネットワークに接続されているかを返します。
callRemote( name [, arg1, arg2, ... ])nameで指定した関数を実行します。関数に引数が必要な場合、それも指定します。

このページへのコメント

有線モデムで使用できる関数はAPIはModemです。

0
Posted by 月緋 2017年04月05日(水) 17:20:49 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

メンバーのみ編集できます