MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fedproMessage.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2025 MAK Technologies
3 ** All rights reserved.
4 *********************************************************************/
5 #pragma once
6 
9 
10 #include <rtiutil/rtiMsConfig.h>
11 
12 #include "fedproNetDatatypes.h"
13 
14 #define FEDPRO_VERSION 1
15 
16 namespace FedProSess
17 {
19  {
20  public:
21 
23  {
24  UNKNOWN = 0,
25 
26  // Session Management
27  CTRL_NEW_SESSION = 1,
28  CTRL_NEW_SESSION_STATUS = 2,
29  CTRL_HEARTBEAT = 3,
30  CTRL_HEARTBEAT_RESPONSE = 4,
31  CTRL_TERMINATE_SESSION = 5,
32  CTRL_SESSION_TERMINATED = 6,
33 
34  // Reconnection
35  CTRL_RESUME_REQUEST = 10,
36  CTRL_RESUME_STATUS = 11,
37 
38  // HLA Calls and Callbacks
39  HLA_CALL_REQUEST = 20,
40  HLA_CALL_RESPONSE = 21,
41  HLA_CALLBACK_REQUEST = 22,
42  HLA_CALLBACK_RESPONSE = 23,
43 
44  INVALID = 99
45  };
46 
47  public:
48 
49  DtFedproMessage(MessageType messageType, unsigned long messageSize);
50  ~DtFedproMessage();
51 
52  DtFedProU32 size() const;
53  DtFedproMessage* setSize(DtFedProU32 val);
54  DtFedProU32 sequenceNumber() const;
55  DtFedproMessage* setSequenceNumber(DtFedProU32 val);
56  DtFedProU64 sessionId() const;
57  DtFedproMessage* setSessionId(DtFedProU64 val);
58  DtFedProU32 lastReceivedMessage() const;
59  DtFedproMessage* setLastReceivedMessage(DtFedProU32 val);
60  // No setter - type must be known when constructed
61  MessageType type() const;
62  const char* messageTypeString() const;
63 
64  void printHeader() const;
65  void print() const;
66 
67  public:
68 
69  static DtFedProU32 size(char* buffer);
70  static MessageType type(char* buffer);
71  static const char* messageTypeString(char* buffer);
72  static const char* messageTypeString(MessageType typeValue);
73  static void printData(const DtFedproMessage* message);
74 
75  // Release memory allocated for in place message
76  static void destroy(DtFedproMessage* message);
77 
78  // The federate protocol "string" data is UTF8 in some cases converted from UTF16
79  // These functions convert between the two formats
80  static std::string wstringToString(const std::wstring& wstr);
81  static std::wstring stringToWstring(const std::string& str);
82 
83  protected:
84 
85  DtFedproMessage* setType(MessageType val) { myType = val; return this; }
86 
87  protected:
88 
94  };
95 }
MAKRti::DtNetU64 DtFedProU64
Definition: fedproNetDatatypes.h:16
DtFedProU32 mySequenceNumber
Definition: fedproMessage.h:90
MAKRti::DtNetU32 DtFedProU32
Definition: fedproNetDatatypes.h:15
#define DT_DLL_FEDPRO
Definition: rtiMsConfig.h:156
DtFedProU32 myType
Definition: fedproMessage.h:93
DtFedProU64 mySessionId
Definition: fedproMessage.h:91
DtFedProU32 myLastReceivedMessage
Definition: fedproMessage.h:92
DtFedproMessage * setType(MessageType val)
Definition: fedproMessage.h:85
MessageType
Definition: fedproMessage.h:22
DtFedProU32 mySize
Definition: fedproMessage.h:89
Definition: fedproMessage.h:18

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)