VR-Forces 4.1.1 Class Documentation
vrfObjectMessage.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrfmsgs/simMsg.h"
15 #include <vlutil/vlNetTypes.h>
16 #include "vrfmsgs/vrfmsgsDefines.h"
17 #include <vlutil/vlSmartPointers.h>
18 
21 const char DtVrfObjectMessageSendToAll[] = "DtBroadcast";
24 const char DtVrfObjectMessageFrontEndAddress[] = "DtVrfFrontEnd";
25 
30 {
31 
32 public:
33 
36 
39 
41  const DtVrfObjectMessage& operator=(const DtVrfObjectMessage & orig);
42 
44  virtual ~DtVrfObjectMessage();
45 
47  virtual int messageType() const;
48 
51  virtual int contentCategoryType() const = 0;
52 
54  virtual int radioMessageType() const;
55 
60  //virtual DtString contentType() const = 0;
61 
69 
70  virtual void setReceiver(const DtString& receiver);
71  virtual const DtString& receiver() const;
73 
76 
77  virtual void setReceiverIsEchelonId(bool yesNo);
78  virtual bool receiverIsEchelonId() const;
80 
86 
87  virtual void setTransmitter(const DtString& transmitter);
88  virtual const DtString& transmitter() const;
90 
93 
94  virtual void setTransmitterIsEchelonId(bool yesNo);
95  virtual bool transmitterIsEchelonId() const;
97 
99  virtual void setRecipient(const DtString& recipient);
101  virtual const DtString& recipient() const;
102 
104  virtual void setSender(const DtString & sender);
106  virtual const DtString& sender()const;
107 
110  virtual char* netRep();
111 
114  virtual int netRepSize() const;
115 
117  virtual bool setFromNet(const char* networkBuffer,
118  unsigned contentSize);
119 
120 
122  virtual bool setToNet();
123 
125  virtual void printDataToString(DtString& str);
126 
128  static DtVrfObjectMessage* createVrfObjectMessage(int type);
130  static DtVrfObjectMessage* createRadioMessage(int type);
131 
133  static void addVrfObjectMessageCreatorFcn(int type,
136  static void addRadioMessageCreatorFcn(int type,
138 
139  static void setFactory(DtVrfObjectMessageFactory* factory);
140 
141  static DtVrfObjectMessageFactory* factory();
142 
143 protected:
144  virtual char* createNetworkBuffer();
145 
146 protected:
151  char* myNetRep;
152 
154 
155 };
156 
157 namespace DtBufferSerialize
158 {
161  DT_DLL_vrfmsgs int getSize(const DtVrfObjectMessage* const& messagePtr);
162 
167  DT_DLL_vrfmsgs char *encode(const DtVrfObjectMessage* const& messagePtr, char *buffer);
168 
177  DT_DLL_vrfmsgs const char *decode(DtVrfObjectMessage*& messagePtr, const char *buffer);
178 }
179 
181 typedef DtBoost::shared_ptr<const DtVrfObjectMessage> DtVrfObjectMessageConstPtr;
183 typedef DtBoost::shared_ptr<DtVrfObjectMessage> DtVrfObjectMessagePtr;

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)