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 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 #pragma once
6 #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 bool 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 
113 
114 protected:
115  static DtStateRepCreator theStateRepCreator;
120  static std::map<std::pair<int,int>,DtTime> theEntityTypeHeartbeat;
121 };
122 
123 
125 {
126  return static_cast<DtAggregateStateRepository*>(myStateRep);
127 }
128 
130 {
131  return id();
132 }
133 
134 
135 #endif
136 
DtStateRepository * myStateRep
Definition: objectPublisherDIS.h:193
static const DtEntityIdentifier & nullId()
Returns a reference to an instance of 0:0:0.
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
static const DtEntityIdentifier & defaultId()
Returns a reference to an instance of -1:-1:-1.
DtAggregateStateDecoder * myAggregateDecoder
Definition: aggregatePublisherDIS.h:109
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherDIS.h:36
virtual void forceUpdate()=0
For publisher to send PDU on next tick.
Instances of DtAggregatePublisher are used to take care of the details associated with publishing the...
Definition: aggregatePublisherDIS.h:23
static DtTime theStationaryDfltTimeThreshold
Definition: aggregatePublisherDIS.h:118
virtual const DtObjectId & id() const =0
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
static DtStateRepCreator theStateRepCreator
Definition: aggregatePublisherDIS.h:115
Instances of DtRelativeLocationPdu are used to convey the fact that one unit is located at a position...
Definition: relativeLocationPdu.h:29
static bool theClassDfltIsSetFlag
Definition: aggregatePublisherDIS.h:117
virtual const DtObjectId & id() const
Get the entity&#39;s identifier.
DtTime myLastSentRelLocPduTime
Definition: aggregatePublisherDIS.h:112
virtual const DtObjectId & localId() const
Get the entity&#39;s localId - same as id for DIS.
Definition: aggregatePublisherDIS.h:129
Instances of DtAggregateStateEncoder are used to take state information from an aggregate state repos...
Definition: aggregateStateEncoder.h:24
virtual DtAggregateStateRepository * asr()
Get the aggregate state repository for this aggregate publisher.
Definition: aggregatePublisherDIS.h:124
static DtTime theClassDfltTimeThreshold
Definition: aggregatePublisherDIS.h:116
virtual const DtGlobalObjectDesignator & globalId() const =0
The entityIdentifier unique to this object.
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
DtRelativeLocationPdu myLastSentRelLocPdu
Definition: aggregatePublisherDIS.h:111
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
DtAggregateStateEncoder * myAggregateEncoder
Definition: aggregatePublisherDIS.h:110
Instances of DtAggregateStateDecoder are used to take state information from an aggregate state PDU a...
Definition: aggregateStateDecoder.h:34
static std::map< std::pair< int, int >, DtTime > theEntityTypeHeartbeat
Definition: aggregatePublisherDIS.h:120
This class declares the DIS version of DtObjectPublisher.
DtForceType
Section 4.
Definition: disEnums.h:199
This file declares the class DtAggregateStateEncoder.
This file declares the class DtAggregateStateDecoder – DIS only.
DtObjectId myId
Definition: aggregatePublisherDIS.h:108
This file provides a declaration of the class DtAggregateStateRepository.
DtDeadReckonTypes
Definition: disEnums.h:997
virtual bool tick()=0
Tick (update) this object.
static bool theStationaryDfltIsSetFlag
Definition: aggregatePublisherDIS.h:119
virtual const DtObjectId & localId() const =0
The localId is the same as the globalId, a DtEntityIdentifier unique to this object.
A protocol independent representation of an aggregate.
Definition: aggregateStateRepository.h:29
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)