Exemple #1
0
 public void QuickClose()
 {
     if (ReportStack.Any())
     {
         ReportStack.Peek().QuickClose();
     }
 }
        internal override ReturnCode AttachToWaitSet(WaitSet waitset)
        {
            ReturnCode result = DDS.ReturnCode.AlreadyDeleted;

            ReportStack.Start();
            lock (this)
            {
                if (this.rlReq_isAlive)
                {
                    if (!waitSetList.Contains(waitset))
                    {
                        result = waitset.wlReq_AttachGuardCondition(this);
                        if (result == DDS.ReturnCode.Ok)
                        {
                            /* The waitset will detach itself when it is destructed. */
                            waitSetList.Add(waitset);
                        }
                    }
                    else
                    {
                        result = DDS.ReturnCode.Ok;
                    }
                }
            }

            return(result);
        }
Exemple #3
0
        internal override ReturnCode DetachFromWaitSet(WaitSet waitset)
        {
            ReturnCode result = DDS.ReturnCode.AlreadyDeleted;

            ReportStack.Start();
            lock (this)
            {
                if (this.rlReq_isAlive)
                {
                    if (waitSetList.Remove(waitset))
                    {
                        result = waitset.wlReq_DetachGuardCondition(this);
                    }
                    else
                    {
                        result = DDS.ReturnCode.PreconditionNotMet;
                    }
                }
            }

//            if (result != DDS.ReturnCode.Ok) {
//                OS_REPORT(OS_ERROR,
//                            "Condition::detach_waitset", 0,
//                            "detach failed with %s",
//                            DDS::OpenSplice::Utils::returnCodeToString(result));
//            }

            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);
 }
Exemple #5
0
        /// <summary>
        /// This operation gets the default DomainParticipantQos of the DomainParticipantFactory
        /// </summary>
        /// <remarks>
        /// This operation gets the default DomainParticipantQos of the
        /// DomainParticipantFactory (that is the struct with the QosPolicy settings)
        /// which is used for newly created IDomainParticipant objects, in case no QoS is used
        /// in the CreateParticipant operation.
        ///
        /// The application must provide the DomainParticipantQos struct in which the
        /// QosPolicy settings can be stored and provide a reference to the struct. The
        /// operation writes the default QosPolicy settings to the struct referenced to by qos.<br>
        /// Any settings in the struct are overwritten.<br>
        /// The values retrieved by this operation match the set of values specified on the last
        /// successful call to SetDefaultParticipantQos(), or, if the call was never
        /// made, the default values as specified for each QosPolicy setting.
        /// </remarks>
        /// @param qos A reference to the DomainParticipantQos in which the default
        ///            DomainParticipantQos for the IDomainParticipant is written
        /// @return DDS.ReturnCode Ok - The new default DomainParticipantQos is set
        /// @return DDS.ReturnCode Error - An internal error has occured
        /// @return DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation
        public ReturnCode GetDefaultParticipantQos(ref DomainParticipantQos qos)
        {
            ReturnCode result;

            using (OpenSplice.CustomMarshalers.DomainParticipantQosMarshaler marshaler =
                       new OpenSplice.CustomMarshalers.DomainParticipantQosMarshaler())
            {
                lock (singleton_lock)
                {
                    ReportStack.Start();
                    result = marshaler.CopyIn(defaultParticipantQos);
                    if (result == ReturnCode.Ok)
                    {
                        marshaler.CopyOut(ref qos);
                        // Listener scheduling qospolicy is not part of User Layer, so obtain it separately from participant.
                        if (qos.ListenerScheduling.SchedulingClass == null)
                        {
                            qos.ListenerScheduling.SchedulingClass = new SchedulingClassQosPolicy();
                        }
                        qos.ListenerScheduling.SchedulingClass.Kind = this.defaultParticipantQos.ListenerScheduling.SchedulingClass.Kind;
                        if (qos.ListenerScheduling.SchedulingPriorityKind == null)
                        {
                            qos.ListenerScheduling.SchedulingPriorityKind = new SchedulingPriorityQosPolicy();
                        }
                        qos.ListenerScheduling.SchedulingPriorityKind.Kind = this.defaultParticipantQos.ListenerScheduling.SchedulingPriorityKind.Kind;
                        qos.ListenerScheduling.SchedulingPriority          = this.defaultParticipantQos.ListenerScheduling.SchedulingPriority;
                    }
                    ReportStack.Flush(null, result != ReturnCode.Ok);
                }
            }

            return(result);
        }
Exemple #6
0
        internal override ReturnCode AttachToWaitSet(WaitSet waitset)
        {
            ReturnCode result = DDS.ReturnCode.AlreadyDeleted;

            ReportStack.Start();
            lock (this)
            {
                if (this.rlReq_isAlive)
                {
                    if (!waitSetList.Contains(waitset))
                    {
                        result = waitset.wlReq_AttachGuardCondition(this);
                        if (result == DDS.ReturnCode.Ok)
                        {
                            /* The waitset will detach itself when it is destructed. */
                            waitSetList.Add(waitset);
                        }
                    }
                    else
                    {
                        result = DDS.ReturnCode.Ok;
                    }
                }
            }

//            if (result != DDS.ReturnCode.Ok) {
//                OS_REPORT(OS_ERROR,
//                            "Condition::attach_waitset", 0,
//                            "attach failed with %s",
//                            DDS::OpenSplice::Utils::returnCodeToString(result));
//            }

            return(result);
        }
        /// <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(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);
 }
Exemple #9
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);
        }
Exemple #10
0
        public Value PushCommand(CallScope args)
        {
            // Make a copy at position 2, because the topmost report object has an
            // open output stream at this point.  We want it to get popped off as
            // soon as this command terminate so that the stream is closed cleanly.
            Report temp = ReportStack.Pop();

            ReportStack.Push(new Report(temp));
            ReportStack.Push(temp);
            return(Value.Get(true));
        }
Exemple #11
0
        public string PromptString()
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < ReportStack.Count(); i++)
            {
                sb.Append("]");
            }
            sb.Append(" ");
            return(sb.ToString());
        }
 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(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(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(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(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(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(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(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(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 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(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);
 }
 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);
 }
Exemple #28
0
        public void PopReport()
        {
            if (!ReportStack.Any())
            {
                throw new InvalidOperationException("Stack is empty");
            }
            ReportStack.Pop();

            // There should always be the "default report" waiting on the stack.
            if (!ReportStack.Any())
            {
                throw new InvalidOperationException("Stack is empty");
            }
            Scope.DefaultScope = Report;
        }
 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);
 }