![]() |
VR-Link API Documentation for HLA Evolved
|
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 | initializeManagedInterface (JavaManagedMessageDelegate del, void *data, unsigned char *reusableSendMsgBuffer) |
| initializes the DtManagedInterface class with a delegate from the Java 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 |
| returns the message factory | |
| virtual bool | hasResource (const std::string &name) const |
| Resource handling functions. | |
| virtual void * | findResource (const 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 (const 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 (const std::string &name) |
| This will remove a resource with the given name. | |
| virtual void | addHandler (const std::string &messageType, DtMessageDelegate *handler) |
| Functions for adding or removing message handlers. | |
| virtual void | removeHandler (const std::string &messageType, DtMessageDelegate *handler) |
| virtual void | addStrategy (DtLinkStrategy *strategy) |
| Functions for adding, removing, and finding strategies. | |
| virtual void | removeStrategy (const std::string &name) |
| virtual DtLinkStrategy * | findStrategy (const std::string &name) |
| virtual void | addStrategyCreator (const std::string &name, StrategyCreator creator) |
| add a strategy creator to the strategy factory. | |
| virtual DtLinkStrategy * | createStrategy (const 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 | |
| virtual std::set< DtProtocolType > | availableProtocols () |
| get available protocols | |
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 bool | checkVrlLicense () |
| Checks the VR-Link License Availability. | |
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 | |
| virtual bool | checkLibrariesLoaded (const std::list< std::string > &files, std::set< DtProtocolType > &availableProtocol, bool shouldThrow=false) |
| check that the minimum strategy libraries were loaded | |
Protected Attributes | |
| ManagedMessageDelegate | myCSharpMessageDelegate |
| JavaManagedMessageDelegate | myJavaMessageDelegate |
| void * | myData |
| unsigned char * | myReusableSendBuffer |
| bool | myIsInitalized |
| std::set< DtProtocolType > | myInitializedProtocols |
| DtMessageFactory * | myMessageFactory |
| ResourceMap | myResources |
| HandlerMap | myMessageHandlers |
| StrategyMap | myLinkStrategies |
| StrategyCreatorMap | myStrategyCreatorMap |
| DtMessageDelegate * | myPrintHandler |
| DtMessageDelegate * | myNotifyLevelHandler |
| DtFilePrinter * | myFilePrinter |
| std::set< std::string > | myFilesLoaded |
| std::set< std::string > | myPluginsLoaded |
| double | myMaxDrainInputTime |
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 |
get available protocols
|
protectedvirtual |
check that the minimum strategy libraries were loaded
|
static |
Checks the VR-Link License Availability.
|
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
| void DtManagedInterface::initializeManagedInterface | ( | JavaManagedMessageDelegate | del, |
| void * | data, | ||
| unsigned char * | reusableSendMsgBuffer | ||
| ) |
initializes the DtManagedInterface class with a delegate from the Java 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 |
returns 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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
staticprotected |