10 #include <tbb/spin_mutex.h>
13 #include <matrix/vlVector.h>
19 struct DtEmitterSystemBeamStateData;
20 class DtEmitterSystemStateComponent;
39 , myJammingModeSequence(0)
41 , myFrequencyRange(0.)
45 , myElevationCenter(0.)
46 , myElevationSweep(0.)
50 , myBeamParameterIndex(0)
52 , myHighDensity(false)
60 : myEmitterNumber(orig.myEmitterNumber)
61 , myBeamId(orig.myBeamId)
62 , myBeamType(orig.myBeamType)
63 , myJammingModeSequence(orig.myJammingModeSequence)
64 , myFrequency(orig.myFrequency)
65 , myFrequencyRange(orig.myFrequencyRange)
67 , myAzimuthCenter(orig.myAzimuthCenter)
68 , myAzimuthSweep(orig.myAzimuthSweep)
69 , myElevationCenter(orig.myElevationCenter)
70 , myElevationSweep(orig.myElevationSweep)
72 , myPulseWidth(orig.myPulseWidth)
73 , mySweepSync(orig.mySweepSync)
74 , myBeamParameterIndex(orig.myBeamParameterIndex)
75 , myBeamFunction(orig.myBeamFunction)
76 , myHighDensity(orig.myHighDensity)
77 , myTrackJamTargets(orig.myTrackJamTargets)
78 , myPrfJitter(orig.myPrfJitter)
79 , myBeamWidth(orig.myBeamWidth)
80 , myScanData(orig.myScanData)
119 && (myERP == rhs.
myERP)
124 && (myPRF == rhs.
myPRF)
160 void addTrackJamTarget(const
DtUUID& s) { myTrackJamTargets.insert(s); };
168 unsigned short myBeamId;
219 std::vector<DtEmitterSystemBeamStateData>::iterator iter = beams.begin();
220 std::vector<DtEmitterSystemBeamStateData>::iterator end = beams.end();
223 if (iter->beamId() == beamId)
236 std::vector<DtEmitterSystemBeamStateData>::const_iterator iter = beams.begin();
237 std::vector<DtEmitterSystemBeamStateData>::const_iterator end = beams.end();
240 if (iter->beamId() == beamId)
253 std::vector<DtEmitterSystemBeamStateData>::iterator iter = beams.begin();
254 std::vector<DtEmitterSystemBeamStateData>::iterator end = beams.end();
257 if (iter->beamId() == beamIndex)
269 return (beamsTrackingObject(type, gid).
size() != 0);
274 std::vector<DtEmitterSystemBeamStateData>::const_iterator iter = beams.begin();
275 std::vector<DtEmitterSystemBeamStateData>::const_iterator end = beams.end();
276 std::vector<const DtEmitterSystemBeamStateData*> lst;
278 while (iter != beams.end())
280 if ((iter->beamType() == type) && iter->hasTrackJamTarget(gid))
282 lst.push_back(&(*iter));
293 unsigned short id = nextBeamId();
298 beams.push_back(data);
300 return &beams[beams.size() - 1];
310 return (*
this)[beamId];
315 return (*
this)[beamId];
320 if (index < beams.size())
322 return &beams[index];
330 if (index < beams.size())
332 return &beams[index];
344 std::vector<DtEmitterSystemBeamStateData>
beams;
351 , myEmitterFunction(0)
352 , myEmitterNumber(0xFFFFFFFF)
358 , mySystemName(orig.mySystemName)
359 , myEmitterFunction(orig.myEmitterFunction)
360 , myMountLocation(orig.myMountLocation)
361 , myBeamsList(orig.myBeamsList)
362 , myEmitterNumber(orig.myEmitterNumber)
363 , myGlobalId(orig.myGlobalId)
382 return myBeamsList.beamByBeamId(beamId);
387 return myBeamsList.beamByBeamId(beamId);
392 return myBeamsList.beamByBeamIndex(beamId);
397 return myBeamsList.beamByBeamIndex(beamId);
400 unsigned int numBeams()
const {
return myBeamsList.size(); };
404 const std::vector<DtEmitterSystemBeamStateData>&
rawBeams()
const {
return myBeamsList.beams; };
405 std::vector<DtEmitterSystemBeamStateData>&
rawBeams() {
return myBeamsList.beams; };
419 return myBeamsList.beamsTrackingObject(type, gid);
443 void removeBeam(
unsigned short beamId) { myBeamsList.removeBeam(beamId); };
455 unsigned int myEmitterNumber;
456 unsigned int mySystemName;
457 unsigned int myEmitterFunction;
458 DtVector myMountLocation;
472 : DtFrameStateInterface(storage)
486 virtual
unsigned int emitterNumber()
const {
throw DtUnimplementedMethod(
"The const emitterNumber() const method is unimplemented"); };
514 const std::vector<DtEmitterSystemBeamStateData>& beams()
const;
515 std::vector<DtEmitterSystemBeamStateData>& beams();
517 const DtUUID hostId()
const;
522 const unsigned int& systemName()
const;
523 void setSystemName(
const unsigned int&);
525 unsigned int emitterNumber()
const;
526 void setEmitterNumber(
const unsigned int&);
528 const unsigned int& emitterFunction()
const;
529 void setEmitterFunction(
const unsigned int&);
531 const bool& on()
const;
532 void setOn(
const bool&);
534 const DtVector& mountLocation()
const;
535 void setMountLocation(
const DtVector&);
537 const unsigned int numBeams()
const;
545 void removeAllBeams();
546 void removeBeam(
unsigned short beamId);
550 const std::vector<const DtEmitterSystemBeamStateData*> beamsTrackingObject(
const DtUUID& gid)
const;
551 const std::vector<const DtEmitterSystemBeamStateData*> beamsJammingObject(
const DtUUID& gid)
const;
553 bool tracking(
const DtUUID& gid)
const;
554 bool jamming(
const DtUUID& gid)
const;
563 virtual void makeReadOnly() {};
566 unsigned short myNextBeamId;
580 const std::vector<DtEmitterSystemBeamStateData>& beams()
const;
581 const DtUUID hostId()
const;
583 const unsigned int& systemName()
const;
584 unsigned int emitterNumber()
const;
585 const unsigned int& emitterFunction()
const;
586 const bool& on()
const;
587 const DtVector& mountLocation()
const;
588 const unsigned int numBeams()
const;
591 bool tracking(
const DtUUID& gid)
const;
592 bool jamming(
const DtUUID& gid)
const;
594 const std::vector<const DtEmitterSystemBeamStateData*> beamsTrackingObject(
const DtUUID& gid)
const;
595 const std::vector<const DtEmitterSystemBeamStateData*> beamsJammingObject(
const DtUUID& gid)
const;
622 virtual bool forceAdvance();
626 if (myNextFrameState.isWritable())
628 myCurrentFrameState.advanceFrame(myNextFrameState.frameState());
631 myCurrentFrameState.emitComponentUpdated();
636 myCurrentFrameState.updateStateData(sd);
637 myNextFrameState.updateStateData(sd);
643 myCurrentFrameState.aboutToBeDeleted();
644 myNextFrameState.aboutToBeDeleted();
void updateDataStorage()
Implement to update data storage. Called from advanceFrame.
Definition: emitterSystemStateComponent.h:624
std::vector< DtEmitterSystemBeamStateData > beams
Definition: emitterSystemStateComponent.h:344
UUID is a unique ID wrapper class.
Definition: uuid.h:59
unsigned int mySystemName
Definition: emitterSystemStateComponent.h:456
const std::vector< DtEmitterSystemBeamStateData > & rawBeams() const
Definition: emitterSystemStateComponent.h:404
DtVrfMakRadarBeamScanData myScanData
Definition: emitterSystemStateComponent.h:187
std::set< DtUUID > myTrackJamTargets
Definition: emitterSystemStateComponent.h:188
DtStateData * myStateData
Definition: emitterSystemStateComponent.h:605
void removeAllBeams()
Definition: emitterSystemStateComponent.h:338
virtual const DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId) const
Definition: emitterSystemStateComponent.h:489
bool(* DtVerifyTrackJamTargetCallback)(const DtUUID &target, const DtEmitterSystemBeamStateData &beam, void *usr)
Definition: emitterSystemStateComponent.h:22
Definition: stateDataTypes.h:23
DtEmitterSystemBeamStateData * addBeam()
Definition: emitterSystemStateComponent.h:401
std::vector< const DtEmitterSystemBeamStateData * > beamsJammingObject(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:427
3) Define the current frame class. This will be used for read access.
Definition: emitterSystemStateComponent.h:572
DtEmitterSystemBeamStateData * operator[](unsigned short beamId)
Definition: emitterSystemStateComponent.h:217
unsigned short myBeamId
Definition: emitterSystemStateComponent.h:165
#define UNDEFINED_METHOD(Type, Method,...)
Definition: doubleBufferedDataStorage.h:68
bool operator!=(const DtEmitterSystemBeamStateData &rhs) const
Definition: emitterSystemStateComponent.h:137
std::vector< const DtEmitterSystemBeamStateData * > beamsTrackingObject(DtEmitterSystemBeamStateData::BeamType type, const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:272
Definition: emitterSystemStateComponent.h:193
DtString myGlobalId
Definition: emitterSystemStateComponent.h:443
double myAzimuthSweep
Definition: emitterSystemStateComponent.h:176
Definition: emitterSystemStateComponent.h:31
virtual void makeWritable()
Override to make component writable.
Definition: emitterSystemStateComponent.h:560
virtual const DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short beamIndex) const
Definition: emitterSystemStateComponent.h:488
std::vector< const DtEmitterSystemBeamStateData * > beamsTrackingObject(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:422
double myFrequency
Definition: emitterSystemStateComponent.h:172
double myPRF
Definition: emitterSystemStateComponent.h:179
bool myOn
This ID will uniquely identify the emitter. Patterned after the DIS/HLA global id.
Definition: emitterSystemStateComponent.h:454
Definition: stateComponent.h:266
const DtEmitterSystemBeamStateData * operator[](unsigned short beamId) const
Definition: emitterSystemStateComponent.h:234
DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId)
Definition: emitterSystemStateComponent.h:308
void removeBeam(unsigned short beamId)
Definition: emitterSystemStateComponent.h:443
voidpf void uLong size
Definition: ioapi.h:39
virtual void aboutToBeDeleted() override
Definition: emitterSystemStateComponent.h:640
unsigned int myEmitterNumber
Definition: emitterSystemStateComponent.h:455
DtEmitterSystemStateComponentData myData
Definition: emitterSystemStateComponent.h:568
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
#define UNDEFINED_RETURNVALUE_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:31
virtual const DtFrameStateInterface * nextFrameState() const
Definition: emitterSystemStateComponent.h:619
unsigned short nextId
Definition: emitterSystemStateComponent.h:345
virtual void removeTrackJamTarget(const DtUUID &globalId, DtEmitterSystemBeamStateData::BeamType)
Definition: emitterSystemStateComponent.h:498
virtual const std::vector< const DtEmitterSystemBeamStateData * > beamsTrackingObject(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:494
Contains the DtUUID class declaration.
bool myHighDensity
Definition: emitterSystemStateComponent.h:184
DtEmitterSystemBeams myBeamsList
Definition: emitterSystemStateComponent.h:459
DtEmitterSystemBeamStateData(const DtEmitterSystemBeamStateData &orig)
Definition: emitterSystemStateComponent.h:59
void removeAllBeams()
Definition: emitterSystemStateComponent.h:442
DtEmitterSystemBeamStateData & operator=(const DtEmitterSystemBeamStateData &rhs)
Definition: emitterSystemStateComponent.h:84
virtual void addTrackJamTarget(const DtUUID &globalId, DtEmitterSystemBeamStateData::BeamType, DtVerifyTrackJamTargetCallback=0, void *userData=0)
Definition: emitterSystemStateComponent.h:496
Definition: emitterSystemStateComponent.h:191
bool tracking(DtEmitterSystemBeamStateData::BeamType type, const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:267
int myBeamType
Definition: emitterSystemStateComponent.h:170
DtEmitterSystemStateComponentData & operator=(const DtEmitterSystemStateComponentData &rhs)
Definition: emitterSystemStateComponent.h:367
virtual DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId)
Definition: emitterSystemStateComponent.h:491
std::vector< const DtEmitterSystemBeamStateData * > beamsTrackingObject(DtEmitterSystemBeamStateData::BeamType type, const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:417
DtEmitterSystemBeamStateData()
Definition: emitterSystemStateComponent.h:35
const DtEmitterSystemStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: emitterSystemStateComponent.h:511
DtStateData * myStateData
Definition: emitterSystemStateComponent.h:567
DtEmitterSystemBeams & operator=(const DtEmitterSystemBeams &rhs)
Definition: emitterSystemStateComponent.h:205
unsigned int myBeamFunction
Definition: emitterSystemStateComponent.h:183
DtVector myMountLocation
Definition: emitterSystemStateComponent.h:458
DtEmitterSystemStateComponentData myData
Definition: emitterSystemStateComponent.h:606
void advanceFrame(const DtEmitterSystemStateComponentData &data)
Definition: emitterSystemStateComponent.h:599
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: emitterSystemStateComponent.h:611
DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short index)
Definition: emitterSystemStateComponent.h:318
#define UNDEFINED_CONST_METHOD(Type, Method,...)
Definition: doubleBufferedDataStorage.h:65
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
unsigned int myJammingModeSequence
Definition: emitterSystemStateComponent.h:171
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
virtual const std::vector< const DtEmitterSystemBeamStateData * > beamsJammingObject(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:495
bool jamming(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:432
bool operator==(const DtEmitterSystemBeamStateData &rhs) const
Definition: emitterSystemStateComponent.h:111
double myElevationSweep
Definition: emitterSystemStateComponent.h:178
double myPulseWidth
Definition: emitterSystemStateComponent.h:180
DtEmitterSystemBeams(const DtEmitterSystemBeams &orig)
Definition: emitterSystemStateComponent.h:200
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:379
double mySweepSync
Definition: emitterSystemStateComponent.h:181
void setTrackJamTargets(const std::set< DtUUID > &t)
Definition: emitterSystemStateComponent.h:165
int size() const
Definition: emitterSystemStateComponent.h:212
bool isDoubleBuffered()
Definition: emitterSystemStateComponent.h:616
DtEmitterSystemStateComponentNextFrame myNextFrameState
Definition: emitterSystemStateComponent.h:649
DtEmitterSystemStateComponentData(const DtEmitterSystemStateComponentData &orig)
Definition: emitterSystemStateComponent.h:356
const DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short beamId) const
Definition: emitterSystemStateComponent.h:395
BeamType
Definition: emitterSystemStateComponent.h:27
const DtEmitterSystemStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: emitterSystemStateComponent.h:578
DtEmitterSystemStateComponentData & frameState()
Definition: emitterSystemStateComponent.h:512
const DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short index) const
Definition: emitterSystemStateComponent.h:328
virtual void aboutToBeDeleted()
virtual DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short beamIndex)
Definition: emitterSystemStateComponent.h:490
const DtEmitterSystemBeams & beams() const
Definition: emitterSystemStateComponent.h:403
unsigned int myEmitterNumber
Definition: emitterSystemStateComponent.h:169
bool jamming(const DtUUID &gid)
Definition: emitterSystemStateComponent.h:437
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: emitterSystemStateComponent.h:466
std::vector< DtEmitterSystemBeamStateData > & rawBeams()
Definition: emitterSystemStateComponent.h:405
DtEmitterSystemBeams & beams()
Definition: emitterSystemStateComponent.h:402
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
bool tracking(const DtUUID &gid)
Definition: emitterSystemStateComponent.h:412
DtEmitterSystemBeamStateData * addBeam()
Definition: emitterSystemStateComponent.h:291
bool myPrfJitter
Definition: emitterSystemStateComponent.h:185
double myERP
Definition: emitterSystemStateComponent.h:174
const DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId) const
Definition: emitterSystemStateComponent.h:385
DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId)
Definition: emitterSystemStateComponent.h:380
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
static const char * SystemName
Definition: vrfXmlTypes.h:48
2) Define the next frame class. This will be used for write access.
Definition: emitterSystemStateComponent.h:505
bool hasTrackJamTarget(const DtUUID &s) const
Definition: emitterSystemStateComponent.h:163
const DtEmitterSystemBeamStateData * beamByBeamId(unsigned short beamId) const
Definition: emitterSystemStateComponent.h:313
unsigned short nextBeamId() const
Definition: emitterSystemStateComponent.h:303
virtual void setEmitterNumber(const unsigned int &)
Definition: emitterSystemStateComponent.h:487
DtEmitterSystemStateComponentCurrentFrame myCurrentFrameState
Definition: emitterSystemStateComponent.h:648
double myAzimuthCenter
Definition: emitterSystemStateComponent.h:175
unsigned int myEmitterFunction
Definition: emitterSystemStateComponent.h:457
void removeTrackJamTarget(const DtUUID &s)
Definition: emitterSystemStateComponent.h:161
unsigned int numBeams() const
Definition: emitterSystemStateComponent.h:400
DtStateComponentCreator< DtEmitterSystemStateComponentImplementation > DtEmitterSystemStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: emitterSystemStateComponent.h:654
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
unsigned int myBeamParameterIndex
Definition: emitterSystemStateComponent.h:182
Definition: stateComponent.h:82
double myBeamWidth
Definition: emitterSystemStateComponent.h:186
double myFrequencyRange
Definition: emitterSystemStateComponent.h:173
virtual DtFrameStateInterface * nextFrameState()
Definition: emitterSystemStateComponent.h:618
const DtFrameStateInterface * currentFrameState() const
Definition: emitterSystemStateComponent.h:617
Contains the DtStateComponent class declaration.
DtEmitterSystemBeamStateData * beamByBeamIndex(unsigned short beamId)
Definition: emitterSystemStateComponent.h:390
void removeBeam(unsigned int beamIndex)
Definition: emitterSystemStateComponent.h:251
void clearTrackJamTargets()
Definition: emitterSystemStateComponent.h:164
The DtEmitterSystemStateComponentList is a collection of emitter systems and the beams they represent...
Definition: emitterSystemStateComponent.h:25
Definition: emitterSystemStateComponent.h:32
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
bool tracking(const DtUUID &gid) const
Definition: emitterSystemStateComponent.h:407
const std::set< DtUUID > & trackJamTargets() const
Definition: emitterSystemStateComponent.h:162
Definition: vrfMakRadarBeamScanData.h:31
DtEmitterSystemStateComponentData()
Definition: emitterSystemStateComponent.h:348
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: emitterSystemStateComponent.h:634
DtEmitterSystemBeams()
Definition: emitterSystemStateComponent.h:196
double myElevationCenter
Definition: emitterSystemStateComponent.h:177