VR-Forces 4.3.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
examples
radarWarnRx
simpleRadarWarnRx.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2003 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: simpleRadarWarnRx.h,v $ $Revision: 1.9 $ $State: Exp $
7
*******************************************************************************/
8
9
#ifndef DtSimpleRadarWarningReceiver_H_
10
#define DtSimpleRadarWarningReceiver_H_
11
12
#include "
vrfobjcore/simComponent.h
"
13
#include <vl/globalObjectDesignator.h>
14
15
//class DtSimpleRadarWarningReceiver:
16
//
17
//Instances of DtSimpleRadarWarningReceiver are an example of a simple radar
18
//warning reciever. For the purposes of example this receiver determines
19
//that it has detected a remote radar if a given remote emitter system
20
//is located within a given distance from the entity configured with the
21
//reciever. The list of radar emitters sensed this tick is generated as
22
//output.
23
24
class
DtReflectedEmitterSystemList
;
25
class
DtEntityListOutputPort
;
26
class
DtRadarWarningReceiverDescriptor
;
27
28
class
DtSimpleRadarWarningReceiver
:
public
DtSimComponent
29
{
30
public
:
31
//constructor
32
DtSimpleRadarWarningReceiver
(
const
DtString
&
name
,
DtVrfObject
* owner,
33
DtSimManager
*
simManager
,
DtComponentDescriptor
* desc = NULL,
34
DtReaderWriterRegistry
* parentRegistry = 0);
35
36
//destructor
37
virtual
~DtSimpleRadarWarningReceiver
();
38
39
//Calls createRelfectedEmitterList() and createEmitterListPort().
40
virtual
bool
init
();
41
42
//Called by init(). Creates the VR-Link list of all reflected emitter
43
//objects in the simulation.
44
virtual
bool
createReflectedEmitterList
();
45
46
//This returns a string that uniquely identifies this type of component.
47
//(must be unique with respect to the component types defined in compTypes.h
48
//as well as any additional user-defined components). Returns the string
49
//"simple-radar-warning-receiver".
50
virtual
DtString
type
();
51
52
//This is the entity we're detecting for. We override because we
53
//want to grab and cache the global object designator.
54
virtual
void
setEntity
(
DtVrfObject
*
entity
);
55
56
//Detects emitters and places them on our port.
57
virtual
void
tick
();
58
59
//Returns the list of emitters we've detected.
60
virtual
DtEntityListOutputPort
*
emitterListPort
()
const
;
61
62
//Returns a newly created instance of this class. We need to provide
63
//this function so that we can register this class with the component
64
//factory.
65
static
DtSimComponent
*
creator
(
const
DtString
& name,
DtVrfObject
* owner,
66
DtSimManager
* simManager,
DtComponentDescriptor
* desc,
67
DtReaderWriterRegistry
* parentRegistry);
68
69
protected
:
70
71
//Overridden to create myEmitterListPort
72
virtual
bool
createPorts
();
73
74
protected
:
75
//Default constructor; should not be called. Here because the compiler
76
//will generate an unprotected one otherwise.
77
DtSimpleRadarWarningReceiver
();
78
79
//copy constructor, not implemented
80
DtSimpleRadarWarningReceiver
(
const
DtSimpleRadarWarningReceiver
& orig);
81
82
//assignment operator, not implemented
83
DtSimpleRadarWarningReceiver
&
operator=
(
84
const
DtSimpleRadarWarningReceiver
& orig);
85
86
protected
:
87
88
//List of all remote emitter systems.
89
DtReflectedEmitterSystemList
*
myReflectedEmitterList
;
90
91
//Port used to communicate the list of detected emitter systems to
92
//other components.
93
DtEntityListOutputPort
*
myEmitterListPort
;
94
95
//The id of the entity this receiver is mounted on.
96
DtGlobalObjectDesignator
myGlobalId
;
97
98
//Pointer to the descriptor that holds the initialization parameters for this component.
99
//This pointer is const because all instances of this component share a single
100
//descriptor instance, so they should not be writing data back to it.
101
const
DtRadarWarningReceiverDescriptor
*
myDescriptor
;
102
};
103
104
#endif
105
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)