VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
aggregatePublisherDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 #pragma once
6 
7 
8 
9 #if DtDIS
10 
11 
13 #include "objectPublisherDIS.h"
14 #include "aggregateStateEncoder.h"
15 #include "aggregateStateDecoder.h"
16 #include "relativeLocationPdu.h"
17 
19 
24 {
25 public:
26 
29  typedef DtAggregateStateRepository* (*DtStateRepCreator)();
30 
33  DtAggregateStateRepository *stateRepToUse,
34  DtExerciseConn* conn,
35  const DtObjectId& id = DtObjectId::nullId());
36 
39  DtExerciseConn* conn,
40  const DtObjectId& id = DtObjectId::nullId());
41 
45  const DtEntityType& type,
46  DtExerciseConn* conn,
47  const DtObjectId& id = DtObjectId::defaultId());
48 
52  const DtEntityType& type,
53  DtExerciseConn* conn,
54  DtDeadReckonTypes algorithm,
55  DtForceType forceId,
56  const DtObjectId& id = DtObjectId::defaultId());
57 
59  virtual ~DtAggregatePublisher();
60 
62  virtual void tick();
63 
65  virtual void forceUpdate();
66 
68  virtual DtAggregateStateRepository* aggregateStateRep();
69 
71  virtual DtAggregateStateRepository* asr();
72 
74  virtual const DtObjectId& id() const;
75 
77  virtual const DtObjectId& localId() const;
78 
80  virtual const DtGlobalObjectDesignator& globalId() const;
81 
83  DtTime entityTypeHeartbeat(int type, int domain);
84 
85 public:
86 
88  static void setStateRepCreator(DtStateRepCreator creator);
89  static DtStateRepCreator setStateRepCreator(void);
90 
91  static void setClassDfltTimeThreshold(DtTime threshold);
92  static void setStationaryDfltTimeThreshold(DtTime threshold);
93  static void setEntityTypeDfltTimeThreshold(int type, int domain, DtTime threshold);
94 
95 protected:
96 
98  void init(const DtEntityIdentifier& vehId);
99 
102 
105 
106 protected:
107 
108  DtObjectId myId;
109  DtAggregateStateDecoder* myAggregateDecoder;
110  DtAggregateStateEncoder* myAggregateEncoder;
111  DtRelativeLocationPdu myLastSentRelLocPdu;
112  DtTime myLastSentRelLocPduTime;
113 
114 protected:
115  static DtStateRepCreator theStateRepCreator;
116  static DtTime theClassDfltTimeThreshold;
117  static bool theClassDfltIsSetFlag;
118  static DtTime theStationaryDfltTimeThreshold;
119  static bool theStationaryDfltIsSetFlag;
120  static std::map<std::pair<int,int>,DtTime> theEntityTypeHeartbeat;
121 };
122 
123 
125 {
126  return static_cast<DtAggregateStateRepository*>(myStateRep);
127 }
128 
129 inline const DtObjectId& DtAggregatePublisher::localId() const
130 {
131  return id();
132 }
133 
134 
135 #endif
136 

Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (www.mak.com)