MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
execCmds.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: execCmds.h,v $ $Revision: 1.2 $ $State: Exp $
7 *******************************************************************************/
10 
11 #ifndef DtRtiExecCmdFunctor_H_
12 #define DtRtiExecCmdFunctor_H_
13 
14 #include <rtiMsConfig.h>
15 #include <rtiMsg.h>
16 #include <vlutil/vlPrint.h>
17 #include <vlutil/vlInetAddr.h>
18 #include <memory>
19 #include <typeinfo>
20 
21 class DtRtiExec;
22 class DtRtiMsg;
23 
24 
29 {
30 public:
31 
33  virtual ~DtRtiExecCmd() {}
34  virtual DtRtiExecCmd* clone() const = 0;
35  virtual void operator()( const DtRtiExec& exec ) = 0;
36 
41  virtual bool operator==( const DtRtiExecCmd& value )
42  {
43  if ( typeid(*this) == typeid(value) )
44  {
45  return true;
46  }
47  else
48  {
49  return false;
50  }
52  }
53 };
54 
56 {
57 public:
58  DtDeleteFederateCmd( const DtString& fedexName, int fedHandle ) :
59  DtRtiExecCmd(), myFedexName( fedexName ), myFederateHandle( fedHandle ) {}
60 
61  virtual ~DtDeleteFederateCmd() {}
62  virtual void operator()( const DtRtiExec& exec );
63  virtual DtRtiExecCmd* clone() const
64  { return new DtDeleteFederateCmd( myFedexName, myFederateHandle ); }
65 
66  DtString myFedexName;
68 };
69 
71 {
72 public:
73  DtEnableDisableNetworkTestingCmd( const DtString& fedexName, bool enabled ) :
74  DtRtiExecCmd(), myFedexName( fedexName), myEnabled (enabled ) {}
75 
77  virtual void operator()( const DtRtiExec& exec );
78  virtual DtRtiExecCmd* clone() const
79  { return new DtEnableDisableNetworkTestingCmd( myFedexName, myEnabled ); }
80 
81  DtString myFedexName;
82  bool myEnabled;
83 };
84 
85 
87 {
88 public:
89  DtDestroyFederationCmd( const DtString& fedexName, int fedexHandle ) :
90  DtRtiExecCmd(), myFedexName( fedexName ), myFedexHandle( fedexHandle ) {}
91 
93  virtual void operator()( const DtRtiExec& exec );
94  virtual DtRtiExecCmd* clone() const
95  { return new DtDestroyFederationCmd( myFedexName, myFedexHandle ); }
96 
97  DtString myFedexName;
99 };
100 
102 {
103 public:
104  DtChangeRidParamCmd( const DtString& fedexName, int fedHandle ,
105  const DtString& ridParam, const DtString& ridValue) :
106  DtRtiExecCmd(), myFedexName( fedexName ), myFederateHandle( fedHandle ),
107  myRidParam(ridParam), myRidValue(ridValue) {}
108 
109  virtual ~DtChangeRidParamCmd() {};
110  virtual void operator()( const DtRtiExec& exec );
111  virtual DtRtiExecCmd* clone() const
112  { return new DtChangeRidParamCmd( myFedexName, myFederateHandle, myRidParam, myRidValue ); }
113 
114  DtString myFedexName;
116  DtString myRidParam;
117  DtString myRidValue;
118 };
119 
120 
121 
123 {
124 public:
125  DtSendMessageCmd( const DtString& fedexName, std::auto_ptr<DtRtiMsg> msg ) :
126  DtRtiExecCmd(), myFedexName( fedexName ), myMsg( msg ) {}
127 
128  virtual ~DtSendMessageCmd() {}
129  virtual void operator()( const DtRtiExec& exec );
130  virtual DtRtiExecCmd* clone() const
131  { return new DtSendMessageCmd( myFedexName, std::auto_ptr<DtRtiMsg>( myMsg->clone( true ))); }
132 
133  DtString myFedexName;
134  std::auto_ptr<DtRtiMsg> myMsg;
135 };
136 
137 
139 {
140 public:
141  DtChangeNotifyLevelCmd( DtNotifyLevelType level ) :
142  DtRtiExecCmd(), myLevel( level ) {}
143 
145  virtual void operator()( const DtRtiExec& exec );
146  virtual DtRtiExecCmd* clone() const
147  { return new DtChangeNotifyLevelCmd( myLevel ); }
148 
149  DtNotifyLevelType myLevel;
150 };
151 
153 {
154 public:
155  DtLatencyTestModeCmd( const DtString& fedexName, int fedHandle,
156  bool runTest, bool continuousType, bool shouldHaltContinuous,
157  bool observing, unsigned int interactionPeriod,
158  unsigned int numInteractions, unsigned int payloadBytes ) :
159  DtRtiExecCmd(), myFedexName( fedexName ),
160  myFederateHandle( fedHandle ), myRunTest( runTest ),
161  myContinuousType( continuousType ),
162  myShouldHaltContinuous( shouldHaltContinuous ),
163  myObserving( observing ),
164  myInteractionPeriod( interactionPeriod ),
165  myNumInteractions( numInteractions ),
166  myPayloadBytes( payloadBytes ) {}
167 
169  virtual void operator()( const DtRtiExec& exec );
170  virtual DtRtiExecCmd* clone() const
171  { return new DtLatencyTestModeCmd( myFedexName, myFederateHandle,
172  myRunTest, myContinuousType, myShouldHaltContinuous, myObserving,
173  myInteractionPeriod, myNumInteractions, myPayloadBytes ); }
174 
175  DtString myFedexName;
177  bool myRunTest;
181  unsigned int myInteractionPeriod;
182  unsigned int myNumInteractions;
183  unsigned int myPayloadBytes;
184 };
185 
186 
188 {
189 public:
191  virtual ~DtEnableLogCmd() {}
192  virtual void operator()( const DtRtiExec& exec );
193  virtual DtRtiExecCmd* clone() const
194  { return new DtEnableLogCmd; }
195 };
196 
197 
199 {
200 public:
202  virtual ~DtExitCmd() {}
203  virtual void operator()( const DtRtiExec& exec );
204  virtual DtRtiExecCmd* clone() const
205  { return new DtExitCmd; }
206 
207 };
208 
209 
210 
211 #endif

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)