コード例 #1
0
        internal override void NotifyListener(Entity source, V_EVENT triggerMask, DDS.OpenSplice.Common.EntityStatus status)
        {
            IPublisherListener pubListener = listener as IPublisherListener;

            if (pubListener != null)
            {
                DDS.OpenSplice.Common.WriterStatus writerStatus = status as DDS.OpenSplice.Common.WriterStatus;

                if ((triggerMask & V_EVENT.LIVELINESS_LOST) == V_EVENT.LIVELINESS_LOST)
                {
                    pubListener.OnLivelinessLost(source as IDataWriter, writerStatus.LivelinessLost);
                }

                if ((triggerMask & V_EVENT.OFFERED_DEADLINE_MISSED) == V_EVENT.OFFERED_DEADLINE_MISSED)
                {
                    pubListener.OnOfferedDeadlineMissed(source as IDataWriter, writerStatus.DeadlineMissed);
                }

                if ((triggerMask & V_EVENT.OFFERED_INCOMPATIBLE_QOS) == V_EVENT.OFFERED_INCOMPATIBLE_QOS)
                {
                    pubListener.OnOfferedIncompatibleQos(source as IDataWriter, writerStatus.IncompatibleQos);
                }

                if ((triggerMask & V_EVENT.PUBLICATION_MATCHED) == V_EVENT.PUBLICATION_MATCHED)
                {
                    pubListener.OnPublicationMatched(source as IDataWriter, writerStatus.PublicationMatch);
                }
            }
        }
コード例 #2
0
        internal static V_RESULT CopyOut(IntPtr fromPtr, IntPtr toPtr)
        {
            v_writerStatus from = (v_writerStatus)Marshal.PtrToStructure(fromPtr, type);

            GCHandle toGCHandle = GCHandle.FromIntPtr(toPtr);

            DDS.OpenSplice.Common.WriterStatus to = toGCHandle.Target as DDS.OpenSplice.Common.WriterStatus;

            V_RESULT result = CopyOut(ref from, to);

            toGCHandle.Target = to;
            return(result);
        }
コード例 #3
0
        internal static V_RESULT CopyOut(ref v_writerStatus from, DDS.OpenSplice.Common.WriterStatus to)
        {
            to.State            = (uint)from._parent.state;
            to.LivelinessLost   = new LivelinessLostStatus();
            to.DeadlineMissed   = new OfferedDeadlineMissedStatus();
            to.IncompatibleQos  = new OfferedIncompatibleQosStatus();
            to.PublicationMatch = new PublicationMatchedStatus();

            LivelinessLostStatusMarshaler.CopyOut(ref from.livelinessLost, to.LivelinessLost);
            OfferedDeadlineMissedStatusMarshaler.CopyOut(ref from.deadlineMissed, to.DeadlineMissed);
            OfferedIncompatibleQosStatusMarshaler.CopyOut(ref from.incompatibleQos, to.IncompatibleQos);
            PublicationMatchedStatusMarshaler.CopyOut(ref from.publicationMatch, to.PublicationMatch);
            return(V_RESULT.OK);
        }