VR-Exchange 2.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sFireTrans.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2015 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pFireInter.h>
13 #include <vl/fireInteraction.h>
14 
15 class DtExerciseConn;
16 
17 namespace MAKVrExchange
18 {
19  class DtPortalConnection;
20 }
21 
22 // A simple class which is responsible for translating Fire PDUs into
23 // portal messages and back.
24 //
25 // This is meant as an example. None of the PDUs are translated in any
26 // meaningful way. Rather this example is meant to show how to send Interactions
27 // through the data exchange. Though VR-Link is required to link, only the utility
28 // librarys (vlutil, mtl, and matrix) are required. The protocol dependent
29 // libraries (vl5, vlHLA13 and vlHLA1516) are not required by the data exchange.
30 // The protocol libraries are useful for this example for the DIS connection.
32 {
33 
34 public:
35 
36  // Default CTOR, takes a reference to the disConn and the PortalConnection
37  DtFireTranslator( DtExerciseConn& disConn, MAKVrExchange::DtPortalConnection& portalConn );
38 
39  // Default DTOR
40  virtual ~DtFireTranslator();
41 
42 protected:
43 
44  // Creates and sends a DIS Interaction when an interaction is received
45  // from the Data Exchange.
47 
48  // Creates and sends a Data Exchange Interaction when an interaction is
49  // received from DIS
50  virtual void createPortalInteraction( const DtFireInteraction& incomming );
51 
52 protected:
53 
54  // Callback Methods, call through methods.
55  static void receiveDisInteraction( DtFireInteraction* fire, void* usr );
56  static void receivePortalInteraction(
57  const MAKVrExchange::DtPortalFireInteraction& fire, void* usr );
58 
59 private:
60 
61  DtExerciseConn& myDisConn;
63 
64 };
DtExerciseConn & myDisConn
Definition: sFireTrans.h:61
Contains the DtPortalFireInteraction class declaration.
virtual void createPortalInteraction(const DtFireInteraction &incomming)
Represents a weapon fire event.
Definition: pFireInter.h:28
MAKVrExchange::DtPortalConnection & myPortalConn
Definition: sFireTrans.h:62
virtual ~DtFireTranslator()
Definition: sFireTrans.h:31
static void receivePortalInteraction(const MAKVrExchange::DtPortalFireInteraction &fire, void *usr)
virtual void createInteraction(const MAKVrExchange::DtPortalFireInteraction &in)
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtFireTranslator(DtExerciseConn &disConn, MAKVrExchange::DtPortalConnection &portalConn)
static void receiveDisInteraction(DtFireInteraction *fire, void *usr)

Document ID: Generated on Tue Aug 16 16:15:26 EDT 2022 from SVN revision 245901
Copyright © 2005-2022 MAK Technologies. All Rights Reserved (www.mak.com)