/**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(PublisherQos from, ref v_publisherQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_PUBLISHER_QOS;
         result          = PresentationQosPolicyMarshaler.CopyIn(
             from.Presentation, ref to.presentation);
         if (result == DDS.ReturnCode.Ok)
         {
             result = PartitionQosPolicyMarshaler.CopyIn(
                 from.Partition, ref to.partition.v);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = GroupDataQosPolicyMarshaler.CopyIn(
                 from.GroupData, ref to.groupData);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = EntityFactoryQosPolicyMarshaler.CopyIn(
                 from.EntityFactory, ref to.entityFactory);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "PublisherQos attribute may not be a null pointer.");
     }
     return(result);
 }
예제 #2
0
        /// <summary>
        /// This operation detaches a Condition from the WaitSet. If the Condition was not attached
        /// to this WaitSet, the operation returns PreconditionNotMet
        /// </summary>
        /// <param name="condition">The attached condition in the WaitSet which is to be detached.</param>
        /// <returns>Possible return codes are: Ok, Error, BadParameter, OutOfResources or PreconditionNotMet.</returns>
        public ReturnCode DetachCondition(ICondition condition)
        {
            ReturnCode result   = DDS.ReturnCode.BadParameter;
            Condition  condImpl = condition as Condition;

            ReportStack.Start();

            if (condImpl == null)
            {
                ReportStack.Report(result, "cond is invalid (null), or not of type " +
                                   "DDS::OpenSplice::Condition");
            }
            else
            {
                lock (this)
                {
                    result = condImpl.DetachFromWaitSet(this);

                    // ALREADY_DELETED may only apply to the WaitSet in this context,
                    // so for a deleted condition use BAD_PARAMETER instead.
                    if (result == DDS.ReturnCode.AlreadyDeleted)
                    {
                        result = DDS.ReturnCode.BadParameter;
                    }
                }
            }
            ReportStack.Flush(this, result != ReturnCode.Ok);
            return(result);
        }
 /**
  * Copy and cleanup functions.
  **/
 internal override DDS.ReturnCode CopyIn(DomainParticipantQos from, ref v_participantQos to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to._parent      = new v_qos();
         to._parent.kind = V_QOSKIND.V_PARTICIPANT_QOS;
         result          = UserDataQosPolicyMarshaler.CopyIn(from.UserData, ref to.userData);
         if (result == DDS.ReturnCode.Ok)
         {
             result = EntityFactoryQosPolicyMarshaler.CopyIn(
                 from.EntityFactory, ref to.entityFactory);
         }
         if (result == DDS.ReturnCode.Ok)
         {
             result = SchedulingQosPolicyMarshaler.CopyIn(
                 from.WatchdogScheduling, ref to.watchdogScheduling);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DomainParticipantQos attribute may not be a null pointer.");
     }
     return(result);
 }
