public static bool RequestedDeadlineMissedValid(DDS.IDataReader reader, int totalCount , int totalCountChange) { bool result = false; DDS.RequestedDeadlineMissedStatus holder = new DDS.RequestedDeadlineMissedStatus(); DDS.ReturnCode rc = reader.GetRequestedDeadlineMissedStatus(ref holder); if (rc == DDS.ReturnCode.Ok) { DDS.RequestedDeadlineMissedStatus status = holder; if (status.TotalCount == totalCount) { if (status.TotalCountChange == totalCountChange) { result = true; } else { System.Console.Error.WriteLine("requested_deadline_missed.TotalCountChange != '" + totalCountChange + "', but '" + status.TotalCountChange + "'."); } } else { System.Console.Error.WriteLine("requested_deadline_missed.TotalCount != '" + totalCount + "', but '" + status.TotalCount + "'."); } } else { System.Console.Error.WriteLine("get_requested_deadline_missed_status returned " + rc); } return(result); }
private void PrintStatusses(DDS.IDataReader reader) { DDS.ReturnCode rc; DDS.RequestedDeadlineMissedStatus rdmsHolder = new DDS.RequestedDeadlineMissedStatus(); rc = reader.GetRequestedDeadlineMissedStatus(ref rdmsHolder); DDS.RequestedDeadlineMissedStatus rdms = rdmsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } DDS.RequestedIncompatibleQosStatus riqsHolder = new DDS.RequestedIncompatibleQosStatus(); rc = reader.GetRequestedIncompatibleQosStatus(ref riqsHolder); DDS.RequestedIncompatibleQosStatus riqs = riqsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } DDS.SampleRejectedStatus srsHolder = new DDS.SampleRejectedStatus(); rc = reader.GetSampleRejectedStatus(ref srsHolder); DDS.SampleRejectedStatus srs = srsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } DDS.LivelinessChangedStatus lcsHolder = new DDS.LivelinessChangedStatus(); rc = reader.GetLivelinessChangedStatus(ref lcsHolder); DDS.LivelinessChangedStatus lcs = lcsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } DDS.SubscriptionMatchedStatus smsHolder = new DDS.SubscriptionMatchedStatus(); rc = reader.GetSubscriptionMatchedStatus(ref smsHolder); DDS.SubscriptionMatchedStatus sms = smsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } DDS.SampleLostStatus slsHolder = new DDS.SampleLostStatus(); rc = reader.GetSampleLostStatus(ref slsHolder); DDS.SampleLostStatus sls = slsHolder; if (rc != DDS.ReturnCode.Ok) { System.Console.Error.WriteLine("Unable to resolve status!"); return; } System.Console.Out.WriteLine("requested_deadline_missed.TotalCount : " + rdms.TotalCount); System.Console.Out.WriteLine("requested_deadline_missed.TotalCountChange : " + rdms.TotalCountChange); System.Console.Out.WriteLine("requested_deadline_missed.LastInstanceHandle: " + rdms.LastInstanceHandle); System.Console.Out.WriteLine("requested_incompatible_qos.TotalCount : " + riqs.TotalCount); System.Console.Out.WriteLine("requested_incompatible_qos.TotalCountChange : " + riqs.TotalCountChange); System.Console.Out.WriteLine("requested_incompatible_qos.LastPolicyId : " + riqs.LastPolicyId); System.Console.Out.WriteLine("sample_rejected.TotalCount : " + srs.TotalCount); System.Console.Out.WriteLine("sample_rejected.TotalCountChange : " + srs.TotalCountChange); System.Console.Out.WriteLine("sample_rejected.LastInstanceHandle : " + srs.LastInstanceHandle); System.Console.Out.WriteLine("liveliness_changed.AliveCount : " + lcs.AliveCount); System.Console.Out.WriteLine("liveliness_changed.AliveCountChange : " + lcs.AliveCountChange); System.Console.Out.WriteLine("liveliness_changed.not_alive_count : " + lcs.NotAliveCount); System.Console.Out.WriteLine("liveliness_changed.not_alive_count_change : " + lcs.NotAliveCountChange); System.Console.Out.WriteLine("subscription_match.TotalCount : " + sms.TotalCount); System.Console.Out.WriteLine("subscription_match.TotalCountChange : " + sms.TotalCountChange); System.Console.Out.WriteLine("subscription_match.last_publication_handle : " + sms.LastPublicationHandle); System.Console.Out.WriteLine("sample_lost.TotalCount : " + sls.TotalCount); System.Console.Out.WriteLine("sample_lost.TotalCountChange : " + sls.TotalCountChange + "\n"); }