本文整理汇总了C#中DDS.GetLivelinessLostStatus方法的典型用法代码示例。如果您正苦于以下问题:C# DDS.GetLivelinessLostStatus方法的具体用法?C# DDS.GetLivelinessLostStatus怎么用?C# DDS.GetLivelinessLostStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DDS
的用法示例。
在下文中一共展示了DDS.GetLivelinessLostStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LivelinessLostValid
public static bool LivelinessLostValid(DDS.IDataWriter writer, int totalCount, int
totalCountChange)
{
bool result = false;
DDS.LivelinessLostStatus holder = null;
DDS.ReturnCode rc = writer.GetLivelinessLostStatus(ref holder);
if (rc == DDS.ReturnCode.Ok)
{
DDS.LivelinessLostStatus status = holder;
if (status.TotalCount == totalCount)
{
if (status.TotalCountChange == totalCountChange)
{
result = true;
}
else
{
System.Console.Error.WriteLine("liveliness_lost.TotalCountChange != '" + totalCountChange
+ "', but '" + status.TotalCountChange + "'.");
}
}
else
{
System.Console.Error.WriteLine("liveliness_lost.TotalCount != '" + totalCount +
"', but '" + status.TotalCount + "'.");
}
}
else
{
System.Console.Error.WriteLine("get_liveliness_lost_status returned " + rc);
}
return result;
}
示例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);
}