VR-Forces 5.0.3 Developer's Guide
 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 <readerWriter/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 
DtRwReal myEncumbrance
Definition: setEncumbranceRequest.h:85
virtual const DtSetMessageType & type() const
What kind of setDataRequest am I? (from radioMsgTypes.h). Returns a string representing the kind of d...
const char DtSetEncumbranceMenuItemIdName[]
Definition: setEncumbranceRequest.h:29
const DtSetEncumbranceRequest & operator=(const DtSetEncumbranceRequest &orig)
virtual void setEncumbrance(DtReal kgs)
Encumbrance in kilograms.
virtual DtReal encumbrance() const
Encumbrance in kilograms.
Definition: readerWriterRegistry.h:39
DtSetDataRequest is an abstract base class from which real setDataRequests can derive. It manages the read/write capability; derived classes need only use and register read/writatble data types for derived information.
Definition: setDataRequest.h:41
virtual DtString stringRep() const
Get a readable string representation of this setDataRequest. Returns a human readable string represen...
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets the contents of this set request based on the network buffer. Base class does nothing and return...
Define constants for types of tasks, sets, admin messages, reports, and sim commands (all sent via ra...
const DtSetMessageType DtSetEncumbranceType("set-encumbrance")
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
Definition: setEncumbranceRequest.h:31
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
virtual DtSetDataRequest * clone(const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const
Make a copy of this request. Returns a pointer to a newly created copy of this data request...
virtual bool setToNet()
Sets netRep buffer to the contents of this set request. Base class does nothing and returns true...

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)