VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
setEncumbranceRequest.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 VT MAK, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
9 
10 #pragma once
11 
13 #include <vlpi/netStructs.h>
14 #include "vrfutil/rwReal.h"
16 
17 namespace vrfAddSetEncumbranceExample
18 {
19  //class DtSetEncumbranceRequest:
20  //
21  //Instances of DtSetEncumbrance send a payload mass value to DtManualRotaryWingEncumberedFlightActuator.
22 
23  //DtSetEncumbranceString must be a unique string representing the set
24  //(existing string types are defined in msgTypes.h).
25  const DtSetMessageType DtSetEncumbranceType("set-encumbrance");
26 
27  //DtSetEncumbranceMenuItemIdName must be a unique string identifying the
28  //DtSetEncumbranceMenuItem object, which inherits from DtVrfTaskSetMenuItem
29  const char DtSetEncumbranceMenuItemIdName[] = "DtSetEncumbranceMenuItem";
30 
32  {
33 
34  public:
35 
36  //default constructor
38 
39  //constructor;
40  //If you have a request 'put' itself, the writeName will preface it.
41  DtSetEncumbranceRequest(const DtString & writeName,
42  DtReaderWriterRegistry * parentRegistry = 0);
43 
44  //copy constructor
46  orig, DtReaderWriterRegistry * parentRegistry = 0);
47 
48  //assignment operator
50 
51  virtual ~DtSetEncumbranceRequest();
52 
53  //Returns DtSetEncumbranceRequestType.
54  virtual const DtSetMessageType& type() const;
55 
56  //Creates a copy of the request.
57  virtual DtSetDataRequest * clone(const DtString & name,
58  DtReaderWriterRegistry * parentRegistry = 0) const;
59 
60  //Get a readable string representation of this setDataRequest.
61  virtual DtString stringRep() const;
62 
65  virtual DtReal encumbrance() const;
66  virtual void setEncumbrance(DtReal kgs);
68 
69  //Returns the size of the full network representation
70  //padded to an 8-byte boundary.
71  virtual int netRepSize() const;
72 
73  //Fills in the task from the network buffer.
74  virtual bool setFromNet(const char* contentBuffer,
75  unsigned contentSize);
76 
77  //Fills in the network buffer (created by base class setDataRequest) with
78  //the set data request contents.
79  virtual bool setToNet();
80 
81  static DtSetDataRequest * creator();
82 
83  protected:
84 
86  };
87 }
88 
89 

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)