![]() |
VR-Link API Documentation for HLA 1.3
|
The DtManagedInterface Class is a singleton that is used to manage the message flow between C# and the rest of the system. More...
Collaboration diagram for DtManagedInterface:Public Member Functions | |
| void | initializeManagedInterface (ManagedMessageDelegate del) |
| initializes the DtManagedInterface class with a delegate from the C# application | |
| void | tick (double maxTime) |
| ticks the DtManagedInterface class, and all child strategies as well as any of their resources | |
| void | shutdown () |
| Shutdown any simulation connections. | |
| void | receiveMessage (unsigned char *msg, int length) |
| called when C# sends a message to ManagedInterface for processing | |
| void | sendMessage (DtMessage *msg) |
| called to send C# a message generated from DtManagedInterface | |
| bool | handleMessage (DtMessage *msg) |
| Message dispatch function. | |
| virtual DtMessageFactory & | messageFactory () const |
| retuns the message factory | |
| virtual bool | hasResource (std::string name) const |
| Resource handling functions. | |
| virtual void * | findResource (std::string name) const |
| This will return a handle to a named resource or the Null handle if it does not exist. | |
| virtual void | setResource (std::string name, void *asset) |
| This will set given object as a resource with the given name. If the resource already exists, this will replace it. | |
| virtual bool | removeResource (std::string name) |
| This will remove a resource with the given name. | |
| virtual void | addHandler (std::string messageType, DtMessageDelegate *handler) |
| Functions for adding or removing message handlers. | |
| virtual void | removeHandler (std::string messageType, DtMessageDelegate *handler) |
| virtual void | addStrategy (DtLinkStrategy *strategy) |
| Functions for adding, removing, and finding strategies. | |
| virtual void | removeStrategy (std::string name) |
| virtual DtLinkStrategy * | findStrategy (std::string name) |
| virtual void | addStrategyCreator (std::string name, StrategyCreator creator) |
| add a strategy creator to the strategy factory. | |
| virtual DtLinkStrategy * | createStrategy (std::string name) |
| this will create a strategy with the given name or NULL if the strategy does not exist | |
| virtual double | maxDrainInputTime () |
| get the maximum time to spend in drain input | |
Static Public Member Functions | |
| static DtManagedInterface & | instance () |
| static access class that will lazily create the one DtManagedInterface instance | |
| static bool | exists () |
| to check if the DtManagedInterface class is created | |
| static void | destroy () |
| destroys the DtManagedInterface class | |
Static Public Attributes | |
| static std::string | theDataPath |
Protected Types | |
| typedef std::map< std::string, void * > | ResourceMap |
| typedef ResourceMap::iterator | ResourceIter |
| typedef std::multimap < std::string, DtMessageDelegate * > | HandlerMap |
| typedef std::pair< std::string, DtMessageDelegate * > | HandlerPair |
| typedef std::map< std::string, DtLinkStrategy * > | StrategyMap |
| typedef std::pair< std::string, DtLinkStrategy * > | StrategyPair |
| typedef std::map< std::string, StrategyCreator > | StrategyCreatorMap |
Protected Member Functions | |
| virtual void | handlePrintMessage (DtMessage *msg) |
| Handle print messages at arrive from C#. | |
| virtual void | handleNotifyLevelMessage (DtMessage *msg) |
| Handle notify level changes. | |
| virtual void | loadLibraries () |
| load any DLLs that are in the plugins directory | |
Static Protected Attributes | |
| static DtManagedInterface * | theInstance |
Private Member Functions | |
| DtManagedInterface () | |
| private constructor since this is a singleton | |
| virtual | ~DtManagedInterface () |
| private destructor since this is a singleton | |
The DtManagedInterface Class is a singleton that is used to manage the message flow between C# and the rest of the system.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
private constructor since this is a singleton
|
privatevirtual |
private destructor since this is a singleton
|
virtual |
Functions for adding or removing message handlers.
|
virtual |
Functions for adding, removing, and finding strategies.
|
virtual |
add a strategy creator to the strategy factory.
This will replace an existing creator with the given one if used with the name of an existing strategy
|
virtual |
this will create a strategy with the given name or NULL if the strategy does not exist
|
static |
destroys the DtManagedInterface class
|
static |
to check if the DtManagedInterface class is created
|
virtual |
This will return a handle to a named resource or the Null handle if it does not exist.
|
virtual |
|
protectedvirtual |
Handle notify level changes.
|
protectedvirtual |
Handle print messages at arrive from C#.
|
virtual |
Resource handling functions.
Resources are anything that can be saved and shared between different strategies this is used for managing VR-Link objects in an abstract way This will look up a resource by name and return if it exists or not
| void DtManagedInterface::initializeManagedInterface | ( | ManagedMessageDelegate | del | ) |
initializes the DtManagedInterface class with a delegate from the C# application
|
static |
static access class that will lazily create the one DtManagedInterface instance
|
protectedvirtual |
load any DLLs that are in the plugins directory
|
inlinevirtual |
get the maximum time to spend in drain input
|
virtual |
retuns the message factory
| void DtManagedInterface::receiveMessage | ( | unsigned char * | msg, |
| int | length | ||
| ) |
called when C# sends a message to ManagedInterface for processing
|
virtual |
|
virtual |
This will remove a resource with the given name.
|
virtual |
| void DtManagedInterface::sendMessage | ( | DtMessage * | msg | ) |
called to send C# a message generated from DtManagedInterface
|
virtual |
This will set given object as a resource with the given name. If the resource already exists, this will replace it.
| void DtManagedInterface::shutdown | ( | ) |
Shutdown any simulation connections.
| void DtManagedInterface::tick | ( | double | maxTime | ) |
ticks the DtManagedInterface class, and all child strategies as well as any of their resources
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
staticprotected |