OpenDDS  Snapshot(2023/04/28-20:55)
ShmemInst.h
Go to the documentation of this file.
1 /*
2  * Distributed under the OpenDDS License.
3  * See: http://www.opendds.org/license.html
4  */
5 
6 #ifndef OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMINST_H
7 #define OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMINST_H
8 
9 #include "Shmem_Export.h"
10 #include "ShmemTransport.h"
11 
13 #include <dds/DCPS/TimeDuration.h>
14 
16 
17 namespace OpenDDS {
18 namespace DCPS {
19 
21 public:
23 
24  virtual int load(ACE_Configuration_Heap& cf,
26 
27  virtual OPENDDS_STRING dump_to_str() const;
28 
29  /// Size (in bytes) of the single shared-memory pool allocated by this
30  /// transport instance. Defaults to 16 megabytes.
31  size_t pool_size_;
32 
33  /// Size (in bytes) of the control area allocated for each data link.
34  /// This allocation comes out of the shared-memory pool defined by pool_size_.
35  /// Defaults to 4 kilobytes.
37 
38  bool is_reliable() const { return true; }
39 
40  virtual size_t populate_locator(OpenDDS::DCPS::TransportLocator& trans_info, ConnectionInfoFlags flags) const;
41 
42  const std::string& hostname() const { return hostname_; }
43  const std::string& poolname() const { return poolname_; }
44 
46  {
47  return association_resend_period_;
48  }
49 
50 private:
51  friend class ShmemType;
52  template <typename T, typename U>
53  friend RcHandle<T> OpenDDS::DCPS::make_rch(U const&);
54  explicit ShmemInst(const std::string& name);
55 
56  TransportImpl_rch new_impl();
57  std::string hostname_;
58  std::string poolname_;
60 };
61 
62 } // namespace DCPS
63 } // namespace OpenDDS
64 
66 
67 #endif /* OPENDDS_SHMEMINST_H */
const std::string & hostname() const
Definition: ShmemInst.h:42
const std::string & poolname() const
Definition: ShmemInst.h:43
static int load
Base class to hold configuration settings for TransportImpls.
Definition: TransportInst.h:64
std::string poolname_
Definition: ShmemInst.h:58
RcHandle< T > make_rch()
Definition: RcHandle_T.h:256
std::string hostname_
Definition: ShmemInst.h:57
#define OPENDDS_STRING
bool is_reliable() const
Does the transport as configured support RELIABLE_RELIABILITY_QOS?
Definition: ShmemInst.h:38
const char *const name
Definition: debug.cpp:60
static const TimeDuration default_association_resend_period
Definition: ShmemInst.h:22
TimeDuration association_resend_period() const
Definition: ShmemInst.h:45
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
#define OpenDDS_Shmem_Export
Definition: Shmem_Export.h:25
TimeDuration association_resend_period_
Definition: ShmemInst.h:59
size_t ConnectionInfoFlags