VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pControlMessage.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pMessage.h>
13 
14 namespace MAKVrExchange
15 {
16 
17  class DtPortalConnection;
18 
23  {
24  public:
25 
26  typedef void (*MessageCbFcn)( const DtPortalMessage& message, void* usr );
27 
28  public:
29 
32 
35 
37  virtual ~DtPortalControlMessage();
38 
41 
43  DtDEC_ATTRIBUTE( DtString, BrokerName, brokerName );
44 
46  DtDEC_ATTRIBUTE( DtU32, BrokerId, brokerId );
47 
49  DtDEC_ATTRIBUTE( DtU32, BrokerType, brokerType );
50 
52 
54  public:
55 
56  virtual unsigned int netSize() const;
57  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
58  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
59 
60  virtual std::ostream& printDataToStream( std::ostream& str ) const;
61 
62  };
63 
64 
70  template <DtPortalMessageKind V_MessageKind>
72  {
73  public:
74 
75  typedef void (*DtPortalControlMessageCb)(
76  const DtPortalControlMessageTemplate<V_MessageKind>& msg, void* usr );
77 
78  public:
79 
81 
83 
84  static void addCallback( DtPortalConnection* pConn,
85  DtPortalControlMessageCb cb, void* usr );
86 
87  static void removeCallback( DtPortalConnection* pConn,
88  DtPortalControlMessageCb cb, void* usr );
89 
90  public:
91 
92 #ifdef _WIN32
93  static const DtPortalMessageKind theKind = V_MessageKind;
94 #else
96 #endif
97 
98  static DtPortalMessage* create();
99 
100  };
101 
102 
106  : public DtPortalControlMessageTemplate<DtObjectFilterKind>
107  {
108  public:
109 
111 
112  typedef void (*MessageCallbackType)(
113  const DtFilterObjectMessage& message, void* userData );
114 
115  public:
116 
118  static DtPortalMessage* create();
119 
122 
125 
127  virtual ~DtFilterObjectMessage();
128 
130  DtFilterObjectMessage& operator = ( const DtFilterObjectMessage& other );
131 
134 
135  bool operator == ( const DtFilterObjectMessage& other ) const;
136  bool operator != ( const DtFilterObjectMessage& other ) const;
137 
139 
140  static void addCallback( DtPortalConnection* connection,
141  MessageCallbackType callbackFunction, void* userData );
142  static void removeCallback( DtPortalConnection* connection,
143  MessageCallbackType callbackFunction, void* userData);
144 
145  virtual unsigned int netSize() const;
146  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
147  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
148 
149  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
150 
153 
156  DtDEC_ATTRIBUTE( DtString, ObjectId, objectId );
157 
161  DtDEC_ATTRIBUTE( DtEntityIdentifier, EntityId, entityId );
162 
166  DtDEC_ATTRIBUTE( DtEntityType, EntityType, entityType );
167 
169  DtDEC_ATTRIBUTE( DtU16, FilterType, filterType );
170 
172  DtDEC_ATTRIBUTE( DtString, MarkingText, markingText );
173 
175  DtDEC_ATTRIBUTE( bool, FilterFlag, filterFlag );
176 
178 
179  };
180 
181 
187 
192 
193 
198 
204 
209 
214 
219 
224 
229 
235 
239 
243 
244 }
245 
246 #define _pControlMessage_INL_
247 #include <portal/pControlMessage.inl>
248 #undef _pControlMessage_INL_
DtPortalControlMessageTemplate< DtRequestBrokerLaunchGuiMessageKind > DtBrokerLaunchGuiRequest
Requests by the portal (or anyone) to launch a GUI on the broker named by brokerName().
Definition: pControlMessage.h:228
DtPortalControlMessageTemplate< DtBrokerExitingMessageKind > DtBrokerExitingMessage
Sent by a broker when its shutting down, for any reason.
Definition: pControlMessage.h:203
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
DtPortalControlMessageTemplate< DtBrokerStartedMessageKind > DtBrokerStartedMessage
Sent by the the broker when the broker has started and is listening for control messages.
Definition: pControlMessage.h:208
#define DtDEC_ATTRIBUTE(T, N, n)
A Macro to define an attribute; as well as make an accessor and mutator for that attribute.
Definition: addAttribute.h:49
Contains the DtPortalMessage class declaration.
The base class for all messages passed through the portal.
Definition: pMessage.h:67
DtPortalControlMessageTemplate< DtHeartbeatResponseMessageKind > DtHeartbeatResponse
Not used, may be used in the future.
Definition: pControlMessage.h:242
PortalControlMessageTemplate is used to create new DtPortalControlMessage types.
Definition: pControlMessage.h:71
static const DtPortalMessageKind theKind
Definition: pControlMessage.h:95
static void removeCallback(DtPortalConnection *pConn, DtPortalControlMessageCb cb, void *usr)
void(* DtPortalControlMessageCb)(const DtPortalControlMessageTemplate< V_MessageKind > &msg, void *usr)
Definition: pControlMessage.h:75
DtPortalControlMessageTemplate< DtRequestBrokerStartMessageKind > DtBrokerStartRequest
Requests by the portal (or anyone) to launch a GUI on the broker named by brokerName().
Definition: pControlMessage.h:223
static void addCallback(DtPortalConnection *pConn, DtPortalControlMessageCb cb, void *usr)
DtFilterObjectMessage is used to indicate a specific object needs to be filtered. ...
Definition: pControlMessage.h:105
DtPortalControlMessageTemplate< DtBrokerRunningMessageKind > DtBrokerRunningMessage
Sent by the the broker when the broker is active (processing traffic).
Definition: pControlMessage.h:218
DtPortalControlMessageTemplate< DtBrokerShutdownRequestKind > DtPortalBrokerShutdownRequestMessage
Tells the broker specified in the brokerName() method to shutdown.
Definition: pControlMessage.h:186
DtPortalControlMessageTemplate< DtBrokerConnectingMessageKind > DtBrokerConnectingMessage
Sent by the the broker when the broker makes a portal connection.
Definition: pControlMessage.h:213
DtPortalControlMessageTemplate< DtHeartbeatRequestMessageKind > DtHeartbeatRequest
Not used, may be used in the future.
Definition: pControlMessage.h:238
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtPortalControlMessageTemplate< DtObjectFilterKind > BaseClassType
Definition: pControlMessage.h:110
DtPortalControlMessageTemplate< DtBrokerEnableOneToOneKind > DtPortalBrokerEnableOneToOneMessage
Tells the broker specified in the brokerName method to enable OneToOneMapping.
Definition: pControlMessage.h:191
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
DtPortalControlMessageTemplate< DtAbnormalBrokerExitKind > DtAbnormalBrokerExitMessage
Sent if an broker exits abnormally.
Definition: pControlMessage.h:234
DtPortalControlMessageTemplate< DtBrokerDisableOneToOneKind > DtPortalBrokerDisableOneToOneMessage
Tells the broker specified in the brokerName method to disable OneToOneMapping.
Definition: pControlMessage.h:197
Control messages signal state changes in VR-Exchange&#39;s operation.
Definition: pControlMessage.h:22

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)