MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
metadataFederateHostInformation.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2008 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: metadataFederateHostInformation.h,v $ $Revision: 1.4 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef DtRtiMtdFederateHostInformation_H_
10 #define DtRtiMtdFederateHostInformation_H_
11 
16 
17 #include "metadata.h"
18 #include "RIDparams.h"
19 
20 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E) || defined(DtIFSPEC1516_2025)
21 #include <RTI/Handle.h>
22 #else
23 #ifdef DtIFSPEC13DLC
24 #include "RTI13.h"
25 #else
26 #include "RTI.hh"
27 #endif
28 #endif
29 #include <cassert>
30 
34 {
35 
36 public:
37 
39  {
41  MAKRti::DtString federateName;
43  //TODO: populate this with other federate host info
44 
45  unsigned int size() const
46  {
47  unsigned int actualSizeOfString = federateName.size() + 1;
48  // increment by the size of the asyncIO type.
49  unsigned int sizeToUse = sizeof(DtNetU32);
50  // increment by the value of the size of the string
51  sizeToUse += sizeof(DtNetU32);
52  // increment by the size of the string
53  sizeToUse += actualSizeOfString;
54  // We need 32 bit alignment.
55  unsigned int differenceFrom32Bit = actualSizeOfString % 4;
56  if ( differenceFrom32Bit != 0 )
57  {
58  sizeToUse += (4 - differenceFrom32Bit);
59  }
60  //Increment the sizeToUse by the size of the float
61  sizeToUse += sizeof(DtNetFloat32);
62 
63  assert(sizeToUse % 4 == 0);
64  return sizeToUse;
65  }
66  };
67 
69  DtRtiMtdFederateHostInformation( caddr_t msg );
71 
74 
75 private:
76 
79 
82 
83 public:
84 
88  virtual bool get( DtFederateHostInformation& federateHostInformation ) const;
89 
93  virtual bool set( const DtFederateHostInformation& federateHostInformation );
94 
95 
96 protected:
97 
98  const unsigned int myPayloadAlignment;
99 
100 };
101 
102 #endif
MAKRti::DtString federateName
Definition: metadataFederateHostInformation.h:41
DtAsynchronousIOModeEnum
0 == no Async IO 1 == Asynchronous IO, (same as old parameter RTI_asynchronousIO ) 2 == Asynchronous ...
Definition: RIDparams.h:111
DtRtiMetadata is added to some RTI messages depending on the configuration of the RTI...
Definition: metadata.h:123
This file contains the designator or handle classes used by the interface.
This file contains the declaration of the DtRtiMetadata class which provides a framework for subclass...
unsigned int size() const
Definition: metadataFederateHostInformation.h:45
Definition: metadataFederateHostInformation.h:38
DtRtiMetadata & operator=(const DtRtiMetadata &)
Assignment Operator Not Implemented – Assignment Not Allowed!
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
float averageTickTime
Definition: metadataFederateHostInformation.h:42
DtRtiMtdFederateHostInformation is a metadata type used in RTI Network testing It is used to identify...
Definition: metadataFederateHostInformation.h:33
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
DtRIDParameters::DtAsynchronousIOModeEnum asyncMode
Definition: metadataFederateHostInformation.h:40
const unsigned int myPayloadAlignment
Definition: metadataFederateHostInformation.h:98

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)