当前位置: 首页>>代码示例>>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;未经允许,请勿转载。