open-dis-cpp
RadioType.h
1 #pragma once
2 
3 #include <dis7/utils/DataStream.h>
4 #include <dis7/opendis7_export.h>
5 
6 
7 namespace DIS
8 {
9 // Identifies the type of radio. Section 6.2.70
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS7_EXPORT RadioType
16 {
17 protected:
19  unsigned char _entityKind;
20 
22  unsigned char _domain;
23 
25  unsigned short _country;
26 
28  unsigned char _category;
29 
31  unsigned char _subcategory;
32 
33  unsigned char _specific;
34 
35  unsigned char _extra;
36 
37 
38  public:
39  RadioType();
40  virtual ~RadioType();
41 
42  virtual void marshal(DataStream& dataStream) const;
43  virtual void unmarshal(DataStream& dataStream);
44 
45  unsigned char getEntityKind() const;
46  void setEntityKind(unsigned char pX);
47 
48  unsigned char getDomain() const;
49  void setDomain(unsigned char pX);
50 
51  unsigned short getCountry() const;
52  void setCountry(unsigned short pX);
53 
54  unsigned char getCategory() const;
55  void setCategory(unsigned char pX);
56 
57  unsigned char getSubcategory() const;
58  void setSubcategory(unsigned char pX);
59 
60  unsigned char getSpecific() const;
61  void setSpecific(unsigned char pX);
62 
63  unsigned char getExtra() const;
64  void setExtra(unsigned char pX);
65 
66 
67 virtual int getMarshalledSize() const;
68 
69  bool operator ==(const RadioType& rhs) const;
70 };
71 }
72 
73 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
74 // Redistribution and use in source and binary forms, with or without
75 // modification, are permitted provided that the following conditions
76 // are met:
77 //
78 // * Redistributions of source code must retain the above copyright
79 // notice, this list of conditions and the following disclaimer.
80 // * Redistributions in binary form must reproduce the above copyright
81 // notice, this list of conditions and the following disclaimer
82 // in the documentation and/or other materials provided with the
83 // distribution.
84 // * Neither the names of the Naval Postgraduate School (NPS)
85 // Modeling Virtual Environments and Simulation (MOVES) Institute
86 // (http://www.nps.edu and http://www.MovesInstitute.org)
87 // nor the names of its contributors may be used to endorse or
88 // promote products derived from this software without specific
89 // prior written permission.
90 //
91 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
92 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
93 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
94 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
95 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
96 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
97 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
98 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
99 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
100 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
101 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
102 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _entityKind
Kind of entity.
Definition: RadioType.h:19
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned char _category
category of entity
Definition: RadioType.h:28
Definition: RadioType.h:15
unsigned char _subcategory
specific info based on subcategory field
Definition: RadioType.h:31
unsigned char _domain
Domain of entity (air, surface, subsurface, space, etc)
Definition: RadioType.h:22
unsigned short _country
country to which the design of the entity is attributed
Definition: RadioType.h:25