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