open-dis-cpp
RadioIdentifier.h
1 #pragma once
2 
3 #include <dis7/utils/DataStream.h>
4 #include <dis7/opendis7_export.h>
5 
6 
7 namespace DIS
8 {
9 // The unique designation of an attached or unattached radio in an event or exercise Section 6.2.69
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS7_EXPORT RadioIdentifier
16 {
17 protected:
19  unsigned short _siteNumber;
20 
22  unsigned short _applicationNumber;
23 
25  unsigned short _referenceNumber;
26 
28  unsigned short _radioNumber;
29 
30 
31  public:
33  virtual ~RadioIdentifier();
34 
35  virtual void marshal(DataStream& dataStream) const;
36  virtual void unmarshal(DataStream& dataStream);
37 
38  unsigned short getSiteNumber() const;
39  void setSiteNumber(unsigned short pX);
40 
41  unsigned short getApplicationNumber() const;
42  void setApplicationNumber(unsigned short pX);
43 
44  unsigned short getReferenceNumber() const;
45  void setReferenceNumber(unsigned short pX);
46 
47  unsigned short getRadioNumber() const;
48  void setRadioNumber(unsigned short pX);
49 
50 
51 virtual int getMarshalledSize() const;
52 
53  bool operator ==(const RadioIdentifier& rhs) const;
54 };
55 }
56 
57 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
58 // Redistribution and use in source and binary forms, with or without
59 // modification, are permitted provided that the following conditions
60 // are met:
61 //
62 // * Redistributions of source code must retain the above copyright
63 // notice, this list of conditions and the following disclaimer.
64 // * Redistributions in binary form must reproduce the above copyright
65 // notice, this list of conditions and the following disclaimer
66 // in the documentation and/or other materials provided with the
67 // distribution.
68 // * Neither the names of the Naval Postgraduate School (NPS)
69 // Modeling Virtual Environments and Simulation (MOVES) Institute
70 // (http://www.nps.edu and http://www.MovesInstitute.org)
71 // nor the names of its contributors may be used to endorse or
72 // promote products derived from this software without specific
73 // prior written permission.
74 //
75 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
76 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
77 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
78 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
79 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
80 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
81 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
82 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
83 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
84 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
85 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
86 // POSSIBILITY OF SUCH DAMAGE.
unsigned short _applicationNumber
application number
Definition: RadioIdentifier.h:22
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned short _radioNumber
Radio number.
Definition: RadioIdentifier.h:28
a class to support managing a network buffer.
Definition: DataStream.h:28
unsigned short _siteNumber
site
Definition: RadioIdentifier.h:19
Definition: RadioIdentifier.h:15
unsigned short _referenceNumber
reference number
Definition: RadioIdentifier.h:25