GridService

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Methods)
Line 20: Line 20:
 
* get_region_flags - get flags for a region.
 
* get_region_flags - get flags for a region.
  
== get_region_range ==
+
== Calls ==
 +
 
 +
=== get_region_range ===
 
This gets information on all the regions in a given co-ordinate range.
 
This gets information on all the regions in a given co-ordinate range.
  

Revision as of 15:24, 29 July 2014

Contents

Introduction

The grid service manages information about regions on the grid.

API

Functions available on the grid service are

  • register - registers a region with the grid.
  • deregister - deregisters a region from the grid.
  • get_neighbours - gets the region neighbours of a given location.
  • get_region_by_uuid - returns region details given a region UUID.
  • get_region_by_position - returns region details given a position.
  • get_region_by_name - returns region details given a name. This will only return the first name if there are multiple regions with the same name.
  • get_regions_by_name - returns details of all regions that match a given name
  • get_region_range - returns details of all regions in a given area
  • get_default_regions - returns default regions for a grid. These are regions that are tried in order if the requested login region does not exist.
  • get_default_hypergrid_regions - returns default Hypergrid regions for a grid. These are regions that are tried in order if Hypergrid destination request by an inbound foreign user does not exist.
  • get_fallback_regions - returns fallback regions for a grid. These are regions that are tried in order if no default regions are online.
  • get_hyperlinks - get linked Hypergrid regions.
  • get_region_flags - get flags for a region.

Calls

get_region_range

This gets information on all the regions in a given co-ordinate range.

The POST field is a urlencoded string like so

SCOPEID=00000000-0000-0000-0000-000000000000&XMIN=0&YMIN=0&XMAX=2147483647&YMAX=2147483647&METHOD=get_region_range 

where

  • SCOPEID must always be present and always 00000000-0000-0000-0000-000000000000 (UUID.Zero) at the present time.
  • XMIN The minimum x-coordinate in the region range. Please note that this is in meters, not 256m map tiles. So to start this at map tile co-ordinate 1000, one must specify 256000 (1000 * 256).
  • YMIN The minimum u-coordinate in the region range. Please note that this is in meters, not 256m map tiles.
  • XMAX The maximum x-coordinate in the region range. Please note that this is in meters, not 256m map tiles.
  • XMIN The maximum y-coordinate in the region range. Please note that this is in meters, not 256m map tiles.

If there are any regions in the range, a response like

<?xml version="1.0"?>
<ServerResponse>
  <region0 type="List">
    <uuid>dd5b77f8-bf88-45ac-aace-35bd76426c81</uuid>
    <locX>256000</locX>
    <locY>256000</locY>
    <sizeX>256</sizeX>
    <sizeY>256</sizeY>
    <regionName>test</regionName>
    <serverIP>192.168.1.2</serverIP>
    <serverHttpPort>9000</serverHttpPort>
    <serverURI>http://192.168.1.2:9000/</serverURI>
    <serverPort>9000</serverPort>
    <regionMapTexture>fc8fda13-c2e9-4e83-8543-b7fe98231399</regionMapTexture>
    <parcelMapTexture>00000000-0000-0000-0000-000000000000</parcelMapTexture>
    <access>13</access>
    <regionSecret>0ab0a97d-ffcc-4b29-a715-74372b763b88</regionSecret>
    <owner_uuid>f2f493c0-27d3-4cf2-be97-b44dfdad13b6</owner_uuid>
    <Token/>
  </region0>
  <region1 type="List">
    <uuid>dd5b77f8-bf88-45ac-aace-35bd76426c82</uuid>
    <locX>256000</locX>
    <locY>256256</locY>
    <sizeX>256</sizeX>
    <sizeY>256</sizeY>
    <regionName>test2</regionName>
    <serverIP>192.168.1.2</serverIP>
    <serverHttpPort>9000</serverHttpPort>
    <serverURI>http://192.168.1.2:9000/</serverURI>
    <serverPort>9001</serverPort>
    <regionMapTexture>e8c14947-c7d2-48e8-bab2-5a62ec4da4d8</regionMapTexture>
    <parcelMapTexture>00000000-0000-0000-0000-000000000000</parcelMapTexture>
    <access>13</access>
    <regionSecret>273b84ff-bfe1-480b-901b-c6e4bcd3e091</regionSecret>
    <owner_uuid>f2f493c0-27d3-4cf2-be97-b44dfdad13b6</owner_uuid>
    <Token/>
  </region1>
</ServerResponse>

If no matching regions are found then

<?xml version="1.0"?>
<ServerResponse>
  <result>null</result>
</ServerResponse>

will be returned.

Personal tools
General
About This Wiki