Corrade can fetch the current simulator statistics and deliver them as CSV
to LSL scripts. This can be helpful if you want to remotely monitor simulators, perhaps in combination with the teleport feature of Corrade.
Provided that you have requested an URL from the simulator, the following command:
default { state_entry() { llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "getregiondata", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), "data", wasListToCSV( [ "Stats.Agents", "Stats.LastLag" ] ), "callback", wasURLEscape(URL) ] ) ); } }
will make Corrade return the number of agents and the last lag to the provided URL
:
data=Stats.Agents,2,Stats.LastLag,203
which represents the statistics of the simulator that Corrade is currently on.
For a complete list of useful fields to query, please see the Simulator class of libomv as well as the SimStats structure.
You can query any field, such as Stats.Dilation
, Stats.Agents
, Stats.RegionID
and so on, just by supplying their name to the data
parameter when you send the instant message to Corrade.