Пример #1
0
 private void PrivateSubscriptionMatched(IntPtr entityData, IntPtr enityPtr, SubscriptionMatchedStatus status)
 {
     if (listener != null)
     {
         IDataReader dataReader = (IDataReader)OpenSplice.SacsSuperClass.fromUserData(enityPtr);
         listener.OnSubscriptionMatched(dataReader, status);
     }
 }
Пример #2
0
        internal override void NotifyListener(Entity source, V_EVENT triggerMask, DDS.OpenSplice.Common.EntityStatus status)
        {
            ReturnCode result;

            IDataReaderListener drListener = listener as IDataReaderListener;

            if (drListener != null)
            {
                DDS.OpenSplice.Common.ReaderStatus readerStatus = status as DDS.OpenSplice.Common.ReaderStatus;
                if ((triggerMask & V_EVENT.DATA_AVAILABLE) == V_EVENT.DATA_AVAILABLE)
                {
                    result = ResetDataAvailableStatus();
                    if (result == DDS.ReturnCode.Ok)
                    {
                        drListener.OnDataAvailable(source as IDataReader);
                    }
                }

                if ((triggerMask & V_EVENT.SAMPLE_REJECTED) == V_EVENT.SAMPLE_REJECTED)
                {
                    drListener.OnSampleRejected(source as IDataReader, readerStatus.SampleRejected);
                }

                if ((triggerMask & V_EVENT.LIVELINESS_CHANGED) == V_EVENT.LIVELINESS_CHANGED)
                {
                    drListener.OnLivelinessChanged(source as IDataReader, readerStatus.LivelinessChanged);
                }

                if ((triggerMask & V_EVENT.SAMPLE_LOST) == V_EVENT.SAMPLE_LOST)
                {
                    drListener.OnSampleLost(source as IDataReader, readerStatus.SampleLost);
                }

                if ((triggerMask & V_EVENT.REQUESTED_DEADLINE_MISSED) == V_EVENT.REQUESTED_DEADLINE_MISSED)
                {
                    drListener.OnRequestedDeadlineMissed(source as IDataReader, readerStatus.DeadlineMissed);
                }

                if ((triggerMask & V_EVENT.REQUESTED_INCOMPATIBLE_QOS) == V_EVENT.REQUESTED_INCOMPATIBLE_QOS)
                {
                    drListener.OnRequestedIncompatibleQos(source as IDataReader, readerStatus.IncompatibleQos);
                }

                if ((triggerMask & V_EVENT.SUBSCRIPTION_MATCHED) == V_EVENT.SUBSCRIPTION_MATCHED)
                {
                    drListener.OnSubscriptionMatched(source as IDataReader, readerStatus.SubscriptionMatch);
                }
            }
        }