Sirikata
|
Client for the Environment SpaceModule. More...
#include <Environment.hpp>
Public Member Functions | |
EnvironmentSimulation (HostedObjectPtr ho, const SpaceObjectReference &pres) | |
virtual void | start () |
virtual void | stop () |
virtual boost::any | invoke (std::vector< boost::any > ¶ms) |
Private Member Functions | |
void | handleCreatedStream (int err, ODPSST::Stream::Ptr strm) |
void | handleMessage (MemoryReference data) |
void | notifyListener () |
void | sendUpdate () |
Private Attributes | |
HostedObjectPtr | mParent |
SpaceObjectReference | mPresence |
json_spirit::Value | mEnvironment |
ODPSST::Stream::Ptr | mStream |
RecordSSTStream < ODPSST::Stream::Ptr > | mRecordStream |
Invokable * | mListener |
Client for the Environment SpaceModule.
It syncs data with the space and exposes it via the Invokable interface.
Sirikata::EnvironmentSimulation::EnvironmentSimulation | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | pres | ||
) |
void Sirikata::EnvironmentSimulation::handleCreatedStream | ( | int | err, |
ODPSST::Stream::Ptr | strm | ||
) | [private] |
References ENV_LOG, Sirikata::Logging::error, handleMessage(), Sirikata::RecordSSTStream< StreamPtrType >::initialize(), mRecordStream, mStream, and SST_IMPL_SUCCESS.
Referenced by start().
void Sirikata::EnvironmentSimulation::handleMessage | ( | MemoryReference | data | ) | [private] |
boost::any Sirikata::EnvironmentSimulation::invoke | ( | std::vector< boost::any > & | params | ) | [virtual] |
Reimplemented from Sirikata::Invokable.
References Sirikata::Invokable::anyAsBoolean(), Sirikata::Invokable::anyAsInvokable(), Sirikata::Invokable::anyAsNumeric(), Sirikata::Invokable::anyAsString(), Sirikata::Invokable::anyIsBoolean(), Sirikata::Invokable::anyIsInvokable(), Sirikata::Invokable::anyIsNumeric(), Sirikata::Invokable::anyIsString(), Sirikata::Invokable::asAny(), ENV_LOG, Sirikata::Logging::error, mEnvironment, mListener, mParent, name(), notifyListener(), and sendUpdate().
void Sirikata::EnvironmentSimulation::notifyListener | ( | ) | [private] |
References Sirikata::Invokable::invoke(), and mListener.
Referenced by handleMessage(), and invoke().
void Sirikata::EnvironmentSimulation::sendUpdate | ( | ) | [private] |
References ENV_LOG, Sirikata::Logging::insane, mEnvironment, mRecordStream, and Sirikata::RecordSSTStream< StreamPtrType >::write().
Referenced by invoke().
void Sirikata::EnvironmentSimulation::start | ( | ) | [virtual] |
Implements Sirikata::Service.
References ENVIRONMENT_SERVICE_PORT, handleCreatedStream(), mParent, and mPresence.
void Sirikata::EnvironmentSimulation::stop | ( | ) | [virtual] |
Implements Sirikata::Service.
json_spirit::Value Sirikata::EnvironmentSimulation::mEnvironment [private] |
Referenced by handleMessage(), invoke(), and sendUpdate().
Referenced by invoke(), and notifyListener().
Referenced by start().
Referenced by handleCreatedStream(), and sendUpdate().
Referenced by handleCreatedStream().