Exemplo n.º 1
0
        internal void CreateListener(out OpenSplice.Gapi.gapi_topicListener listener)
        {
            onInconsistentTopicDelegate = Topic_PrivateOnInconsistentTopic;

            listener = new DDS.OpenSplice.Gapi.gapi_topicListener();
            listener.listener_data = IntPtr.Zero;
            listener.on_inconsistent_topic = onInconsistentTopicDelegate;
        }
        internal void CreateListener(out OpenSplice.Gapi.gapi_subscriberListener listener)
        {
            onDataOnReadersDelegate = PrivateDataOnReaders;

            listener = new DDS.OpenSplice.Gapi.gapi_subscriberListener();
            base.CreateListener(out listener.dataReader);
            listener.on_data_on_readers = onDataOnReadersDelegate;
        }
Exemplo n.º 3
0
        internal static void CopyIn(ref OpenSplice.Gapi.gapi_topicListener from, IntPtr to, int offset)
        {
            // Set listener_data field
            //            Marshal.WriteIntPtr(to, offset + offset_listener_data, from.listener_data);
            BaseMarshaler.Write(to, offset + offset_listener_data, IntPtr.Zero);

            // Set on_inconsistent_topic field
            BaseMarshaler.Write(to, offset + offset_on_inconsistent_topic, MarshalHelper.GetIntPtrForDelegate(from.on_inconsistent_topic));
        }
Exemplo n.º 4
0
        private void loadQosInputAttr(
                OpenSplice.CustomMarshalers.DatabaseMarshaler qosMarshaler,
                Type dataType,
                ref OpenSplice.Common.qp_qosInputAttr attr)
        {
            DatabaseMarshaler.Add(null, dataType, qosMarshaler);
            qosMarshaler.InitEmbeddedMarshalers(null);

            attr.copyOut = qosMarshaler.CopyOutDelegate;
        }
        internal void CreateListener(out OpenSplice.Gapi.gapi_publisherDataWriterListener listener)
        {
            onOfferedDeadlineMissedDelegate = PrivateOfferedDeadlineMissed;
            onLivelinessLostDelegate = PrivateLivelinessLost;
            onOfferedIncompatibleQosDelegate = PrivateOfferedIncompatibleQos;
            onPublicationMatchDelegate = PrivatePublicationMatched;

            listener = new DDS.OpenSplice.Gapi.gapi_publisherDataWriterListener();
            listener.listener_data = IntPtr.Zero;
            listener.on_offered_deadline_missed = onOfferedDeadlineMissedDelegate;
            listener.on_liveliness_lost = onLivelinessLostDelegate;
            listener.on_offered_incompatible_qos = onOfferedIncompatibleQosDelegate;
            listener.on_publication_match = onPublicationMatchDelegate;
        }
Exemplo n.º 6
0
        internal static void CopyIn(ref OpenSplice.Gapi.gapi_dataReaderListener from, IntPtr to, int offset)
        {
            // Set listener_data field
            //            Marshal.WriteIntPtr(to, offset + offset_listener_data, from.listener_data);
            BaseMarshaler.Write(to, offset + offset_listener_data, IntPtr.Zero);

            // Set callback fields
            BaseMarshaler.Write(to, offset + offset_on_requested_deadline_missed, MarshalHelper.GetIntPtrForDelegate(from.on_requested_deadline_missed));
            BaseMarshaler.Write(to, offset + offset_on_requested_incompatible_qos, MarshalHelper.GetIntPtrForDelegate(from.on_requested_incompatible_qos));
            BaseMarshaler.Write(to, offset + offset_on_sample_rejected, MarshalHelper.GetIntPtrForDelegate(from.on_sample_rejected));
            BaseMarshaler.Write(to, offset + offset_on_liveliness_changed, MarshalHelper.GetIntPtrForDelegate(from.on_liveliness_changed));
            BaseMarshaler.Write(to, offset + offset_on_data_available, MarshalHelper.GetIntPtrForDelegate(from.on_data_available));
            BaseMarshaler.Write(to, offset + offset_on_subscription_match, MarshalHelper.GetIntPtrForDelegate(from.on_subscription_match));
            BaseMarshaler.Write(to, offset + offset_on_sample_lost, MarshalHelper.GetIntPtrForDelegate(from.on_sample_lost));
        }
        internal void CreateListener(out OpenSplice.Gapi.gapi_dataReaderListener listener)
        {
            onRequestedDeadlineMissedDelegate = PrivateRequestedDeadlineMissed;
            onRequestedIncompatibleQosDelegate = PrivateRequestedIncompatibleQos;
            onSampleRejectedDelegate = PrivateSampleRejected;
            onLivelinessChangedDelegate = PrivateLivelinessChanged;
            onDataAvailableDelegate = PrivateDataAvailable;
            onSubscriptionMatchDelegate = PrivateSubscriptionMatched;
            onSampleLostDelegate = PrivateSampleLost;

            listener = new DDS.OpenSplice.Gapi.gapi_dataReaderListener();
            listener.listener_data = IntPtr.Zero;
            listener.on_requested_deadline_missed = onRequestedDeadlineMissedDelegate;
            listener.on_requested_incompatible_qos = onRequestedIncompatibleQosDelegate;
            listener.on_sample_rejected = onSampleRejectedDelegate;
            listener.on_liveliness_changed = onLivelinessChangedDelegate;
            listener.on_data_available = onDataAvailableDelegate;
            listener.on_subscription_match = onSubscriptionMatchDelegate;
            listener.on_sample_lost = onSampleLostDelegate;
        }
        internal void CreateListener(out OpenSplice.Gapi.gapi_domainParticipantListener gapiListener)
        {
            onInconsistentTopicDelegate = Topic_PrivateOnInconsistentTopic;

            onOfferedDeadlineMissedDelegate = PrivateOfferedDeadlineMissed;
            onOfferedIncompatibleQosDelegate = PrivateOfferedIncompatibleQos;
            onLivelinessLostDelegate = PrivateLivelinessLost;
            onPublicationMatchDelegate = PrivatePublicationMatched;

            onRequestedDeadlineMissedDelegate = PrivateRequestedDeadlineMissed;
            onRequestedIncompatibleQosDelegate = PrivateRequestedIncompatibleQos;
            onSampleRejectedDelegate = PrivateSampleRejected;
            onLivelinessChangedDelegate = PrivateLivelinessChanged;
            onDataAvailableDelegate = PrivateDataAvailable;
            onSubscriptionMatchDelegate = PrivateSubscriptionMatched;
            onSampleLostDelegate = PrivateSampleLost;

            onDataOnReadersDelegate = PrivateDataOnReaders;

            gapiListener = new DDS.OpenSplice.Gapi.gapi_domainParticipantListener();

            gapiListener.listener_data = IntPtr.Zero;
            gapiListener.on_inconsistent_topic = onInconsistentTopicDelegate;

            gapiListener.on_offered_deadline_missed = onOfferedDeadlineMissedDelegate;
            gapiListener.on_offered_incompatible_qos = onOfferedIncompatibleQosDelegate;
            gapiListener.on_liveliness_lost = onLivelinessLostDelegate;
            gapiListener.on_publication_match = onPublicationMatchDelegate;
            gapiListener.on_requested_deadline_missed = onRequestedDeadlineMissedDelegate;
            gapiListener.on_requested_incompatible_qos = onRequestedIncompatibleQosDelegate;
            gapiListener.on_sample_rejected = onSampleRejectedDelegate;
            gapiListener.on_liveliness_changed = onLivelinessChangedDelegate;
            gapiListener.on_data_available = onDataAvailableDelegate;
            gapiListener.on_subscription_match = onSubscriptionMatchDelegate;
            gapiListener.on_sample_lost = onSampleLostDelegate;
            gapiListener.on_data_on_readers = onDataOnReadersDelegate;
        }
