MAK RTIspy API Documentation for HLA Evolved
 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
The DtAssistantCommandMsg defines a wrapper for the messages sent to and from the Assistant to delive...
Definition: assistantCommandMsg.h:32
Definition: netAssistantMsgHdr.h:26
DtAssistantMsgKind
Definition: assistantMsg.h:52
Base class for assistant Messages.
Definition: assistantMsg.h:152
void(* DtAssistantCommandMsgCb)(const DtAssistantCommandMsg &inter, void *usr)
Definition: assistantCommandMsg.h:25
virtual DtAssistantMsgKind internalMsgKind()=0
#define DT_DLL_ASSISTANT
_WIN32
Definition: rtiMsConfig.h:121
Manages the server connections of the RTI Assistant.
Definition: rtiAssistantServer.h:45
virtual DtAssistantMsg * clone(bool copy=true) const =0
Return a copy/empty object of the same type as this.
virtual void printData() const
Definition: assistantCommandMsg.h:40
Maintains a queue of RTI Assistant messages.
Definition: assistantMsgQueue.h:27
DtCommandEnum
Definition: assistantCommandMsg.h:37
Definition: netAssistantCommandMsg.h:19

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)