Пример #1
0
 internal static DDS.ReturnCode CopyIn(
     DDS.OfferedIncompatibleQosStatus from,
     IntPtr to,
     int offset)
 {
     DDS.ReturnCode result = DDS.ReturnCode.Ok;
     if (from != null)
     {
         Write(to, offset_total_count, from.TotalCount);
         Write(to, offset_total_count_change, from.TotalCountChange);
         Write(to, offset_last_policy_id, (int)from.LastPolicyId);
         result = QosPolicyCountSequenceMarshaler.CopyIn(from.Policies, to, offset_policies);
     }
     else
     {
         result = DDS.ReturnCode.BadParameter;
         DDS.OpenSplice.OS.Report(
             DDS.OpenSplice.ReportType.OS_ERROR,
             "DDS.OpenSplice.CustomMarshalers.OfferedIncompatibleQosStatusMarshaler.CopyIn",
             "DDS/OpenSplice/CustomMarshalers/StatusMarshalers.cs",
             DDS.ErrorCode.InvalidValue,
             "OfferedIncompatibleQosStatus attribute may not be a null pointer.");
     }
     return(result);
 }
        public static bool OfferedIncompatibleQosValid(DDS.IDataWriter writer, int totalCount
                                                       , int totalCountChange)
        {
            bool result = false;

            DDS.OfferedIncompatibleQosStatus holder = null;
            DDS.ReturnCode rc = writer.GetOfferedIncompatibleQosStatus(ref holder);
            if (rc == DDS.ReturnCode.Ok)
            {
                DDS.OfferedIncompatibleQosStatus status = holder;
                if (status.TotalCount == totalCount)
                {
                    if (status.TotalCountChange == totalCountChange)
                    {
                        result = true;
                    }
                    else
                    {
                        System.Console.Error.WriteLine("offered_incompatible_qos.TotalCountChange != '"
                                                       + totalCountChange + "', but '" + status.TotalCountChange + "'.");
                    }
                }
                else
                {
                    System.Console.Error.WriteLine("offered_incompatible_qos.TotalCount != '" + totalCount
                                                   + "', but '" + status.TotalCount + "'.");
                }
            }
            else
            {
                System.Console.Error.WriteLine("get_offered_incompatible_qos_status returned " +
                                               rc);
            }
            return(result);
        }
Пример #3
0
 private void PrintStatusses(DDS.IDataWriter writer)
 {
     DDS.ReturnCode rc;
     DDS.OfferedDeadlineMissedStatus odsHolder = null;
     rc = writer.GetOfferedDeadlineMissedStatus(ref odsHolder);
     DDS.OfferedDeadlineMissedStatus ods = odsHolder;
     if (rc != DDS.ReturnCode.Ok)
     {
         System.Console.Error.WriteLine("Unable to resolve status!");
         return;
     }
     DDS.OfferedIncompatibleQosStatus oisHolder = null;
     rc = writer.GetOfferedIncompatibleQosStatus(ref oisHolder);
     DDS.OfferedIncompatibleQosStatus ois = oisHolder;
     if (rc != DDS.ReturnCode.Ok)
     {
         System.Console.Error.WriteLine("Unable to resolve status!");
         return;
     }
     DDS.LivelinessLostStatus llsHolder = null;
     rc = writer.GetLivelinessLostStatus(ref llsHolder);
     DDS.LivelinessLostStatus lls = llsHolder;
     if (rc != DDS.ReturnCode.Ok)
     {
         System.Console.Error.WriteLine("Unable to resolve status!");
         return;
     }
     DDS.PublicationMatchedStatus pmsHolder = null;
     rc = writer.GetPublicationMatchedStatus(ref pmsHolder);
     DDS.PublicationMatchedStatus pms = pmsHolder;
     if (rc != DDS.ReturnCode.Ok)
     {
         System.Console.Error.WriteLine("Unable to resolve status!");
         return;
     }
     System.Console.Out.WriteLine("offered_deadline_missed.TotalCount           : " +
                                  ods.TotalCount);
     System.Console.Out.WriteLine("offered_deadline_missed.TotalCountChange    : " +
                                  ods.TotalCountChange);
     System.Console.Out.WriteLine("offered_deadline_missed.LastInstanceHandle  : " +
                                  ods.LastInstanceHandle);
     System.Console.Out.WriteLine("offered_incompatible_qos.TotalCount          : " +
                                  ois.TotalCount);
     System.Console.Out.WriteLine("offered_incompatible_qos.TotalCountChange   : " +
                                  ois.TotalCountChange);
     System.Console.Out.WriteLine("offered_incompatible_qos.LastPolicyId       : " +
                                  ois.LastPolicyId);
     System.Console.Out.WriteLine("liveliness_lost.TotalCount                   : " +
                                  lls.TotalCount);
     System.Console.Out.WriteLine("liveliness_lost.TotalCountChange            : " +
                                  lls.TotalCountChange);
     System.Console.Out.WriteLine("publication_matched.TotalCount               : " +
                                  pms.TotalCount);
     System.Console.Out.WriteLine("publication_matched.TotalCountChange        : " +
                                  pms.TotalCountChange);
     System.Console.Out.WriteLine("publication_matched.LastSubscriptionHandle  : " +
                                  pms.LastSubscriptionHandle);
 }
