當前位置: 首頁>>代碼示例>>Java>>正文


Java SampleLostStatus類代碼示例

本文整理匯總了Java中com.rti.dds.subscription.SampleLostStatus的典型用法代碼示例。如果您正苦於以下問題:Java SampleLostStatus類的具體用法?Java SampleLostStatus怎麽用?Java SampleLostStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SampleLostStatus類屬於com.rti.dds.subscription包,在下文中一共展示了SampleLostStatus類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: on_sample_lost

import com.rti.dds.subscription.SampleLostStatus; //導入依賴的package包/類
@Override
public void on_sample_lost(
    final DataReader dataReader,
    final SampleLostStatus sampleLostStatus
) {
  if (LOGGER.isWarnEnabled()) {
    LOGGER.warn("{}", sampleLostStatus.toString());
  }
}
 
開發者ID:aguther,項目名稱:dds-examples,代碼行數:10,代碼來源:MutableTypeListener.java

示例2: on_sample_lost

import com.rti.dds.subscription.SampleLostStatus; //導入依賴的package包/類
@Override
public void on_sample_lost(final DataReader reader,
                           final SampleLostStatus sampleLostStatus) {
    synchronized (listeners) {
        listeners.stream().filter(listener -> listener.isListeningForDeadlineMissed()).forEach(listener -> {
            ThreadPool.addTask(() -> listener.sampleLost(logger, reader, sampleLostStatus));
        });
    }
}
 
開發者ID:ridernator,項目名稱:ddsWrapper,代碼行數:10,代碼來源:ReaderListener.java

示例3: sampleLost

import com.rti.dds.subscription.SampleLostStatus; //導入依賴的package包/類
public void sampleLost(final Logger logger,
                       final DataReader reader,
                       final SampleLostStatus sampleLostStatus) {
    logger.warn(sampleLostStatus.total_count_change + " samples lost. (" + sampleLostStatus.total_count + " total)");
}
 
開發者ID:ridernator,項目名稱:ddsWrapper,代碼行數:6,代碼來源:Listener.java

示例4: run

import com.rti.dds.subscription.SampleLostStatus; //導入依賴的package包/類
@Override
public void run() {
    final Duration_t infiniteWait = new Duration_t(Duration_t.DURATION_INFINITE_SEC, Duration_t.DURATION_INFINITE_NSEC);

    while (true) {
        final ConditionSeq conditionSequence = new ConditionSeq();

        waitset.wait(conditionSequence, infiniteWait);

        final int mask = reader.get_status_changes();

        if ((mask & StatusKind.DATA_AVAILABLE_STATUS) == StatusKind.DATA_AVAILABLE_STATUS) {
            readerListener.on_data_available(reader);
        }

        if ((mask & StatusKind.REQUESTED_DEADLINE_MISSED_STATUS) == StatusKind.REQUESTED_DEADLINE_MISSED_STATUS) {
            final RequestedDeadlineMissedStatus requestedDeadlineMissedStatus = new RequestedDeadlineMissedStatus();
            reader.get_requested_deadline_missed_status(requestedDeadlineMissedStatus);

            readerListener.on_requested_deadline_missed(reader, requestedDeadlineMissedStatus);
        }

        if ((mask & StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS) == StatusKind.REQUESTED_INCOMPATIBLE_QOS_STATUS) {
            final RequestedIncompatibleQosStatus requestedIncompatibleQosStatus = new RequestedIncompatibleQosStatus();
            reader.get_requested_incompatible_qos_status(requestedIncompatibleQosStatus);

            readerListener.on_requested_incompatible_qos(reader, requestedIncompatibleQosStatus);
        }

        if ((mask & StatusKind.SAMPLE_REJECTED_STATUS) == StatusKind.SAMPLE_REJECTED_STATUS) {
            final SampleRejectedStatus sampleRejectedStatus = new SampleRejectedStatus();
            reader.get_sample_rejected_status(sampleRejectedStatus);

            readerListener.on_sample_rejected(reader, sampleRejectedStatus);
        }

        if ((mask & StatusKind.LIVELINESS_CHANGED_STATUS) == StatusKind.LIVELINESS_CHANGED_STATUS) {
            final LivelinessChangedStatus livelinessChangedStatus = new LivelinessChangedStatus();
            reader.get_liveliness_changed_status(livelinessChangedStatus);

            readerListener.on_liveliness_changed(reader, livelinessChangedStatus);
        }

        if ((mask & StatusKind.SAMPLE_LOST_STATUS) == StatusKind.SAMPLE_LOST_STATUS) {
            final SampleLostStatus sampleLostStatus = new SampleLostStatus();
            reader.get_sample_lost_status(sampleLostStatus);

            readerListener.on_sample_lost(reader, sampleLostStatus);
        }

        if ((mask & StatusKind.SUBSCRIPTION_MATCHED_STATUS) == StatusKind.SUBSCRIPTION_MATCHED_STATUS) {
            final SubscriptionMatchedStatus subscriptionMatchedStatus = new SubscriptionMatchedStatus();
            reader.get_subscription_matched_status(subscriptionMatchedStatus);

            readerListener.on_subscription_matched(reader, subscriptionMatchedStatus);
        }
    }
}
 
開發者ID:ridernator,項目名稱:ddsWrapper,代碼行數:59,代碼來源:ReaderWaitset.java

示例5: on_sample_lost

import com.rti.dds.subscription.SampleLostStatus; //導入依賴的package包/類
public void on_sample_lost(DataReader arg0, SampleLostStatus arg1) {
}
 
開發者ID:EdwardOst,項目名稱:mdpnp,代碼行數:3,代碼來源:RtiConsumerListener.java


注:本文中的com.rti.dds.subscription.SampleLostStatus類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。