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 void setMessageString( const MAKRti::DtString& msgString, bool adjustBufferSize = true );
77  virtual MAKRti::DtString messageString() const;
78 
81  virtual void setTargetAssistantComponentId( const DtU8 assistantId );
82  virtual DtU8 targetAssistantComponentId() const;
83 
86  virtual void setTargetFederationHandle( const DtU16 fedexHandle );
87  virtual DtU16 targetFederationHandle() const;
88 
91  virtual void setTargetFederateHandle( const DtU16 fedHandle );
92  virtual DtU16 targetFederateHandle() const;
93 
94 
95 
96 public:
97 
99  static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial,
100  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
101 
103  static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
104 
106  static void addCallback(DtRtiAssistantServer* conn,
107  DtAssistantCommandMsgCb cb, void* usr);
108  static void removeCallback(DtRtiAssistantServer* conn,
109  DtAssistantCommandMsgCb cb, void* usr);
110  static void addCallback(DtAssistantMsgQueue* queue,
111  DtAssistantCommandMsgCb cb, void* usr);
112  static void removeCallback(DtAssistantMsgQueue* queue,
113  DtAssistantCommandMsgCb cb, void* usr);
114 
115 protected:
116 
118  virtual DtNetAssistantCommandMsg* netAssistantCommandMsg();
119  virtual const DtNetAssistantCommandMsg* netAssistantCommandMsg() const;
120 
123 
125  virtual int minSize() const;
126 
128  virtual int minSize(const MAKRti::DtString& text);
129 
131  virtual void setMessageStringSize( unsigned long size );
132  virtual unsigned long messageStringSize() const;
133 
135  virtual const char* messageStringPtr() const;
136  virtual char* messageStringPtr();
137 
138 };
139 
140 #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:53
Base class for assistant Messages.
Definition: assistantMsg.h:153
void(* DtAssistantCommandMsgCb)(const DtAssistantCommandMsg &inter, void *usr)
Definition: assistantCommandMsg.h:25
virtual DtAssistantMsgKind internalMsgKind()=0
#define DT_DLL_ASSISTANT
Default – Unix or Win32 static.
Definition: rtiMsConfig.h:150
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 Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)