Пример #4
0
 public virtual void Reset()
 {
     onOfferedDeadlineMissedCalled = false;
     odmStatus = new DDS.OfferedDeadlineMissedStatus();
     onOfferedIncompatibleQosCalled = false;
     oiqStatus = new DDS.OfferedIncompatibleQosStatus();
     onLivelinessLostCalled = false;
     llStatus = new DDS.LivelinessLostStatus();
     onPublicationMatchStatus = false;
     pmStatus = new DDS.PublicationMatchedStatus();
 }
Пример #5
0
        public override void OnOfferedIncompatibleQos(DDS.IDataWriter writer, DDS.OfferedIncompatibleQosStatus status)
        {
            onOfferedIncompatibleQosCalled = true;
            oiqStatus = status;
            Semaphore sem = null;

            if (semaphores.TryGetValue(DDS.StatusKind.OfferedIncompatibleQos, out sem) == true)
            {
                sem.Release();
            }
        }
Пример #6
0
 public virtual void Reset()
 {
     onOfferedDeadlineMissedCalled = false;
     odmStatus = new DDS.OfferedDeadlineMissedStatus();
     onOfferedIncompatibleQosCalled = false;
     oiqStatus = new DDS.OfferedIncompatibleQosStatus();
     onLivelinessLostCalled = false;
     llStatus = new DDS.LivelinessLostStatus();
     onPublicationMatchStatus = false;
     pmStatus = new DDS.PublicationMatchedStatus();
 }
 public override void Reset()
 {
     base.Reset();
     onOfferedDeadlineMissedCalled = false;
     odmStatus = new DDS.OfferedDeadlineMissedStatus();
     onOfferedIncompatibleQosCalled = false;
     oiqStatus = new DDS.OfferedIncompatibleQosStatus();
     onLivelinessLostCalled = false;
     llStatus = new DDS.LivelinessLostStatus();
     onPublicationMatchStatus = false;
     pmStatus = new DDS.PublicationMatchedStatus();
     onInconsistentTopicCalled = false;
     ictStatus = new DDS.InconsistentTopicStatus();
 }
Пример #8
0
 public override void Reset()
 {
     base.Reset();
     onOfferedDeadlineMissedCalled = false;
     odmStatus = new DDS.OfferedDeadlineMissedStatus();
     onOfferedIncompatibleQosCalled = false;
     oiqStatus = new DDS.OfferedIncompatibleQosStatus();
     onLivelinessLostCalled = false;
     llStatus = new DDS.LivelinessLostStatus();
     onPublicationMatchStatus = false;
     pmStatus = new DDS.PublicationMatchedStatus();
     onInconsistentTopicCalled = false;
     ictStatus = new DDS.InconsistentTopicStatus();
 }
