Jump to content

OpenSimulator Internals/SimulationService

From Open Simulator Technical Help

OpenSimulator Internals/SimulationService

[edit]

Overview

[edit]

SimulationService provides general simulation functions. Used for login-to-simulator communication and simulator-to-simulator communication (teleport, region crossing, moving objects between regions).

Runs per-simulator, not on ROBUST.


Interface

[edit]
namespace OpenSim.Services.Interfaces
{
    public interface ISimulationService
    {
        IScene GetScene(UUID regionId);
        ISimulationService GetInnerService();

        // Agents
        bool CreateAgent(GridRegion source, GridRegion destination, AgentCircuitData aCircuit, uint flags, EntityTransferContext ctx, out string reason);
        bool UpdateAgent(GridRegion destination, AgentData data, EntityTransferContext ctx);
        bool UpdateAgent(GridRegion destination, AgentPosition data);
        bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason);
        bool ReleaseAgent(UUID originRegion, UUID id, string uri);
        bool CloseAgent(GridRegion destination, UUID id, string auth_token);

        // Objects
        bool CreateObject(GridRegion destination, Vector3 newPosition, ISceneObject sog, bool isLocalCall);
    }
}

Method Notes

[edit]
Method Notes
GetScene(regionId) Retrieve the scene for a given region UUID.
GetInnerService() Returns the underlying service implementation.
CreateAgent() Ask the simulator hosting the destination to create an agent. Source will be null if the user logged in directly or arrived from a simulator that does not send this parameter.
UpdateAgent(AgentData) Full child agent update.
UpdateAgent(AgentPosition) Short positional update only.
QueryAccess() Returns whether a prospective user is allowed to visit the region. viaTeleport=true for teleport, false for region crossing.
ReleaseAgent() Message from receiving region to departing region, confirming the client has connected.
CloseAgent() Close and remove an agent from a region.
CreateObject() Create an object in the destination region. Used primarily for prim crossing.

See Also

[edit]