Difference between revisions of "LSL Protocol/Restrained Love Open Relay Group/sensor"

From Second Life Wiki
Jump to: navigation, search
Line 12: Line 12:
 
===Syntax===
 
===Syntax===
  
The parameters are the same as for the LSL command llSensor(string name, key id, integer type, float range, float arc). The acknowledgment of receipt contains a non empty list of uuid keys, in particular the null key 00000000-0000-0000-0000-000000000000 if nothing is detected, or "ko". No other acknowledgment of receipt is possible.
+
The parameters are the same as for the LSL command llSensor(string name, key id, integer type, float range, float arc), with an additional optional parameter "full". The acknowledgment of receipt contains a non empty list of uuid keys, and with the aditionnal parameter "full" the list of names, in particular the null key 00000000-0000-0000-0000-000000000000 if nothing is detected, or "ko". No other acknowledgment of receipt is possible.
  
 
Two examples with
 
Two examples with
Line 23: Line 23:
 
  C-->R  sensor,!x-sensor/name/id/type/range/arc
 
  C-->R  sensor,!x-sensor/name/id/type/range/arc
 
  C<--R  sensor,!x-sensor/name/id/type/range/arc,00000000-0000-0000-0000-000000000000
 
  C<--R  sensor,!x-sensor/name/id/type/range/arc,00000000-0000-0000-0000-000000000000
 +
 +
C-->R  sensor,!x-sensor/name/id/type/range/arc/full
 +
C<--R  sensor,!x-sensor/name/id/type/range/arc/full,97116a5b-686b-64a9-a086-cae72a95ce6b,ccb7ce46-eec4-e790-9995-47d789adfe49,Object1,Object2
 +
 +
C-->R  sensor,!x-sensor/name/id/type/range/arc/full
 +
C<--R  sensor,!x-sensor/name/id/type/range/arc/full,00000000-0000-0000-0000-000000000000,""
  
 
The source must be previously accepted by the relay to avoid a bad use of this command; a griefer for example could use it, together with the wildcard, to cause lag in a sim. Even if the command !x-sensor is not a restriction to be saved.  
 
The source must be previously accepted by the relay to avoid a bad use of this command; a griefer for example could use it, together with the wildcard, to cause lag in a sim. Even if the command !x-sensor is not a restriction to be saved.  
Line 40: Line 46:
 
*Before sending this kind of command, the source must check by !x-orgversions the presence of 'sensor=' in the acknowledgment of receipt of this command.
 
*Before sending this kind of command, the source must check by !x-orgversions the presence of 'sensor=' in the acknowledgment of receipt of this command.
  
*The maximal possible length of the acknowledgment of receipt is 16*36+15=591<1023. It remains 432 characters for the command !x-sensor/name/id/type/range/arc, more precisely !x-sensor = 9 characters, /////, = 6 characters, id = 36 characters, range = 8 characters maximum, arc = 8 characters (example: 3.141593) maximum, type = 31 characters maximum, so it remains 334 characters for 'name'.  
+
*The maximal possible length of the acknowledgment of receipt is 16*36+15=591<1023. It remains 432 characters for the command !x-sensor/name/id/type/range/arc, more precisely !x-sensor = 9 characters, /////, = 6 characters, id = 36 characters, range = 8 characters maximum, arc = 8 characters (example: 3.141593) maximum, type = 31 characters maximum, so it remains 334 characters for 'name' without the additional parameter "full".
 +
 
 +
*The additional parameter "full" is designed to being used in gridwide mode, when llKey2Name() cannot be used by the controller to get the names of the UUIDs keys returned by !x-sensor.
  
 
*!x-sensor enables to use llSensor(), e.g. for a forcesit command or for forcing to follow an object or an avatar or for identifying avatars, when the captured avatar is more than 100m away. It also enables to perform a scan with the relay, not the source, as center.
 
*!x-sensor enables to use llSensor(), e.g. for a forcesit command or for forcing to follow an object or an avatar or for identifying avatars, when the captured avatar is more than 100m away. It also enables to perform a scan with the relay, not the source, as center.

Revision as of 23:57, 10 June 2011

sensor

STATUS: draft

version: 001

A unique command !x-sensor allowing to do remote llSensor()

Description of !x-sensor

Syntax

The parameters are the same as for the LSL command llSensor(string name, key id, integer type, float range, float arc), with an additional optional parameter "full". The acknowledgment of receipt contains a non empty list of uuid keys, and with the aditionnal parameter "full" the list of names, in particular the null key 00000000-0000-0000-0000-000000000000 if nothing is detected, or "ko". No other acknowledgment of receipt is possible.

Two examples with

  • C being the RLV controller which is a grabber (i.e. it already sent a restriction to the relay, accepted by the relay)
  • R being the RLV relay
C-->R  sensor,!x-sensor/name/id/type/range/arc
C<--R  sensor,!x-sensor/name/id/type/range/arc,97116a5b-686b-64a9-a086-cae72a95ce6b,ccb7ce46-eec4-e790-9995-47d789adfe49
C-->R  sensor,!x-sensor/name/id/type/range/arc
C<--R  sensor,!x-sensor/name/id/type/range/arc,00000000-0000-0000-0000-000000000000
C-->R  sensor,!x-sensor/name/id/type/range/arc/full
C<--R  sensor,!x-sensor/name/id/type/range/arc/full,97116a5b-686b-64a9-a086-cae72a95ce6b,ccb7ce46-eec4-e790-9995-47d789adfe49,Object1,Object2
C-->R  sensor,!x-sensor/name/id/type/range/arc/full
C<--R  sensor,!x-sensor/name/id/type/range/arc/full,00000000-0000-0000-0000-000000000000,""

The source must be previously accepted by the relay to avoid a bad use of this command; a griefer for example could use it, together with the wildcard, to cause lag in a sim. Even if the command !x-sensor is not a restriction to be saved.

  • C being any RLV source not yet accepted by the relay
  • R being the RLV relay
C-->R  sensor,!x-sensor/name/id/type/range/arc
C<--R  sensor,!x-sensor/name/id/type/range/arc,ko

Semantics

The effect of this command is that the relay performs a llSensor() with the given parameters, and sends the result as a list of UUID keys separated by a comma to the source in the acknowledgment of receipt using llRegionSayTo().

Remarks

  • Before sending this kind of command, the source must check by !x-orgversions the presence of 'sensor=' in the acknowledgment of receipt of this command.
  • The maximal possible length of the acknowledgment of receipt is 16*36+15=591<1023. It remains 432 characters for the command !x-sensor/name/id/type/range/arc, more precisely !x-sensor = 9 characters, /////, = 6 characters, id = 36 characters, range = 8 characters maximum, arc = 8 characters (example: 3.141593) maximum, type = 31 characters maximum, so it remains 334 characters for 'name' without the additional parameter "full".
  • The additional parameter "full" is designed to being used in gridwide mode, when llKey2Name() cannot be used by the controller to get the names of the UUIDs keys returned by !x-sensor.
  • !x-sensor enables to use llSensor(), e.g. for a forcesit command or for forcing to follow an object or an avatar or for identifying avatars, when the captured avatar is more than 100m away. It also enables to perform a scan with the relay, not the source, as center.