当前位置: 首页>>代码示例>>C#>>正文


C# DDS.GetOfferedDeadlineMissedStatus方法代码示例

本文整理汇总了C#中DDS.GetOfferedDeadlineMissedStatus方法的典型用法代码示例。如果您正苦于以下问题:C# DDS.GetOfferedDeadlineMissedStatus方法的具体用法?C# DDS.GetOfferedDeadlineMissedStatus怎么用?C# DDS.GetOfferedDeadlineMissedStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DDS的用法示例。


在下文中一共展示了DDS.GetOfferedDeadlineMissedStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OfferedDeadlineMissedValid

        public static bool OfferedDeadlineMissedValid(DDS.IDataWriter writer, int totalCount
            , int totalCountChange)
        {
            bool result = false;
			DDS.OfferedDeadlineMissedStatus holder = null;
            DDS.ReturnCode rc = writer.GetOfferedDeadlineMissedStatus(ref holder);
            if (rc == DDS.ReturnCode.Ok)
            {
                DDS.OfferedDeadlineMissedStatus status = holder;
                if (status.TotalCount == totalCount)
                {
                    if (status.TotalCountChange == totalCountChange)
                    {
                        result = true;
                    }
                    else
                    {
                        System.Console.Error.WriteLine("offered_deadline_missed.TotalCountChange != '"
                            + totalCountChange + "', but '" + status.TotalCountChange + "'.");
                    }
                }
                else
                {
                    System.Console.Error.WriteLine("offered_deadline_missed.TotalCount != '" + totalCount
                         + "', but '" + status.TotalCount + "'.");
                }
            }
            else
            {
                System.Console.Error.WriteLine("get_offered_deadline_missed_status returned " + rc
                    );
            }
            return result;
        }
开发者ID:shizhexu,项目名称:opensplice,代码行数:34,代码来源:StatusValidator.cs

示例2: PrintStatusses

        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);
        }
开发者ID:shizhexu,项目名称:opensplice,代码行数:58,代码来源:Waitset6.cs


注:本文中的DDS.GetOfferedDeadlineMissedStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。