open-dis-cpp
BurstDescriptor.h
1 #pragma once
2 
3 #include <dis6/EntityType.h>
4 #include <dis6/utils/DataStream.h>
5 #include <dis6/opendis6_export.h>
6 
7 
8 namespace DIS
9 {
10 // Section 5.2.7. Specifies the type of muntion fired, the type of warhead, the type of fuse, the number of rounds fired, and the rate at which the roudns are fired in rounds per minute.
11 
12 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
13 //
14 // @author DMcG, jkg
15 
16 class OPENDIS6_EXPORT BurstDescriptor
17 {
18 protected:
21 
23  unsigned short _warhead;
24 
26  unsigned short _fuse;
27 
29  unsigned short _quantity;
30 
32  unsigned short _rate;
33 
34 
35  public:
37  virtual ~BurstDescriptor();
38 
39  virtual void marshal(DataStream& dataStream) const;
40  virtual void unmarshal(DataStream& dataStream);
41 
42  EntityType& getMunition();
43  const EntityType& getMunition() const;
44  void setMunition(const EntityType &pX);
45 
46  unsigned short getWarhead() const;
47  void setWarhead(unsigned short pX);
48 
49  unsigned short getFuse() const;
50  void setFuse(unsigned short pX);
51 
52  unsigned short getQuantity() const;
53  void setQuantity(unsigned short pX);
54 
55  unsigned short getRate() const;
56  void setRate(unsigned short pX);
57 
58 
59 virtual int getMarshalledSize() const;
60 
61  bool operator ==(const BurstDescriptor& rhs) const;
62 };
63 }
64 
65 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
66 // Redistribution and use in source and binary forms, with or without
67 // modification, are permitted provided that the following conditions
68 // are met:
69 //
70 // * Redistributions of source code must retain the above copyright
71 // notice, this list of conditions and the following disclaimer.
72 // * Redistributions in binary form must reproduce the above copyright
73 // notice, this list of conditions and the following disclaimer
74 // in the documentation and/or other materials provided with the
75 // distribution.
76 // * Neither the names of the Naval Postgraduate School (NPS)
77 // Modeling Virtual Environments and Simulation (MOVES) Institute
78 // (http://www.nps.edu and http://www.MovesInstitute.org)
79 // nor the names of its contributors may be used to endorse or
80 // promote products derived from this software without specific
81 // prior written permission.
82 //
83 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
84 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
85 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
86 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
87 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
88 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
89 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
90 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
91 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
92 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
93 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
94 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _warhead
type of warhead
Definition: BurstDescriptor.h:23
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
EntityType _munition
What munition was used in the burst.
Definition: BurstDescriptor.h:20
unsigned short _quantity
how many of the munition were fired
Definition: BurstDescriptor.h:29
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: BurstDescriptor.h:16
unsigned short _fuse
type of fuse used
Definition: BurstDescriptor.h:26
unsigned short _rate
rate at which the munition was fired
Definition: BurstDescriptor.h:32
Definition: EntityType.h:15