MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
smSocket__rti__.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: smSocket__rti__.h,v $ $Revision: 1.13 $ $State: Exp $
7 *********************************************************************/
8 #ifndef smSocket_H_
9 #define smSocket_H_
10 
15 
16 #include <vlutil/vlUtil.h>
17 #include <vlutil/vlInetAddr.h>
18 #include <udpMsgSocket.h>
20 
21 #if DT_HAVE_STD_H
22 #include <std.h>
23 #endif
24 
25 #include <stdio.h>
26 #include <sys/types.h>
27 #include <vector>
28 
29 #ifdef DtUSE_UTILITIES_NAMESPACE
30 namespace DtUSE_UTILITIES_NAMESPACE
31 {
32 #endif
33 
42 
44 {
45  public:
46  DtSmSocket__rti__(const char * sharename, DtBoost::shared_ptr<DtMsgHeaderReader> hdrReader);
47 
48  virtual ~DtSmSocket__rti__();
49 
52  virtual bool initializeSmQueue(DtU32 id = DtSM_INVALID_SUBSCRIBER_ID,
53  bool forceSubscribe = false);
59  virtual bool initializeSmQueue(DtU32 numBuckets, DtU32 payloadSize,
60  DtU32 id = DtSM_INVALID_SUBSCRIBER_ID,
61  bool forceSubscribe = false);
62 
71  virtual int sendMessage(caddr_t msg, size_t msgSize, bool deleteAfterSend,
72  const DtInetAddr& notUsed = DtInetAddr::inaddrAny());
73 
76  virtual bool flush();
77 
80  virtual void openSocket(const DtInetEndpoint& dest,
81  DtU32 flags = DtDefaultSockOpts, DtU16 localPort = 0,
82  DtInetDevice* hostIf = NULL);
83  virtual void enableBundling(size_t maxBundleSize);
84  virtual void disableBundling();
85  virtual void enableCompression(DtU8 compressionLevel);
86  virtual void disableCompression();
87  virtual bool joinMulticastGroup( const DtInetAddr& grpAddr,
88  DtInetDevice* device = NULL );
89  virtual bool joinMulticastGroup( const DtInetEndpoint& grpEndpoint,
90  DtInetDevice* device = NULL );
91  virtual bool dropMulticastGroup( const DtInetAddr& grpAddr,
92  DtInetDevice* device = NULL );
93  virtual bool dropMulticastGroup( const DtInetEndpoint& grpEndpoint,
94  DtInetDevice* device = NULL );
95  virtual bool setMcastTtlOption( DtU32 ttl );
96  virtual void setRetryOnSend(unsigned int numRetries, double waitPeriod);
97 
98  virtual DtSmSubscribableMessageQueue__rti__ * msgQueue() const;
99  virtual bool isOpen() const;
100 
103  virtual int subscribe(DtU32 id = DtSM_INVALID_SUBSCRIBER_ID);
104  virtual void unsubscribe(DtU32 id);
105 
109  virtual bool shutdownQueue(bool ruthless = false);
110  virtual int subscriberCount() const;
111 
112  protected:
113 
115  virtual int recv(caddr_t *buffptr, DtInetEndpoint* ep);
116 
117  MAKRti::DtString mySharedMemName;
118  DtSmSubscribableMessageQueue__rti__ * mySmMsgQueue;
119 
120  protected:
123 
125  DtSmSocket__rti__ &operator=(const DtSmSocket__rti__ &);
126 
127 };
128 
129 #ifdef DtUSE_UTILITIES_NAMESPACE
130 }
131 #endif
132 
133 #endif
DtSmSocket provides access to shared memory via a subscribable message queue.
Definition: smSocket__rti__.h:43
#define DtSM_INVALID_SUBSCRIBER_ID
Definition: vlShmSubscribableMessageQueue__rti__.h:37
This file contains the declaration of the DtUdpMsgSocket base class.
MAKRti::DtString mySharedMemName
Definition: smSocket__rti__.h:117
DtSmSubscribableMessageQueue__rti__ * mySmMsgQueue
Definition: smSocket__rti__.h:118
#define NULL
Definition: baseTypes13.h:8
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
The DtUdpMsgSocket class provides an address family independent UDP socket that handles RTI messages...
Definition: udpMsgSocket.h:28

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)