예제 #4
0
        /// <summary>
        /// This operation creates a new IDomainParticipant which will join the domain
        /// identified by domainId, with the desired DomainParticipantQos and attaches
        /// the specified IDomainParticipantListener to it and uses the given communication
        /// StatusKind mask.
        /// </summary>
        /// <remarks>
        /// <i><b>Identifying the Domain</b></i><br>
        /// The IDomainParticipant will attach to the Domain that is specified by the
        /// domainId parameter. This parameter consists of an integer specified in the Id tag
        /// in the configuration file. Note that to make multiple connections to a Domain (create
        /// multiple Participants for the same Domain) within a single process, all of the
        /// Participants must use the same identification (i.e. all use the same domain Id).
        ///
        /// The constant DDS.DomainId.Default can be used for this parameter. If this is done
        /// the value of Id tag from the configuration file specified by the environment variable
        /// called OSPL_URI will be used.
        ///
        /// It is recommended to use this domain Id in conjunction with the OSPL_URI
        /// environment variable instead of hard-coding a domain Id into your application,
        /// since this gives you much more flexibility in the deployment phase of your product.<br>
        /// See also Section 1.3.2.1, The OSPL_URI environment variable, in the Deployment
        /// Guide.
        ///
        /// <i><b>Communication Status</b></i><br>
        /// For each communication status, the StatusChangedFlag flag is initially set to
        /// false. It becomes true whenever that communication status changes. For each
        /// communication status activated in the mask , the associated
        /// IDomainParticipantListener operation is invoked and the communication
        /// status is reset to false , as the listener implicitly accesses the status which is passed
        /// as a parameter to that operation. The fact that the status is reset prior to calling the
        /// listener means that if the application calls the Get<status_name>Status from
        /// inside the listener it will see the status already reset.
        ///
        /// The following statuses are applicable to the IDomainParticipant
        /// - DDS.StatusKind InconsistentTopic (propagated)
        /// - DDS.StatusKind OfferedDeadlineMissed (propagated)
        /// - DDS.StatusKind RequestedDeadlineMissed (propagated)
        /// - DDS.StatusKind OfferedIncompatibleQos (propagated)
        /// - DDS.StatusKind RequestedIncompatibleQos (propagated)
        /// - DDS.StatusKind SampleLost (propagated)
        /// - DDS.StatusKind SampleRejected (propagated)
        /// - DDS.StatusKind DataOnReaders (propagated)
        /// - DDS.StatusKind DataAvailable (propagated)
        /// - DDS.StatusKind LivelinessLost (propagated)
        /// - DDS.StatusKind LivelinessChanged (propagated)
        /// - DDS.StatusKind PublicationMatched (propagated)
        /// - DDS.StatusKind SubscriptionMatched (propagated)
        ///
        /// Be aware that the PublicationMatched and SubscriptionMatched
        /// statuses are not applicable when the infrastructure does not have the
        /// information available to determine connectivity. This is the case when OpenSplice
        /// is configured not to maintain discovery information in the Networking Service. (See
        /// the description for the NetworkingService/Discovery/enabled property in
        /// the Deployment Manual for more information about this subject.) In this case the
        /// operation will return NULL.
        ///
        /// Status bits are declared as a constant and can be used by the application in an OR
        /// operation to create a tailored mask. The special constant 0 can
        /// be used to indicate that the created entity should not respond to any of its available
        /// statuses. The DDS will therefore attempt to propagate these statuses to its factory.
        ///
        /// <i><b>Status Propagation</b></i><br>
        /// The Data Distribution Service will trigger the most specific and relevant Listener.<br>
        /// In other words, in case a communication status is also activated on the Listener of
        /// a contained entity, the Listener on that contained entity is invoked instead of the
        /// IDomainParticipantListener. This means that a status change on a contained
        /// entity only invokes the IDomainParticipantListener if the contained entity
        /// itself does not handle the trigger event generated by the status change.
        ///
        /// The statuses DataOnReaders and DataAvailable are
        /// “Read Communication Statuses” and are an exception to all other plain
        /// communication statuses: they have no corresponding status structure that can be
        /// obtained with a Get<status_name>Status operation and they are mutually
        /// exclusive. When new information becomes available to a IDataReader, the Data
        /// Distribution Service will first look in an attached and activated
        /// ISubscriberListener or IDomainParticipantListener (in that order) for the
        /// DataOnReaders. In case the DataOnReaders can not be
        /// handled, the Data Distribution Service will look in an attached and activated
        /// IDataReaderListener, ISubscriberListener or IDomainParticipantListener for
        /// the DataAvailable (in that order).
        /// </remarks>
        /// @param domainId The ID of the Domain to which the IDomainParticipant is joined.
        ///                 This should be the ID as specified in the configuration file.
        /// @param qos      a DomainParticipantQos for the new IDomainParticipant. When
        ///                 this set of QosPolicy settings is inconsistent, no
        ///                 IDomainParticipant is created.
        /// @param listener A IDomainParticipantListener instance which will be attached to
        ///                 the new IDomainParticipant. It is permitted to use null as the
        ///                 value of the listener: this behaves as a IDomainParticipantListener
        ///                 whose operations perform no action.
        /// @param mask     A bit-mask in which each bit enables the invocation of the
        ///                 IDomainParticipantListener for a certain status.
        /// @return The newly created IDomainParticipant. In case of an error a null is returned.
        public IDomainParticipant CreateParticipant(
            DomainId domainId,
            DomainParticipantQos qos,
            IDomainParticipantListener listener,
            StatusKind mask)
        {
            DomainParticipant participant = null;
            ReturnCode        result;

            ReportStack.Start();
            result = QosManager.checkQos(qos);
            if (result == DDS.ReturnCode.Ok)
            {
                if (domainId != DDS.DomainId.Invalid)
                {
                    lock (singleton_lock)
                    {
                        participant = new OpenSplice.DomainParticipant();
                        result      = participant.init(domainId, qos);
                        if (result == ReturnCode.Ok)
                        {
                            result = participant.SetListener(listener, mask);
                        }
                        else
                        {
                            participant = null;
                        }

                        if (result == ReturnCode.Ok)
                        {
                            participantList.Add(participant);
                            if (myQos.EntityFactory.AutoenableCreatedEntities)
                            {
                                result = participant.Enable();
                            }
                        }
                    }
                }
                else
                {
                    ReportStack.Report(DDS.ReturnCode.BadParameter,
                                       "DomainParticipant is using an invalid domain identifier (" + domainId + ").");
                }
            }

            if (result != ReturnCode.Ok && participant != null)
            {
                // Ignore result because we prefer the original error.
                DeleteParticipant(participant);
                participant = null;
            }

            ReportStack.Flush(null, result != ReturnCode.Ok);
            return(participant);
        }
 internal static DDS.ReturnCode CopyIn(LifespanQosPolicy from, ref v_lifespanPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         result = DurationMarshaler.CopyIn(from.Duration, ref to.v.duration);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "LifespanQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(TransportPriorityQosPolicy from, ref v_transportPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v._value = from.Value;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "TransportPriorityQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(OwnershipStrengthQosPolicy from, ref v_strengthPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v._value = from.Value;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "OwnershipStrengthQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(DestinationOrderQosPolicy from, ref v_orderbyPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind = (V_ORDERBYKIND)from.Kind;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DestinationOrderQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(TimeBasedFilterQosPolicy from, ref v_pacingPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         result = DurationMarshaler.CopyIn(from.MinimumSeparation, ref to.v.minSeperation);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "TimeBasedFilterQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(DeadlineQosPolicy from, ref v_deadlinePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         result = DurationMarshaler.CopyIn(from.Period, ref to.v.period);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DeadlineQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(DurabilityQosPolicy from, ref v_durabilityPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind = (V_DURABILITYKIND)from.Kind;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DurabilityQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(PartitionQosPolicy from, ref IntPtr to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         result = SequenceStringMarshaler.CopyIn(from.Name, ref to);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "PartitionQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(OwnershipQosPolicy from, ref v_ownershipPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind = (V_OWNERSHIPKIND)from.Kind;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "OwnershipQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(HistoryQosPolicy from, ref v_historyPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind  = (V_HISTORYQOSKIND)from.Kind;
         to.v.depth = from.Depth;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "HistoryQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(ShareQosPolicy from, ref v_sharePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null && (from.Enable == false || from.Name != null))
     {
         BaseMarshaler.WriteString(ref to.v.name, from.Name);
         to.v.enable = from.Enable;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ShareQosPolicy attribute may not contain a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(LivelinessQosPolicy from, ref v_livelinessPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind = (V_LIVELINESSKIND)from.Kind;
         result    = DurationMarshaler.CopyIn(from.LeaseDuration, ref to.v.lease_duration);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "LivelinessQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(UserDataQosPolicy from, ref v_userDataPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.size = from.Value.Length;
         SequenceOctetMarshaler.CopyIn(from.Value, ref to.v._value);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "UserDataQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
예제 #18
0
        internal ReturnCode trigger(IntPtr context)
        {
            ReturnCode result;

            lock (this)
            {
                result = SacsSuperClass.uResultToReturnCode(
                    DDS.OpenSplice.User.WaitSet.Notify(rlReq_UserPeer, context));
                if (result != ReturnCode.Ok)
                {
                    ReportStack.Report(result, "WaitSet notify failed ");
                }
            }
            return(result);
        }
 internal static DDS.ReturnCode CopyIn(EntityFactoryQosPolicy from, ref v_entityFactoryPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         // Set autoenable_created_entities field
         to.v.autoenable_created_entities = from.AutoenableCreatedEntities;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "EntityFactoryQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(SubscriptionKeyQosPolicy from, ref v_userKeyPolicyI_s to)
 {
     DDS.ReturnCode result;
     if (from != null)
     {
         to.v.enable = from.UseKeyList;
         result      = SequenceStringMarshaler.CopyIn(from.KeyList, ref to.v.expression);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "SubscriptionKeyQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(PresentationQosPolicy from, ref v_presentationPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.access_scope    = (V_PRESENTATIONKIND)from.AccessScope;
         to.v.coherent_access = from.CoherentAccess;
         to.v.ordered_access  = from.OrderedAccess;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "PresentationQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(ReliabilityQosPolicy from, ref v_reliabilityPolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.kind        = (V_RELIABILITYKIND)from.Kind;
         to.v.synchronous = from.Synchronous;
         result           = DurationMarshaler.CopyIn(from.MaxBlockingTime, ref to.v.max_blocking_time);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ReliabilityQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(ResourceLimitsQosPolicy from, ref v_resourcePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.max_samples              = from.MaxSamples;
         to.v.max_instances            = from.MaxInstances;
         to.v.max_samples_per_instance = from.MaxSamplesPerInstance;
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ResourceLimitsQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
예제 #24
0
        /**
         * Condition specific callback from GuardConditions to WaitSet.
         */
        internal ReturnCode wlReq_DetachGuardCondition(IGuardCondition guardCond)
        {
            ReturnCode result;

            Debug.Assert(guardList.Contains(guardCond));
            result = SacsSuperClass.uResultToReturnCode(
                DDS.OpenSplice.User.WaitSet.Notify(rlReq_UserPeer, IntPtr.Zero));
            if (result == DDS.ReturnCode.Ok)
            {
                guardList.Remove(guardCond);
            }
            else
            {
                ReportStack.Report(result, "Could not detach GuardCondition from WaitSet.");
            }
            return(result);
        }
예제 #25
0
        internal ReturnCode init()
        {
            ReturnCode result;
            IntPtr     uWaitSet = DDS.OpenSplice.User.WaitSet.New2();

            if (uWaitSet != IntPtr.Zero)
            {
                result = base.init(uWaitSet, true);
            }
            else
            {
                result = DDS.ReturnCode.OutOfResources;
                ReportStack.Report(result, "u_waitsetNew returned NULL");
                Environment.Exit(-1);
            }
            return(result);
        }
예제 #26
0
        /**
         * Condition specific callback from non-GuardConditions to WaitSet.
         */
        internal ReturnCode wlReq_DetachGeneralCondition(ICondition condition, IntPtr uCondition)
        {
            ReturnCode result;

            Debug.Assert(conditionList.Contains(condition));
            result = SacsSuperClass.uResultToReturnCode(
                DDS.OpenSplice.User.WaitSet.Detach(
                    rlReq_UserPeer, uCondition));
            if (result == DDS.ReturnCode.Ok)
            {
                conditionList.Remove(condition);
                MyDomainId = DDS.OpenSplice.User.WaitSet.GetDomainId(rlReq_UserPeer);
            }
            else
            {
                ReportStack.Report(result, "Could not detach Condition from WaitSet.");
            }
            return(result);
        }
 internal static DDS.ReturnCode CopyIn(DurabilityServiceQosPolicy from, ref v_durabilityServicePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.history_kind             = (V_HISTORYQOSKIND)from.HistoryKind;
         to.v.history_depth            = from.HistoryDepth;
         to.v.max_samples              = from.MaxSamples;
         to.v.max_instances            = from.MaxInstances;
         to.v.max_samples_per_instance = from.MaxSamplesPerInstance;
         result = DurationMarshaler.CopyIn(from.ServiceCleanupDelay, ref to.v.service_cleanup_delay);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "DurabilityServiceQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
 internal static DDS.ReturnCode CopyIn(WriterDataLifecycleQosPolicy from, ref v_writerLifecyclePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.autodispose_unregistered_instances = from.AutodisposeUnregisteredInstances;
         result = DurationMarshaler.CopyIn(from.AutopurgeSuspendedSamplesDelay, ref to.v.autopurge_suspended_samples_delay);
         if (result == DDS.ReturnCode.Ok)
         {
             result = DurationMarshaler.CopyIn(from.AutounregisterInstanceDelay, ref to.v.autounregister_instance_delay);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "WriterDataLifecycleQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }
        internal static DDS.ReturnCode CopyIn(SchedulingQosPolicy from, ref v_schedulePolicyI_s to)
        {
            DDS.ReturnCode result = DDS.ReturnCode.Ok;
            if (from != null)
            {
                // Set scheduling_class field
                to.v.kind = (V_SCHEDULEKIND)from.SchedulingClass.Kind;

                // Set scheduling_priority_kind field
                to.v.priorityKind = (V_SCHEDULEPRIORITYKIND)from.SchedulingPriorityKind.Kind;

                // Set scheduling_priority field
                to.v.priority = from.SchedulingPriority;
            }
            else
            {
                result = DDS.ReturnCode.BadParameter;
                ReportStack.Report(result, "SchedulingQosPolicy attribute may not be a null pointer.");
            }
            return(result);
        }
 internal static DDS.ReturnCode CopyIn(ReaderDataLifecycleQosPolicy from, ref v_readerLifecyclePolicyI_s to)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         to.v.invalid_sample_visibility = (V_INVALIDSAMPLEVISIBILITYKIND)from.InvalidSampleVisibility.Kind;
         to.v.enable_invalid_samples    = from.EnableInvalidSamples;
         to.v.autopurge_dispose_all     = from.AutopurgeDisposeAll;
         result = DurationMarshaler.CopyIn(from.AutopurgeNowriterSamplesDelay, ref to.v.autopurge_nowriter_samples_delay);
         if (result == DDS.ReturnCode.Ok)
         {
             result = DurationMarshaler.CopyIn(from.AutopurgeDisposedSamplesDelay, ref to.v.autopurge_disposed_samples_delay);
         }
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         ReportStack.Report(result, "ReaderDataLifecycleQosPolicy attribute may not be a null pointer.");
     }
     return(result);
 }