aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/perl/test/OpenSimTest/GridTester.pm
diff options
context:
space:
mode:
authorAdam Frisby2008-03-25 16:29:54 +0000
committerAdam Frisby2008-03-25 16:29:54 +0000
commit8c05b81d6860d8e0da4098cc6f59f630d7c53037 (patch)
tree3325e09660ee8ad5a12cc19c8da6c4bd8bff5c21 /share/perl/test/OpenSimTest/GridTester.pm
parent* On Ray casting. Now returning the face normal of the collision face. (diff)
downloadopensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.zip
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.gz
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.bz2
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.xz
* Committing Lulurun's Cgi/Perl implementation of the UGAI servers.
* I love you long time.
Diffstat (limited to 'share/perl/test/OpenSimTest/GridTester.pm')
-rw-r--r--share/perl/test/OpenSimTest/GridTester.pm62
1 files changed, 62 insertions, 0 deletions
diff --git a/share/perl/test/OpenSimTest/GridTester.pm b/share/perl/test/OpenSimTest/GridTester.pm
new file mode 100644
index 0000000..61fef6b
--- /dev/null
+++ b/share/perl/test/OpenSimTest/GridTester.pm
@@ -0,0 +1,62 @@
1package GridTester;
2
3use strict;
4use OpenSim::Utility;
5
6sub init {
7 &OpenSimTest::Config::registerHandler("simulator_login", \&_simulator_login);
8 &OpenSimTest::Config::registerHandler("simulator_data_request", \&_simulator_data_request);
9 &OpenSimTest::Config::registerHandler("simulator_after_region_moved", \&_simulator_after_region_moved);
10 &OpenSimTest::Config::registerHandler("map_block", \&_map_block);
11}
12
13sub _simulator_login {
14 my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL;
15 my @param = @_;
16 my %xml_rpc_param = (
17 "authkey" => "null",
18 "UUID" => $param[0],
19 "sim_ip" => $param[1],
20 "sim_port" => $param[2],
21 "region_locx" => 1000,
22 "region_locy" => 1000,
23 "sim_name" => "OpenTest",
24 "http_port" => 9000,
25 "remoting_port" => 8895,
26 "map-image-id" => "0e5a5e87-08d9-4b37-9b8e-a4c3c4e409ab",
27 );
28 return &OpenSim::Utility::XMLRPCCall($url, "simulator_login", \%xml_rpc_param);
29}
30
31sub _map_block {
32 my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL;
33 my @param = @_;
34 my %xml_rpc_param = (
35 xmin => $param[0],
36 ymin => $param[1],
37 xmax => $param[2],
38 ymax => $param[3],
39 );
40 return &OpenSim::Utility::XMLRPCCall($url, "map_block", \%xml_rpc_param);
41}
42
43sub _simulator_data_request {
44 my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL;
45 my @param = @_;
46 my %xml_rpc_param = (
47 region_handle => $param[0],
48 authkey => undef,
49 );
50 return &OpenSim::Utility::XMLRPCCall($url, "simulator_data_request", \%xml_rpc_param);
51}
52
53sub _simulator_after_region_moved {
54 my $url = shift || $OpenSimTest::Config::GRID_SERVER_URL;
55 my @param = @_;
56 my %xml_rpc_param = (
57 UUID => $param[0],
58 );
59 return &OpenSim::Utility::XMLRPCCall($url, "simulator_after_region_moved", \%xml_rpc_param);
60}
61
621;