Пример #9
0
        public override Test.Framework.TestResult Run()
        {
            mod.tstDataWriter                datawriter;
            DDS.ReturnCode                   rc;
            DDS.LivelinessLostStatus         llStatus  = null;
            DDS.OfferedDeadlineMissedStatus  odmStatus = null;
            DDS.OfferedIncompatibleQosStatus oiqStatus = null;
            DDS.PublicationMatchedStatus     pmStatus  = null;
            string expResult = "DataWriter status test succeeded";

            Test.Framework.TestResult result;
            result = new Test.Framework.TestResult(expResult, string.Empty, Test.Framework.TestVerdict.Pass,
                                                   Test.Framework.TestVerdict.Fail);
            datawriter = (mod.tstDataWriter) this.ResolveObject("datawriter");
            rc         = datawriter.GetLivelinessLostStatus(ref llStatus);
            if (DDS.ReturnCode.Ok != rc)
            {
                result.Result = string.Format("LivelinessLostStatus could not be resolved. ReturnCode: {0}", rc);
                return(result);
            }
            rc = datawriter.GetOfferedDeadlineMissedStatus(ref odmStatus);
            if (DDS.ReturnCode.Ok != rc)
            {
                result.Result = string.Format("OfferedDeadlineMissedStatus could not be resolved. ReturnCode: {0}", rc);
                return(result);
            }
            rc = datawriter.GetOfferedIncompatibleQosStatus(ref oiqStatus);
            if (DDS.ReturnCode.Ok != rc)
            {
                result.Result = string.Format("OfferedIncompatibleStatus could not be resolved. ReturnCode: {0}", rc);
                return(result);
            }
            rc = datawriter.GetPublicationMatchedStatus(ref pmStatus);
            if (DDS.ReturnCode.Ok != rc)
            {
                result.Result = string.Format("OfferedIncompatibleStatus could not be resolved. ReturnCode: {0}", rc);
                return(result);
            }
            result.Result  = expResult;
            result.Verdict = Test.Framework.TestVerdict.Pass;
            return(result);
        }
Пример #10
0
        internal static void CopyOut(
            IntPtr from,
            ref DDS.OfferedIncompatibleQosStatus to,
            int offset)
        {
            // Initialize managed array to the correct size.
            if (to == null)
            {
                to = new DDS.OfferedIncompatibleQosStatus();
            }

            to.TotalCount       = ReadInt32(from, offset + offset_total_count);
            to.TotalCountChange = ReadInt32(from, offset + offset_total_count_change);
            to.LastPolicyId     = (QosPolicyId)ReadInt32(from, offset + offset_last_policy_id);
            QosPolicyCount[] policies = to.Policies;
            QosPolicyCountSequenceMarshaler.CopyOut(from, ref to.Policies, offset + offset_policies);
            if (policies != to.Policies)
            {
                to.Policies = policies;
            }
        }
Пример #11
0
 internal void CopyOut(ref DDS.OfferedIncompatibleQosStatus to)
 {
     CopyOut(GapiPtr, ref to, 0);
 }
Пример #12
0
 internal DDS.ReturnCode CopyIn(DDS.OfferedIncompatibleQosStatus from)
 {
     cleanupRequired = true;
     return(CopyIn(from, GapiPtr, 0));
 }
Пример #13
0
        internal static void CopyOut(
                IntPtr from, 
                ref DDS.OfferedIncompatibleQosStatus to,
                int offset)
        {
            // Initialize managed array to the correct size.
            if (to == null)
            {
                to = new DDS.OfferedIncompatibleQosStatus();
            }

            to.TotalCount = ReadInt32(from, offset + offset_total_count);
            to.TotalCountChange = ReadInt32(from, offset + offset_total_count_change);
            to.LastPolicyId = (QosPolicyId) ReadInt32(from, offset + offset_last_policy_id);
            QosPolicyCount[] policies = to.Policies;
            QosPolicyCountSequenceMarshaler.CopyOut(from, ref to.Policies, offset + offset_policies);
            if (policies != to.Policies)
            {
                to.Policies = policies;
            }
        }
 void DDS.IDataWriterListener.OnOfferedIncompatibleQos(DDS.IDataWriter entityInterface, DDS.OfferedIncompatibleQosStatus status)
 {
     onOfferedIncompatibleQosCalled = true;
     oiqStatus = status;
 }
Пример #15
0
 void DDS.IDataWriterListener.OnOfferedIncompatibleQos(DDS.IDataWriter entityInterface, DDS.OfferedIncompatibleQosStatus status)
 {
     onOfferedIncompatibleQosCalled = true;
     oiqStatus = status;
 }
Пример #16
0
 public override void OnOfferedIncompatibleQos(DDS.IDataWriter writer, DDS.OfferedIncompatibleQosStatus status)
 {
     onOfferedIncompatibleQosCalled = true;
     oiqStatus = status;
 }