Sirikata
|
#include <ObjectHost.hpp>
Classes | |
struct | ConnectionInfo |
Public Types | |
typedef std::tr1::function < void(const SpaceID &, const ObjectReference &, ServerID)> | SessionCallback |
typedef std::tr1::function < void(const SpaceID &, const ObjectReference &, ConnectionInfo)> | ConnectedCallback |
typedef std::tr1::function < void(const SpaceID &, const ObjectReference &, ServerID)> | MigratedCallback |
typedef std::tr1::function < void(const SpaceObjectReference &, SessionManager::ConnectionEvent after)> | StreamCreatedCallback |
typedef std::tr1::function < void(const SpaceObjectReference &, Disconnect::Code)> | DisconnectedCallback |
typedef SST::Stream < SpaceObjectReference > | SSTStream |
Lookup the SST stream for a particular object. | |
typedef SSTStream::Ptr | SSTStreamPtr |
Public Member Functions | |
String | getSimOptions (const String &) |
ObjectHost (ObjectHostContext *ctx, Network::IOService *ioServ, const String &options) | |
Caller is responsible for starting a thread. | |
~ObjectHost () | |
The ObjectHost must be destroyed after all HostedObject instances. | |
ObjectHostContext * | context () const |
virtual HostedObjectPtr | createObject (const UUID &_id, const String &script_type, const String &script_opts, const String &script_contents) |
Create an object with the specified script. | |
virtual HostedObjectPtr | createObject (const String &script_type, const String &script_opts, const String &script_contents) |
Create an object with the specified script. | |
virtual const String & | defaultScriptType () const =0 |
virtual const String & | defaultScriptOptions () const =0 |
virtual const String & | defaultScriptContents () const =0 |
void | addServerIDMap (const SpaceID &space_id, ServerIDMap *sidmap) |
void | setStorage (OH::Storage *storage) |
OH::Storage * | getStorage () |
void | setPersistentSet (OH::PersistedObjectSet *persistentset) |
OH::PersistedObjectSet * | getPersistedObjectSet () |
void | setQueryProcessor (OH::ObjectQueryProcessor *proc) |
OH::ObjectQueryProcessor * | getQueryProcessor () |
std::tr1::shared_ptr < Transfer::TransferPool > | getTransferPool () |
bool | connect (HostedObjectPtr ho, const SpaceObjectReference &sporef, const SpaceID &space, const TimedMotionVector3f &loc, const TimedMotionQuaternion &orient, const BoundingSphere3f &bnds, const String &mesh, const String &physics, const String &query, const String &zernike, ConnectedCallback connected_cb, MigratedCallback migrated_cb, StreamCreatedCallback stream_created_cb, DisconnectedCallback disconnected_cb) |
Connect the object to the space with the given starting parameters. | |
void | disconnectObject (const SpaceID &space, const ObjectReference &oref) |
Use this function to request the object host to send a disconnect message to space for object. | |
Duration | serverTimeOffset (const SpaceID &space) const |
Get offset of server time from client time for the given space. | |
Duration | clientTimeOffset (const SpaceID &space) const |
Get offset of client time from server time for the given space. | |
Time | spaceTime (const SpaceID &space, const Time &t) const |
Convert a local time into a time for the given space. | |
Time | currentSpaceTime (const SpaceID &space) const |
Get the current time in the given space. | |
Time | localTime (const SpaceID &space, const Time &t) const |
Convert a time in the given space to a local time. | |
Time | currentLocalTime () const |
Get the current local time. | |
bool | send (SpaceObjectReference &sporefsrc, const SpaceID &space, const ObjectMessagePort src_port, const UUID &dest, const ObjectMessagePort dest_port, const std::string &payload) |
Primary ODP send function. | |
bool | send (SpaceObjectReference &sporefsrc, const SpaceID &space, const ObjectMessagePort src_port, const UUID &dest, const ObjectMessagePort dest_port, MemoryReference payload) |
void | registerHostedObject (const SpaceObjectReference &sporef_uuid, const HostedObjectPtr &obj) |
Register object by private UUID, so that it is possible to talk to objects/services which are not part of any space. | |
void | unregisterHostedObject (const SpaceObjectReference &sporef_uuid, HostedObject *obj) |
Unregister a private UUID. Done automatically by ~HostedObject. | |
void | hostedObjectDestroyed (const UUID &objid) |
HostedObjectPtr | getHostedObject (const SpaceObjectReference &id) const |
Lookup HostedObject by one of it's presence IDs. | |
HostedObjectPtr | getHostedObject (const UUID &id) const |
Lookup HostedObject by its internal ID. | |
SSTStreamPtr | getSpaceStream (const SpaceID &space, const ObjectReference &internalID) |
virtual void | start () |
virtual void | stop () |
virtual OHDP::Port * | bindOHDPPort (const SpaceID &space, const OHDP::NodeID &node, OHDP::PortID port) |
Bind an OHDP port for use. | |
virtual OHDP::Port * | bindOHDPPort (const SpaceID &space, const OHDP::NodeID &node) |
Bind a random, unused OHDP port for use. | |
virtual OHDP::PortID | unusedOHDPPort (const SpaceID &space, const OHDP::NodeID &node) |
Get a random, unused OHDP port. | |
virtual void | registerDefaultOHDPHandler (const MessageHandler &cb) |
ObjectScriptManager * | getScriptManager (const String &id) |
Private Types | |
typedef std::tr1::unordered_map < SpaceID, SessionManager *, SpaceID::Hasher > | SpaceSessionManagerMap |
typedef std::tr1::unordered_map < SpaceObjectReference, HostedObjectPtr, SpaceObjectReference::Hasher > | HostedObjectMap |
typedef std::tr1::unordered_map< UUID, HostedObjectWPtr, UUID::Hasher > | InternalIDHostedObjectMap |
typedef std::tr1::unordered_map < String, ObjectScriptManager * > | ScriptManagerMap |
typedef std::tr1::function < void(const SpaceID &, const ObjectReference &, ServerID, const TimedMotionVector3f &, const TimedMotionQuaternion &, const BoundingSphere3f &, const String &, const String &)> | SessionConnectedCallback |
Private Member Functions | |
virtual void | onSpaceNodeSession (const OHDP::SpaceNodeID &id, OHDPSST::Stream::Ptr sn_stream) |
virtual void | onSpaceNodeSessionEnded (const OHDP::SpaceNodeID &id) |
void | handleObjectConnected (const SpaceObjectReference &sporef_internalID, ServerID server) |
void | handleObjectMigrated (const SpaceObjectReference &sporef_internalID, ServerID from, ServerID to) |
void | handleObjectMessage (const SpaceObjectReference &sporef_internalID, const SpaceID &space, Sirikata::Protocol::Object::ObjectMessage *msg) |
void | handleObjectDisconnected (const SpaceObjectReference &sporef_internalID, Disconnect::Code) |
void | wrappedConnectedCallback (HostedObjectWPtr ho_weak, const SpaceID &space, const ObjectReference &obj, const SessionManager::ConnectionInfo &ci, ConnectedCallback cb) |
void | wrappedStreamCreatedCallback (HostedObjectWPtr ho_weak, const SpaceObjectReference &sporef, SessionManager::ConnectionEvent after, StreamCreatedCallback cb) |
void | wrappedDisconnectedCallback (HostedObjectWPtr ho_weak, const SpaceObjectReference &sporef, Disconnect::Code cause, DisconnectedCallback) |
void | commandListObjects (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid) |
void | commandCreateObject (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid) |
void | commandDestroyObject (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid) |
void | commandObjectPresences (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid) |
HostedObjectPtr | getCommandObject (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid) |
void | handleDefaultOHDPMessageHandler (const OHDP::Endpoint &src, const OHDP::Endpoint &dst, MemoryReference payload) |
Private Attributes | |
ObjectHostContext * | mContext |
OH::Storage * | mStorage |
OH::PersistedObjectSet * | mPersistentSet |
OH::ObjectQueryProcessor * | mQueryProcessor |
SpaceSessionManagerMap | mSessionManagers |
uint32 | mActiveHostedObjects |
HostedObjectMap | mHostedObjects |
InternalIDHostedObjectMap | mHostedObjectsByID |
ScriptManagerMap | mScriptManagers |
std::tr1::shared_ptr < Transfer::TransferPool > | mTransferPool |
Transfer::TransferMediator * | mTransferMediator |
std::tr1::unordered_map < String, OptionSet * > | mSpaceConnectionProtocolOptions |
std::map< std::string, std::string > | mSimOptions |
options passed to initialization of scripts (usually path information) | |
Sirikata::SerializationCheck | mSessionSerialization |
OHDP::MessageHandler | mDefaultOHDPMessageHandler |
typedef std::tr1::function<void(const SpaceID&, const ObjectReference&, ConnectionInfo)> Sirikata::ObjectHost::ConnectedCallback |
typedef std::tr1::function<void(const SpaceObjectReference&, Disconnect::Code)> Sirikata::ObjectHost::DisconnectedCallback |
typedef std::tr1::unordered_map<SpaceObjectReference, HostedObjectPtr, SpaceObjectReference::Hasher> Sirikata::ObjectHost::HostedObjectMap [private] |
typedef std::tr1::unordered_map<UUID, HostedObjectWPtr, UUID::Hasher> Sirikata::ObjectHost::InternalIDHostedObjectMap [private] |
typedef std::tr1::function<void(const SpaceID&, const ObjectReference&, ServerID)> Sirikata::ObjectHost::MigratedCallback |
typedef std::tr1::unordered_map<String, ObjectScriptManager*> Sirikata::ObjectHost::ScriptManagerMap [private] |
typedef std::tr1::function<void(const SpaceID&, const ObjectReference&, ServerID)> Sirikata::ObjectHost::SessionCallback |
typedef std::tr1::function<void(const SpaceID&, const ObjectReference&, ServerID, const TimedMotionVector3f&, const TimedMotionQuaternion&, const BoundingSphere3f&, const String&, const String&)> Sirikata::ObjectHost::SessionConnectedCallback [private] |
typedef std::tr1::unordered_map<SpaceID,SessionManager*,SpaceID::Hasher> Sirikata::ObjectHost::SpaceSessionManagerMap [private] |
Lookup the SST stream for a particular object.
typedef std::tr1::function<void(const SpaceObjectReference&, SessionManager::ConnectionEvent after)> Sirikata::ObjectHost::StreamCreatedCallback |
Sirikata::ObjectHost::ObjectHost | ( | ObjectHostContext * | ctx, |
Network::IOService * | ioServ, | ||
const String & | options | ||
) |
Caller is responsible for starting a thread.
ioServ | IOService to run this object host on |
options | a string containing the options to pass to the object host |
References Sirikata::OptionValue::as(), commandCreateObject(), commandDestroyObject(), Sirikata::Context::commander(), commandListObjects(), commandObjectPresences(), Sirikata::FactoryImpl< T, Ftype >::getConstructor(), Sirikata::FactoryWithOptionsImpl< T, Ftype >::getOptionParser(), Sirikata::OptionSet::getOptions(), Sirikata::Transfer::TransferMediator::getSingleton(), Sirikata::ObjectScriptManagerFactory::getSingleton(), Sirikata::Network::StreamFactory::getSingleton(), Sirikata::FactoryImpl< T, Ftype >::hasConstructor(), Sirikata::Context::mainStrand, mContext, mScriptManagers, mSimOptions, mSpaceConnectionProtocolOptions, mTransferMediator, mTransferPool, Sirikata::ObjectHostContext::objectHost, Sirikata::OptionSet::parse(), Sirikata::Transfer::TransferMediator::registerClient(), Sirikata::Command::Commander::registerCommand(), and Sirikata::Network::IOStrand::wrap().
Sirikata::ObjectHost::~ObjectHost | ( | ) |
The ObjectHost must be destroyed after all HostedObject instances.
References mHostedObjects.
void Sirikata::ObjectHost::addServerIDMap | ( | const SpaceID & | space_id, |
ServerIDMap * | sidmap | ||
) |
References Sirikata::Provider< ListenerPtr >::addListener(), handleDefaultOHDPMessageHandler(), handleObjectConnected(), handleObjectDisconnected(), handleObjectMessage(), handleObjectMigrated(), mContext, mSessionManagers, Sirikata::OHDP::DelegateService::registerDefaultOHDPHandler(), and Sirikata::SessionManager::start().
OHDP::Port * Sirikata::ObjectHost::bindOHDPPort | ( | const SpaceID & | space, |
const OHDP::NodeID & | node, | ||
OHDP::PortID | port | ||
) | [virtual] |
Bind an OHDP port for use.
space | the Space to communicate via |
node | the node to communicate via |
port | the PortID to attempt to bind |
PortAllocationError | if the Service cannot allocate the port for some reason other than it already being allocated. |
Implements Sirikata::OHDP::Service.
References mSessionManagers.
OHDP::Port * Sirikata::ObjectHost::bindOHDPPort | ( | const SpaceID & | space, |
const OHDP::NodeID & | node | ||
) | [virtual] |
Bind a random, unused OHDP port for use.
space | the Space to communicate via |
PortAllocationError | if the Service cannot allocate the port for some reason other than it already being allocated. |
Implements Sirikata::OHDP::Service.
References mSessionManagers.
Get offset of client time from server time for the given space.
Should only be called by objects with an active connection to that space. This is just a utility, is always -serverTimeOffset().
References mSessionManagers.
Referenced by localTime().
void Sirikata::ObjectHost::commandCreateObject | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private] |
References createObject(), Sirikata::Command::EmptyResult(), obj, and Sirikata::Command::Commander::result().
Referenced by ObjectHost().
void Sirikata::ObjectHost::commandDestroyObject | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private] |
References Sirikata::Command::EmptyResult(), getCommandObject(), and Sirikata::Command::Commander::result().
Referenced by ObjectHost().
void Sirikata::ObjectHost::commandListObjects | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private] |
References Sirikata::Command::EmptyResult(), mHostedObjectsByID, mSessionSerialization, and Sirikata::Command::Commander::result().
Referenced by ObjectHost().
void Sirikata::ObjectHost::commandObjectPresences | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private] |
References getCommandObject().
Referenced by ObjectHost().
bool Sirikata::ObjectHost::connect | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef, | ||
const SpaceID & | space, | ||
const TimedMotionVector3f & | loc, | ||
const TimedMotionQuaternion & | orient, | ||
const BoundingSphere3f & | bnds, | ||
const String & | mesh, | ||
const String & | physics, | ||
const String & | query, | ||
const String & | zernike, | ||
ConnectedCallback | connected_cb, | ||
MigratedCallback | migrated_cb, | ||
StreamCreatedCallback | stream_created_cb, | ||
DisconnectedCallback | disconnected_cb | ||
) |
Connect the object to the space with the given starting parameters.
returns true if the connection was initiated and no other objects are using this ID to connect.
References Sirikata::SessionManager::connect(), Sirikata::OH::ObjectQueryProcessor::connectRequest(), mHostedObjects, mQueryProcessor, mSessionManagers, mSessionSerialization, wrappedConnectedCallback(), wrappedDisconnectedCallback(), and wrappedStreamCreatedCallback().
Referenced by Sirikata::HostedObject::objectHostConnect().
ObjectHostContext* Sirikata::ObjectHost::context | ( | ) | const [inline] |
HostedObjectPtr Sirikata::ObjectHost::createObject | ( | const String & | script_type, |
const String & | script_opts, | ||
const String & | script_contents | ||
) | [virtual] |
Create an object with the specified script.
The object will be automatically assigned a unique identifier.
script_type | type of script to instantiate, e.g. 'js' |
script_opts | options to pass to the created script |
script_contents | contents of the script, i.e. the script text to eval |
References createObject(), and Sirikata::UUID::random().
HostedObjectPtr Sirikata::ObjectHost::createObject | ( | const UUID & | _id, |
const String & | script_type, | ||
const String & | script_opts, | ||
const String & | script_contents | ||
) | [virtual] |
Create an object with the specified script.
This version allows you to specify the unique identifier manually, so it should only be used if you need an exact ID, e.g. if you are restoring an object.
_id | a unique identifier for this object. Only use this |
script_type | type of script to instantiate, e.g. 'js' |
script_opts | options to pass to the created script |
script_contents | contents of the script, i.e. the script text to eval |
References defaultScriptContents(), defaultScriptOptions(), defaultScriptType(), mActiveHostedObjects, mContext, and mHostedObjectsByID.
Referenced by commandCreateObject(), Sirikata::SQLiteObjectFactory::connectObjects(), Sirikata::CassandraObjectFactory::connectObjects(), createObject(), Sirikata::JS::EmersonScript::eCreateEntityFinish(), and Sirikata::CSVObjectFactory::generate().
Time Sirikata::ObjectHost::currentLocalTime | ( | ) | const |
Get the current local time.
References mContext, and Sirikata::Context::simTime().
Referenced by Sirikata::HostedObject::currentLocalTime().
Get the current time in the given space.
References mContext, Sirikata::Context::simTime(), and spaceTime().
Referenced by Sirikata::HostedObject::currentSpaceTime().
virtual const String& Sirikata::ObjectHost::defaultScriptContents | ( | ) | const [pure virtual] |
Implemented in Sirikata::CppohObjectHost.
Referenced by createObject().
virtual const String& Sirikata::ObjectHost::defaultScriptOptions | ( | ) | const [pure virtual] |
Implemented in Sirikata::CppohObjectHost.
Referenced by createObject().
virtual const String& Sirikata::ObjectHost::defaultScriptType | ( | ) | const [pure virtual] |
Implemented in Sirikata::CppohObjectHost.
Referenced by createObject().
void Sirikata::ObjectHost::disconnectObject | ( | const SpaceID & | space, |
const ObjectReference & | oref | ||
) |
Use this function to request the object host to send a disconnect message to space for object.
References mSessionManagers.
Referenced by Sirikata::HostedObject::destroy(), Sirikata::HostedObject::disconnectDeadPresence(), and Sirikata::HostedObject::disconnectFromSpace().
HostedObjectPtr Sirikata::ObjectHost::getCommandObject | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private] |
References Sirikata::Command::EmptyResult(), getHostedObject(), Sirikata::UUID::null(), and Sirikata::Command::Commander::result().
Referenced by commandDestroyObject(), and commandObjectPresences().
HostedObjectPtr Sirikata::ObjectHost::getHostedObject | ( | const SpaceObjectReference & | id | ) | const |
Lookup HostedObject by one of it's presence IDs.
This may return an empty pointer if no objects have tried to connect. The returned object may also still be in the process of connecting that presence.
References mHostedObjects.
Referenced by getCommandObject(), and handleObjectMessage().
HostedObjectPtr Sirikata::ObjectHost::getHostedObject | ( | const UUID & | id | ) | const |
Lookup HostedObject by its internal ID.
References mHostedObjectsByID.
OH::PersistedObjectSet* Sirikata::ObjectHost::getPersistedObjectSet | ( | ) | [inline] |
OH::ObjectQueryProcessor* Sirikata::ObjectHost::getQueryProcessor | ( | ) | [inline] |
Referenced by Sirikata::HostedObject::requestQueryUpdate().
ObjectScriptManager * Sirikata::ObjectHost::getScriptManager | ( | const String & | id | ) |
References mScriptManagers.
Referenced by Sirikata::HostedObject::initializeScript().
String Sirikata::ObjectHost::getSimOptions | ( | const String & | simName | ) |
References mSimOptions.
Referenced by Sirikata::HostedObject::runSimulation().
ObjectHost::SSTStreamPtr Sirikata::ObjectHost::getSpaceStream | ( | const SpaceID & | space, |
const ObjectReference & | internalID | ||
) |
OH::Storage* Sirikata::ObjectHost::getStorage | ( | ) | [inline] |
std::tr1::shared_ptr<Transfer::TransferPool> Sirikata::ObjectHost::getTransferPool | ( | ) | [inline] |
Referenced by Sirikata::HostedObject::downloadZernikeDescriptor().
void Sirikata::ObjectHost::handleDefaultOHDPMessageHandler | ( | const OHDP::Endpoint & | src, |
const OHDP::Endpoint & | dst, | ||
MemoryReference | payload | ||
) | [private] |
References mDefaultOHDPMessageHandler.
Referenced by addServerIDMap().
void Sirikata::ObjectHost::handleObjectConnected | ( | const SpaceObjectReference & | sporef_internalID, |
ServerID | server | ||
) | [private] |
void Sirikata::ObjectHost::handleObjectDisconnected | ( | const SpaceObjectReference & | sporef_internalID, |
Disconnect::Code | |||
) | [private] |
void Sirikata::ObjectHost::handleObjectMessage | ( | const SpaceObjectReference & | sporef_internalID, |
const SpaceID & | space, | ||
Sirikata::Protocol::Object::ObjectMessage * | msg | ||
) | [private] |
References getHostedObject(), obj, OH_LOG, and Sirikata::Logging::warn.
Referenced by addServerIDMap().
void Sirikata::ObjectHost::handleObjectMigrated | ( | const SpaceObjectReference & | sporef_internalID, |
ServerID | from, | ||
ServerID | to | ||
) | [private] |
void Sirikata::ObjectHost::hostedObjectDestroyed | ( | const UUID & | objid | ) |
Convert a time in the given space to a local time.
space | the space to translate from |
t | the time in the space to convert to a local time |
References clientTimeOffset(), Sirikata::Time::null(), and Sirikata::Time::raw().
Referenced by Sirikata::HostedObject::localTime().
virtual void Sirikata::ObjectHost::onSpaceNodeSession | ( | const OHDP::SpaceNodeID & | id, |
OHDPSST::Stream::Ptr | sn_stream | ||
) | [inline, private, virtual] |
Reimplemented from Sirikata::SpaceNodeSessionListener.
virtual void Sirikata::ObjectHost::onSpaceNodeSessionEnded | ( | const OHDP::SpaceNodeID & | id | ) | [inline, private, virtual] |
Reimplemented from Sirikata::SpaceNodeSessionListener.
void Sirikata::ObjectHost::registerDefaultOHDPHandler | ( | const MessageHandler & | cb | ) | [virtual] |
References mDefaultOHDPMessageHandler.
void Sirikata::ObjectHost::registerHostedObject | ( | const SpaceObjectReference & | sporef_uuid, |
const HostedObjectPtr & | obj | ||
) |
Register object by private UUID, so that it is possible to talk to objects/services which are not part of any space.
Done automatically by HostedObject::initialize* functions.
References Sirikata::Logging::error, mHostedObjects, obj, SILOG, and Sirikata::SpaceObjectReference::toString().
Referenced by Sirikata::HostedObject::objectHostConnect().
bool Sirikata::ObjectHost::send | ( | SpaceObjectReference & | sporefsrc, |
const SpaceID & | space, | ||
const ObjectMessagePort | src_port, | ||
const UUID & | dest, | ||
const ObjectMessagePort | dest_port, | ||
const std::string & | payload | ||
) |
Primary ODP send function.
References mSessionManagers, and mSessionSerialization.
Referenced by Sirikata::HostedObject::delegateODPPortSend(), and send().
bool Sirikata::ObjectHost::send | ( | SpaceObjectReference & | sporefsrc, |
const SpaceID & | space, | ||
const ObjectMessagePort | src_port, | ||
const UUID & | dest, | ||
const ObjectMessagePort | dest_port, | ||
MemoryReference | payload | ||
) |
Get offset of server time from client time for the given space.
Should only be called by objects with an active connection to that space.
References mSessionManagers.
Referenced by spaceTime().
void Sirikata::ObjectHost::setPersistentSet | ( | OH::PersistedObjectSet * | persistentset | ) | [inline] |
void Sirikata::ObjectHost::setQueryProcessor | ( | OH::ObjectQueryProcessor * | proc | ) | [inline] |
void Sirikata::ObjectHost::setStorage | ( | OH::Storage * | storage | ) | [inline] |
Convert a local time into a time for the given space.
space | the space to translate to |
t | the local time to convert |
References Sirikata::Time::null(), Sirikata::Time::raw(), and serverTimeOffset().
Referenced by currentSpaceTime(), and Sirikata::HostedObject::spaceTime().
void Sirikata::ObjectHost::start | ( | ) | [virtual] |
Implements Sirikata::Service.
void Sirikata::ObjectHost::stop | ( | ) | [virtual] |
Implements Sirikata::Service.
References mHostedObjectsByID, mSessionManagers, and Sirikata::SessionManager::stop().
Referenced by Sirikata::OH::Manual::ManualObjectQueryProcessor::stop().
void Sirikata::ObjectHost::unregisterHostedObject | ( | const SpaceObjectReference & | sporef_uuid, |
HostedObject * | obj | ||
) |
Unregister a private UUID. Done automatically by ~HostedObject.
References Sirikata::Logging::error, mHostedObjects, obj, SILOG, and Sirikata::SpaceObjectReference::toString().
Referenced by Sirikata::HostedObject::destroy(), Sirikata::HostedObject::disconnectDeadPresence(), and Sirikata::HostedObject::disconnectFromSpace().
OHDP::PortID Sirikata::ObjectHost::unusedOHDPPort | ( | const SpaceID & | space, |
const OHDP::NodeID & | node | ||
) | [virtual] |
Get a random, unused OHDP port.
Implements Sirikata::OHDP::Service.
References mSessionManagers, and Sirikata::XDP::PortID::null().
void Sirikata::ObjectHost::wrappedConnectedCallback | ( | HostedObjectWPtr | ho_weak, |
const SpaceID & | space, | ||
const ObjectReference & | obj, | ||
const SessionManager::ConnectionInfo & | ci, | ||
ConnectedCallback | cb | ||
) | [private] |
References Sirikata::ObjectHost::ConnectionInfo::bnds, Sirikata::SessionManager::ConnectionInfo::bounds, Sirikata::Logging::info, Sirikata::SessionManager::ConnectionInfo::loc, Sirikata::ObjectHost::ConnectionInfo::loc, Sirikata::SessionManager::ConnectionInfo::mesh, Sirikata::ObjectHost::ConnectionInfo::mesh, mQueryProcessor, Sirikata::SessionManager::ConnectionInfo::orient, Sirikata::ObjectHost::ConnectionInfo::orient, Sirikata::SessionManager::ConnectionInfo::physics, Sirikata::ObjectHost::ConnectionInfo::physics, Sirikata::OH::ObjectQueryProcessor::presenceConnected(), Sirikata::SessionManager::ConnectionInfo::query, Sirikata::ObjectHost::ConnectionInfo::query, Sirikata::SessionManager::ConnectionInfo::server, and Sirikata::ObjectHost::ConnectionInfo::server.
Referenced by connect().
void Sirikata::ObjectHost::wrappedDisconnectedCallback | ( | HostedObjectWPtr | ho_weak, |
const SpaceObjectReference & | sporef, | ||
Disconnect::Code | cause, | ||
DisconnectedCallback | cb | ||
) | [private] |
References mQueryProcessor, and Sirikata::OH::ObjectQueryProcessor::presenceDisconnected().
Referenced by connect().
void Sirikata::ObjectHost::wrappedStreamCreatedCallback | ( | HostedObjectWPtr | ho_weak, |
const SpaceObjectReference & | sporef, | ||
SessionManager::ConnectionEvent | after, | ||
StreamCreatedCallback | cb | ||
) | [private] |
uint32 Sirikata::ObjectHost::mActiveHostedObjects [private] |
Referenced by createObject(), and hostedObjectDestroyed().
ObjectHostContext* Sirikata::ObjectHost::mContext [private] |
Referenced by addServerIDMap(), createObject(), currentLocalTime(), currentSpaceTime(), hostedObjectDestroyed(), and ObjectHost().
Referenced by handleDefaultOHDPMessageHandler(), and registerDefaultOHDPHandler().
Referenced by connect(), getHostedObject(), hostedObjectDestroyed(), registerHostedObject(), unregisterHostedObject(), and ~ObjectHost().
Referenced by commandListObjects(), createObject(), getHostedObject(), hostedObjectDestroyed(), and stop().
Referenced by connect(), wrappedConnectedCallback(), wrappedDisconnectedCallback(), and wrappedStreamCreatedCallback().
Referenced by getScriptManager(), and ObjectHost().
Referenced by addServerIDMap(), bindOHDPPort(), clientTimeOffset(), connect(), disconnectObject(), getSpaceStream(), send(), serverTimeOffset(), stop(), and unusedOHDPPort().
Referenced by commandListObjects(), connect(), and send().
std::map<std::string, std::string > Sirikata::ObjectHost::mSimOptions [private] |
options passed to initialization of scripts (usually path information)
Referenced by getSimOptions(), and ObjectHost().
std::tr1::unordered_map<String,OptionSet*> Sirikata::ObjectHost::mSpaceConnectionProtocolOptions [private] |
Referenced by ObjectHost().
OH::Storage* Sirikata::ObjectHost::mStorage [private] |
Referenced by ObjectHost().
std::tr1::shared_ptr<Transfer::TransferPool> Sirikata::ObjectHost::mTransferPool [private] |
Referenced by ObjectHost().