VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
emitter.h
Go to the documentation of this file.
1 /*********************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************************/
5 
6 #pragma once
7 
8 #include "strategies/export.h"
12 #include "messages/beamDiscovery.h"
13 #include "messages/beamState.h"
14 #include "messages/beamRemoved.h"
16 #include "messages/emitterState.h"
18 
19 #include <string>
20 #include <map>
21 
22 #include <matrix/vlVector.h>
23 
24 class DtMessage;
25 class DtManagedInterface;
26 class DtReflected;
31 
32 #ifdef DtHLA
33 // Beams are only separate classes in HLA
36 #endif
37 
39 {
40 public:
41  virtual ~DtEmitterStateStrategy();
42 
43  std::string name();
44  static std::string theName();
45 
46  virtual bool init();
47  virtual void tick();
48  virtual void shutdown();
49 
50  static DtLinkStrategy* create(DtManagedInterface* gl);
51 
52 protected:
54 
55  std::string formEmitterId(const std::string& hostIdStr, unsigned char emitterIndex) const;
56 
57  void handleCSharpEmitterDiscovered(DtMessage* msg);
58  static void vrlEmitterDiscovered(DtReflectedEmitterSystem* emitter, void* usr);
59  void handleVrlEmitterDiscovered(DtReflectedEmitterSystem* emitter);
60 
61  void handleCSharpEmitterState(DtMessage* msg);
62  static void vrlEmitterState(DtReflectedEmitterSystem* emitter, void* usr);
63  void handleVrlEmitterState(DtReflectedEmitterSystem* emitter);
64 
65  void handleCSharpEmitterRemoved(DtMessage* msg);
66  static void vrlEmitterRemoved(DtReflectedEmitterSystem* emitter, void* usr);
67  void handleVrlEmitterRemoved(DtReflectedEmitterSystem* emitter);
68 
71 
72  void handleCSharpBeamDiscovered(DtMessage* msg);
73  void handleCSharpBeamState(DtMessage* msg);
74  void handleCSharpBeamRemoved(DtMessage* msg);
75 
76  void sendBeamDiscoveredMessage(DtEmitterBeamRepository* repo);
77  void sendBeamStateMessage(DtEmitterBeamRepository* repo, DtTime timeStamp);
78  void sendBeamRemovedMessage(DtEmitterBeamRepository* repo);
79 
80  // Beams are published by their emitter publishers.
81 
82  // Reflected beams are only separate objects in HLA.
83 #ifdef DtHLA
84  static void vrlBeamDiscovered(DtReflectedEmitterBeam* beam, void* usr);
85  void handleVrlBeamDiscovered(DtReflectedEmitterBeam* beam);
86 
87  static void vrlBeamState(DtReflectedEmitterBeam* beam, void* usr);
88  void handleVrlBeamState(DtReflectedEmitterBeam* beam);
89 
90  static void vrlBeamRemoved(DtReflectedEmitterBeam* beam, void* usr);
91  void handleVrlBeamRemoved(DtReflectedEmitterBeam* beam);
92 
94 #endif
95 
96  static std::string theStrategyName;
97 
101 
105 };
DtReflectedEmitterBeamList * myReflectedBeams
Definition: emitter.h:93
DtMessageDelegate * myEmitterStateHandler
Definition: emitter.h:99
DtMessageDelegate * myEmitterDiscoveredHandler
Definition: emitter.h:98
DtMessageDelegate * myBeamStateHandler
Definition: emitter.h:103
class DtReflectedEmitterBeam:
Definition: reflectedEmitterBeamHLA.h:32
#define MANAGEDINTERFACE_MODULE_DLL
Definition: export.h:34
Instances of DtReflectedEmitterBeamList manage the list of of remote EmitterBeams in the exercise...
Definition: reflectedEmitterBeamListHLA.h:20
This is the DtMessage class.
Definition: message.h:20
This file declares DtVector and DtVector32.
The DtManagedInterface Class is a singleton that is used to manage the message flow between C# and th...
Definition: managedInterface.h:49
Instances of DtReflectedEmitterSystemList manage the list of of remote EmitterSystems in the exercise...
Definition: reflectedEmitterSystemListHLA.h:21
class DtEmitterBeamRepository:
Definition: emitterBeamRepository.h:40
DtMessageDelegate * myBeamRemovedHandler
Definition: emitter.h:104
DtMessageDelegate * myEmitterRemovedHandler
Definition: emitter.h:100
static std::string theStrategyName
Definition: emitter.h:96
DtReflectedEmitterSystemList * myReflectedEmitters
Definition: emitter.h:69
Definition: emitter.h:38
DtPublisherList< DtEmitterSystemPublisher > * myEmitterPubs
Definition: emitter.h:70
Instances of DtEmitterSystemPublisher are used for local or source simulations of emitter systems...
Definition: emitterSystemPublisherHLA.h:22
Defines the DtManagedInterface Singleton object that manages the message flow between C# and the rest...
Defines a template for maintaining a list of VR-Link Publisher objects.
Delegate template for binding static or member functions for callback at later time The return type a...
Definition: delegate.h:69
DtMessageDelegate * myBeamDiscoveredHandler
Definition: emitter.h:102
Instances of DtReflectedEmitterSystem represent EmitterSystem objects simulated by remote application...
Definition: reflectedEmitterSystemHLA.h:28

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)