VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
universalHlaIntr.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
6 #pragma once
7 
8 #ifdef DtHLA
9 
10 #include "strategies/export.h"
15 
16 #include <string>
17 #include <map>
18 
20 #include <vl/objectPublisherHLA.h>
21 #include <vl/reflectedObjectHLA.h>
22 
23 class DtMessage;
24 class DtManagedInterface;
25 class DtExerciseConn;
26 
27 class DtUnversalHlaPublisher;
28 
29 class MANAGEDINTERFACE_MODULE_DLL DtUniversalHlaIntrStrategy : public DtSubscribeStrategy
30 {
31 public:
32  virtual ~DtUniversalHlaIntrStrategy();
33 
34  std::string name();
35  static std::string theName();
36 
37  virtual bool init();
38  virtual void tick();
39  virtual void shutdown();
40 
41  static DtLinkStrategy* create(DtManagedInterface* gl, const std::string& className);
42 
43  static char * getBuffer(const std::vector<unsigned char>& buffer);
44  static const std::vector<unsigned char> getVector(const char * buffer, unsigned long size);
45 
46 #ifdef DtHLA_1516
47  static RTI::VariableLengthData getVLD(const std::vector<unsigned char>& buffer);
48  static const std::vector<unsigned char> getVector(const RTI::VariableLengthData& buffer);
49 #endif
50 
51 protected:
52  DtUniversalHlaIntrStrategy(DtManagedInterface* link, const std::string& className);
53  static std::string theStrategyName;
54 
55  void handleCSharpUniIntrMessage(DtMessage* msg);
56  static void vrlUniIntrCb(DtInteraction* intr, void* usr);
57  void handleVrlUniIntr(DtInteraction* intr);
58 
60  virtual void addVrlCallback(DtExerciseConn* exConn);
61  virtual void removeVrlCallback(DtExerciseConn* exConn);
62 
63  DtMessageDelegate* myHandler;
64  DtExerciseConn* myExconn;
65  std::string myClassName;
66 
67  RTI::InteractionClassHandle myClassHandle;
68  std::map<std::string, RTI::ParameterHandle> myHandleByName;
69  std::map<RTI::ParameterHandle, std::string> myNameByHandle;
70 };
71 
72 #endif
DtInteraction is an base class for representing DIS PDUs which don&#39;t have state.
Definition: interactionDIS.h:24
virtual void addVrlCallback(DtExerciseConn *exConn)=0
Add/Remove VR-Link C++ Interaction Callback.
Contains the HLA DtReflectedObjectList class declaration.
Defines a single parameter delegate to make binding member function pointers easier.
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define MANAGEDINTERFACE_MODULE_DLL
Definition: export.h:34
This is the DtMessage class.
Definition: message.h:20
The DtManagedInterface Class is a singleton that is used to manage the message flow between C# and th...
Definition: managedInterface.h:49
This is the DtSubscribeStrategy class. It is the abstract base class for all derived interaction subs...
Definition: subscribeStrategy.h:27
std::string myClassName
Definition: subscribeStrategy.h:48
virtual void shutdown()
Shutdown the strategy.
Defines a template for maintaining a list of VR-Link Publisher objects.
virtual void removeVrlCallback(DtExerciseConn *exConn)=0
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:69

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)