PublicationInstance.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_PUBLICATION_INSTANCE_H
00009 #define OPENDDS_DCPS_PUBLICATION_INSTANCE_H
00010 
00011 #include "dcps_export.h"
00012 #include "InstanceDataSampleList.h"
00013 #include "DataSampleElement.h"
00014 #include "dds/DCPS/PoolAllocationBase.h"
00015 #include "ace/Synch_Traits.h"
00016 #include "dds/DCPS/RcObject.h"
00017 #include "dds/DCPS/unique_ptr.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00024 
00025 namespace OpenDDS {
00026 namespace DCPS {
00027 
00028 typedef ACE_UINT16 CoherencyGroup;
00029 
00030 /**
00031   * @class PublicationInstance
00032   *
00033   * @brief Struct that has information about an instance and the instance
00034   *        sample list.
00035   * @note  This struct retains the ownership of the registered sample data
00036   *        from typed datawriter. The data will be duplicated for the register,
00037   *        unregister and dispose control message.
00038   */
00039 struct OpenDDS_Dcps_Export PublicationInstance  : public RcObject {
00040 
00041   PublicationInstance(Message_Block_Ptr registered_sample)
00042     : sequence_(),
00043       group_id_(0),
00044       registered_sample_(registered_sample.release()),
00045       unregistered_(false),
00046       instance_handle_(0),
00047       deadline_timer_id_(-1),
00048       durable_samples_remaining_(0) {
00049   }
00050 
00051   ~PublicationInstance() {
00052   }
00053 
00054   /// The sequence number.
00055   SequenceNumber   sequence_ ;
00056 
00057   /// The group id. // NOT USED IN FIRST IMPL
00058   CoherencyGroup   group_id_ ;
00059 
00060   /// The sample data for registration.
00061   Message_Block_Ptr registered_sample_;
00062 
00063   /// History of the instance samples.
00064   InstanceDataSampleList   samples_;
00065 
00066   /// The flag to indicate whether the instance is unregistered.
00067   bool             unregistered_;
00068 
00069   /// The instance handle for the registered object
00070   DDS::InstanceHandle_t instance_handle_;
00071 
00072   ACE_Time_Value   last_sample_tv_;
00073 
00074   ACE_Time_Value   cur_sample_tv_;
00075 
00076   long             deadline_timer_id_;
00077 
00078   /// Only used by WriteDataContainer::reenqueue_all() while WDC is locked.
00079   ssize_t durable_samples_remaining_;
00080 };
00081 
00082 typedef RcHandle<PublicationInstance> PublicationInstance_rch;
00083 
00084 } // namespace DCPS
00085 } // namespace OpenDDS
00086 
00087 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00088 
00089 #endif /* OPENDDS_DCPS_PUBLICATION_INSTANCE_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1