MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
assistantCommandMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: assistantCommandMsg.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef assistantCommandMsg_H_
13 #define assistantCommandMsg_H_
14 
17 
18 #include "assistantMsg.h"
19 #include "netAssistantCommandMsg.h"
20 
24 
25 typedef void (*DtAssistantCommandMsgCb)(const DtAssistantCommandMsg& inter, void* usr);
26 
27 
28 
33 {
34 
35 public:
36 
38  {
39  DtDoNotCommand = 0,
41  DtForceCommand
42  };
43 
45  DtAssistantCommandMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
46 
49  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
50 
51  DtAssistantCommandMsg(DtU8 commandType,
52  const MAKRti::DtString& messageString="",
53  const DtU8 assistantId=0,
54  const DtU16 fedexHandle=0,
55  const DtU16 fedHandle=0,
56  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER );
57 
59  virtual ~DtAssistantCommandMsg();
60 
62  virtual DtAssistantMsg* clone(bool copy = true) const;
63 
65  virtual void setIsAssistantToAssistant(bool yesNo);
66  virtual bool isAssistantToAssistant() const;
67 
69  virtual void setCommandType(DtU8 yesNo);
70  virtual DtU8 commandType() const;
71 
73  virtual void printData() const;
74 
76  virtual int setMinSize( const MAKRti::DtString& text );
77 
79  virtual void setMessageString( const MAKRti::DtString& msgString );
80  virtual MAKRti::DtString messageString() const;
81 
84  virtual void setTargetAssistantComponentId( const DtU8 assistantId );
85  virtual DtU8 targetAssistantComponentId() const;
86 
89  virtual void setTargetFederationHandle( const DtU16 fedexHandle );
90  virtual DtU16 targetFederationHandle() const;
91 
94  virtual void setTargetFederateHandle( const DtU16 fedHandle );
95  virtual DtU16 targetFederateHandle() const;
96 
97 
98 
99 public:
100 
102  static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial,
103  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
104 
106  static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
107 
109  static void addCallback(DtRtiAssistantServer* conn,
110  DtAssistantCommandMsgCb cb, void* usr);
111  static void removeCallback(DtRtiAssistantServer* conn,
112  DtAssistantCommandMsgCb cb, void* usr);
113  static void addCallback(DtAssistantMsgQueue* queue,
114  DtAssistantCommandMsgCb cb, void* usr);
115  static void removeCallback(DtAssistantMsgQueue* queue,
116  DtAssistantCommandMsgCb cb, void* usr);
117 
118 protected:
119 
121  virtual DtNetAssistantCommandMsg* netAssistantCommandMsg();
122  virtual const DtNetAssistantCommandMsg* netAssistantCommandMsg() const;
123 
126 
128  virtual int minSize() const;
129 
130 
132  virtual void setMessageStringSize( unsigned long size );
133  virtual unsigned long messageStringSize() const;
134 
136  virtual const char* messageStringPtr() const;
137  virtual char* messageStringPtr();
138 
139 };
140 
141 #endif

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)