Exemplo n.º 9
0
 public PublisherDataWriterListenerMarshaler(ref OpenSplice.Gapi.gapi_publisherDataWriterListener listener)
     : this()
 {
     CopyIn(ref listener, GapiPtr, 0);
     cleanupRequired = true;
 }
Exemplo n.º 10
0
 public TopicListenerMarshaler(ref OpenSplice.Gapi.gapi_topicListener listener)
     : this()
 {
     CopyIn(ref listener, GapiPtr, 0);
     cleanupRequired = true;
 }
Exemplo n.º 11
0
 public DomainParticipantListenerMarshaler(ref OpenSplice.Gapi.gapi_domainParticipantListener listener)
     : this()
 {
     CopyIn(ref listener, GapiPtr, 0);
     cleanupRequired = true;
 }
Exemplo n.º 12
0
        internal static void CopyIn(ref OpenSplice.Gapi.gapi_subscriberListener from, IntPtr to, int offset)
        {
            DataReaderListenerMarshaler.CopyIn(ref from.dataReader, to, offset_dataReader);

            // set on_data_on_readers field
            BaseMarshaler.Write(to, offset + offset_on_data_on_readers, MarshalHelper.GetIntPtrForDelegate(from.on_data_on_readers));
        }
Exemplo n.º 13
0
 public SubscriberListenerMarshaler(ref OpenSplice.Gapi.gapi_subscriberListener listener)
     : this()
 {
     CopyIn(ref listener, GapiPtr, 0);
     cleanupRequired = true;
 }
Exemplo n.º 14
0
 public DataReaderListenerMarshaler(ref OpenSplice.Gapi.gapi_dataReaderListener listener)
     : this()
 {
     CopyIn(ref listener, GapiPtr, 0);
     cleanupRequired = true;
 }
Exemplo n.º 15
0
        internal static void CopyIn(ref OpenSplice.Gapi.gapi_publisherDataWriterListener from, IntPtr to, int offset)
        {
            // Set listener_data field
            //            Marshal.WriteIntPtr(to, offset + offset_listener_data, from.listener_data);
            BaseMarshaler.Write(to, offset + offset_listener_data, IntPtr.Zero);

            // Set callback fields
            BaseMarshaler.Write(to, offset + offset_on_offered_deadline_missed, MarshalHelper.GetIntPtrForDelegate(from.on_offered_deadline_missed));
            BaseMarshaler.Write(to, offset + offset_on_offered_incompatible_qos, MarshalHelper.GetIntPtrForDelegate(from.on_offered_incompatible_qos));
            BaseMarshaler.Write(to, offset + offset_on_liveliness_lost, MarshalHelper.GetIntPtrForDelegate(from.on_liveliness_lost));
            BaseMarshaler.Write(to, offset + offset_on_publication_match, MarshalHelper.GetIntPtrForDelegate(from.on_publication_match));
        }