VR-Link API Documentation for DIS
 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 
18 
23 {
26  typedef DtAggregateStateRepository* (*DtStateRepCreator)();
27 
28 public:
29 
32  DtAggregateStateRepository *stateRepToUse,
33  DtExerciseConn* conn,
34  const DtObjectId& id = DtObjectId::nullId());
35 
38  DtExerciseConn* conn,
39  const DtObjectId& id = DtObjectId::nullId());
40 
44  const DtEntityType& type,
45  DtExerciseConn* conn,
46  const DtObjectId& id = DtObjectId::defaultId());
47 
51  const DtEntityType& type,
52  DtExerciseConn* conn,
53  DtDeadReckonTypes algorithm,
54  DtForceType forceId,
55  const DtObjectId& id = DtObjectId::defaultId());
56 
58  virtual ~DtAggregatePublisher();
59 
61  virtual void tick();
62 
64  virtual void forceUpdate();
65 
67  virtual DtAggregateStateRepository* aggregateStateRep();
68 
70  virtual DtAggregateStateRepository* asr();
71 
73  virtual const DtObjectId& id() const;
74 
76  virtual const DtObjectId& localId() const;
77 
79  virtual const DtGlobalObjectDesignator& globalId() const;
80 
82  DtTime entityTypeHeartbeat(int type, int domain);
83 
84 public:
85 
87  static void setStateRepCreator(DtStateRepCreator creator);
88  static DtStateRepCreator setStateRepCreator(void);
89 
90  static void setClassDfltTimeThreshold(DtTime threshold);
91  static void setStationaryDfltTimeThreshold(DtTime threshold);
92  static void setEntityTypeDfltTimeThreshold(int type, int domain, DtTime threshold);
93 
94 protected:
95 
97  void init(const DtEntityIdentifier& vehId);
98 
101 
104 
105 protected:
106 
110 
111 protected:
112  static DtStateRepCreator theStateRepCreator;
117  static std::map<std::pair<int,int>,DtTime> theEntityTypeHeartbeat;
118 };
119 
120 
122 {
123  return static_cast<DtAggregateStateRepository*>(myStateRep);
124 }
125 
127 {
128  return id();
129 }
130 
131 
132 #endif
133 

Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)