VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfTDLMessage.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 
12 
13 #include "vrfmsgs/vrfmsgsDefines.h"
14 #include <vl/hostStructs.h>
15 
23 
27 {
29  : myHeaderVersion(0)
30  , myMessageVersion(0)
31  , myMessageType(0)
34  , myTimeStamp(0)
35  , myFixedSize(0)
36  , myVariableSize(0)
37  {
38  }
39 
40  DtNetU32 myHeaderVersion;
41  DtNetU32 myMessageVersion;
42  DtNetU32 myMessageType;
43  DtNetU32 myFixedSize;
44  DtNetU32 myVariableSize;
46  DtNetU32 mySenderUUIDLength;
47  DtNetU64 myTimeStamp;
48 };
49 
51 
53 {
54 public:
55 
58 
60  DtVrfTDLMessage(const DtVrfTDLMessage & orig);
61 
63  const DtVrfTDLMessage & operator=(DtVrfTDLMessage & orig);
64 
66  virtual ~DtVrfTDLMessage();
67 
69  virtual int tdlMessageType() const;
70 
71  virtual DtVrfTDLMessage * clone() const;
72  static DtVrfTDLMessage* creator();
73 
74  virtual int messageVersion() const;
75  virtual int headerVersion() const;
76 
78  virtual int getContentType(const char* buffer);
79 
81  virtual void printDataToString(DtString& str);
82 
84  static void setFactory(DtVrfTDLMessageFactory*);
85  static DtVrfTDLMessageFactory* factory();
86 
88  virtual void setRecipient(const DtSimulationAddress & recipient);
89  virtual const DtSimulationAddress & recipient() const;
90 
92  virtual void setSender(const DtSimulationAddress & recipient);
93  virtual const DtSimulationAddress & sender() const;
94 
96  virtual int netRepSize() const;
97 
100  virtual const char* netRep();
101 
105  virtual void setToNet(char* buffer);
106 
108  virtual bool setFromNet(const char* buffer, int bufferSize);
109 
113  virtual int fixedSize() const;
114 
116  virtual int variableSize() const;
117 
119  virtual void setMarkingText(const DtString&);
120  virtual const DtString& markingText() const;
121 
123  virtual void setUUID(const DtString&);
124  virtual const DtString& uuid() const;
125 
127  virtual void setTimeStamp(unsigned int);
128  virtual unsigned int timeStamp() const;
129 
130 protected:
132  virtual char* createNetworkBuffer();
133 
135  virtual void setFixedToNet(char* buffer);
136 
139  virtual int setFixedFromNet(const char* buffer);
140 
143  virtual const char* setVariableFromNet(const char* buffer, const char* fixedBuffer, int messageVersion);
144 
146  virtual char* setVariableToNet(char* buffer);
147 
148 protected:
150 
151  DtSimulationAddress myRecipient;
152  DtSimulationAddress mySender;
153 
154  char* myNetRep;
156 
159  unsigned int myTimeStamp;
160 };
int myLastAllocatedSize
Definition: vrfTDLMessage.h:155
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
DtNetU32 myVariableSize
The fixed size of the message.
Definition: vrfTDLMessage.h:44
DtString myUUID
Definition: vrfTDLMessage.h:158
DtSimulationAddress mySender
Definition: vrfTDLMessage.h:152
DtNetU64 myTimeStamp
The length of the VRF UUID to follow this structure.
Definition: vrfTDLMessage.h:47
DtNetU32 mySenderMarkingTextLength
The variable size of the message.
Definition: vrfTDLMessage.h:45
DtNetU32 myMessageVersion
The version number of this header.
Definition: vrfTDLMessage.h:41
DtString myMarkingText
Definition: vrfTDLMessage.h:157
DtSimulationAddress myRecipient
Definition: vrfTDLMessage.h:151
Contains the DtVrfTDLMessage class declaration.
Definition: vrfTDLMessage.h:26
DtNetU32 myMessageType
The version of this message.
Definition: vrfTDLMessage.h:42
DtVrfTDLMessageHeader()
Definition: vrfTDLMessage.h:28
Definition: vrfTDLMessage.h:52
unsigned int myTimeStamp
Definition: vrfTDLMessage.h:159
DtNetU32 myFixedSize
The VRF TDL message type.
Definition: vrfTDLMessage.h:43
char * myNetRep
Definition: vrfTDLMessage.h:154
DtVrfTDLMessageFactory is a map of creators by type for VRF TDL Messages.
Definition: vrfTDLMessageFactory.h:17
DtNetU32 mySenderUUIDLength
The length of the marking text that is to follow this structure (NOT null terminated) ...
Definition: vrfTDLMessage.h:46
static DtVrfTDLMessageFactory * theVrfTDLMessageFactory
Definition: vrfTDLMessage.h:149
DtNetU32 myHeaderVersion
Definition: vrfTDLMessage.h:40

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)