Difference between revisions of "Category:LSL LinksetData/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 3: Line 3:
= はじめに =
= はじめに =


リンクセットは、LSLスクリプトで使用可能なキー/値のペアとして、最大128KiBのデータを保存できます。このデータはリンクセット内のルートプリムに関連付けられ、転送、スクリプトのリセット、オブジェクトのコピーを行っても、メモリ使用量にはカウントされません。一度設定されると、それを削除する唯一の方法は、[[llLinksetDataReset/ja]]または[[llLinksetDataDelete/ja]]関数を使用することです。スクリプトが[[llLinksetDataReset|/ja]]、[[llLinksetDataWrite/ja]]、または[[llLinksetDataCreate/ja]]関数を使用してリンクセットデータを正常に変更すると、リンクセット内のすべてのスクリプトでリンクセットデータの変更を記述し、影響を受けたキー名を説明するlinkset_dataイベントが発生します。
リンクセットは、LSLスクリプトで使用可能なキー/値のペアとして、最大128KiBのデータを保存できます。このデータはリンクセット内のルートプリムに関連付けられ、転送、スクリプトのリセット、オブジェクトのコピーを行っても、メモリ使用量にはカウントされません。一度設定されると、それを削除する唯一の方法は、[[llLinksetDataReset/ja|llLinksetDataReset]]または[[llLinksetDataDelete/ja|llLinksetDataDelete]]関数を使用することです。スクリプトが[[llLinksetDataReset/ja|llLinksetDataReset]]、[[llLinksetDataWrite/ja|llLinksetDataWrite]]、または[[llLinksetDataCreate/ja|llLinksetDataCreate]]関数を使用してリンクセットデータを正常に変更すると、リンクセット内のすべてのスクリプトでリンクセットデータの変更を記述し、影響を受けたキー名を説明するlinkset_dataイベントが発生します。


リンクセットデータは、リンクセットの外部では見えません。スクリプトは、実行中のリンクセットのデータにのみアクセスできます。リンクセットデータはアバターには適用されません。
リンクセットデータは、リンクセットの外部では見えません。スクリプトは、実行中のリンクセットのデータにのみアクセスできます。リンクセットデータはアバターには適用されません。

Revision as of 16:48, 25 September 2023

はじめに

リンクセットは、LSLスクリプトで使用可能なキー/値のペアとして、最大128KiBのデータを保存できます。このデータはリンクセット内のルートプリムに関連付けられ、転送、スクリプトのリセット、オブジェクトのコピーを行っても、メモリ使用量にはカウントされません。一度設定されると、それを削除する唯一の方法は、llLinksetDataResetまたはllLinksetDataDelete関数を使用することです。スクリプトがllLinksetDataResetllLinksetDataWrite、またはllLinksetDataCreate関数を使用してリンクセットデータを正常に変更すると、リンクセット内のすべてのスクリプトでリンクセットデータの変更を記述し、影響を受けたキー名を説明するlinkset_dataイベントが発生します。

リンクセットデータは、リンクセットの外部では見えません。スクリプトは、実行中のリンクセットのデータにのみアクセスできます。リンクセットデータはアバターには適用されません。

リンクセットデータを持つ2つのリンクセットをマージする場合、新しいルートのデータは保持され、シミュレータは古いルートからできるだけ多くのキー値ペアを新しいルートに移動しようとします。すべてのデータに十分なスペースがない場合、シミュレータは古いルートから一部のデータを破棄します。保存されるデータは任意のものである可能性があります。


関数

llLinksetDataWrite

Function: integer llLinksetDataWrite( string name, string value );

Creates or updates a key/value pair in the linksets datastore.
Returns an integer indicating success or failure. 0 is success, a positive number indicates failure.

• string name key name for data to be stored.
• string value String data to be associated with this key.
Caveats

If value is an empty string, the key is deleted from the linkset data.

All Issues ~ Search JIRA for related Bugs

llLinksetDataRead

Function: string llLinksetDataRead( string name );

Reads the value associated with a key from the linkset's key-value datastore.
Returns a string associated with the key. If the key does not exist, an empty string is returned.

• string name key name for data to be stored.key name for data to be read.

llLinksetDataDelete

Function: llLinksetDataDelete( string name );

Removes a key value pair from the linkset's datastore.

• string name key name for data to be stored.key name for data to be read.which is the key name for data to be read.

llLinksetDataDeleteFound

Function: list llLinksetDataDeleteFound( string pattern, string pass );

finds and attempts to delete all keys in the data store that match pattern.
Returns a list of the number of keys deleted or skipped.

• string pattern A regular expression describing which keys to delete.
• string pass Optional pass phrase to delete protected keys.

llLinksetDataReset

Function: llLinksetDataReset( );

Erases all existing keys value pairs in the linkset's datastore.

llLinksetDataAvailable

Function: integer llLinksetDataAvailable( );

The number of bytes available in the linkset's datastore
Returns an integer with the number of bytes free in the datastore.

llLinksetDataCountKeys

Function: integer llLinksetDataCountKeys( );

Returns the number of keys used in the datastore.
Returns an integer with the total number of keys in use.

llLinksetDataCountFound

Function: integer llLinksetDataCountFound( string pattern );

Returns the number of keys in the linkset datastore that match the pattern supplied in the pattern.
Returns an integer count of the keys in the datastore that match the supplied pattern.

• string pattern A regular expression describing which keys to delete.A regular expression describing which keys to return.

llLinksetDataListKeys

Function: list llLinksetDataListKeys( integer first, integer count );

Return a list of keys currently in use in the linkset data.
Returns a list of keys stored in the linkset data.

• integer first The (zero based) index of the first key to return.
• integer count The maximum number of key names to return in the list.

llLinksetDataFindKeys

Function: list llLinksetDataFindKeys( string regex, integer first, integer count );

Return a list of keys the linkset data which match the expression passed to the function.
Returns a list of keys matching regex stored in the linkset data.

• string regex A regex expression to search for.
• integer first The (zero based) index of the first key to return.The (zero based) index of the first key to return.
• integer count The maximum number of key names to return in the list.The maximum number of key names to return in the list.

Events

linkset_data

Function: linkset_data( integer action, string name, string value );
• integer action The action taken on the linkset datastore. reset, update or delete.
• string name key name for data to be stored.key name for data to be read.which is the key name for data to be read.The name of key changed. Empty string for reset.
• string value String data to be associated with this key.The value associated with the key. Empty string for reset or delete.
All Issues ~ Search JIRA for related Bugs