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

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)