本文整理汇总了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());
}
}
示例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));
});
}
}
示例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)");
}
示例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);
}
}
}
示例5: on_sample_lost
import com.rti.dds.subscription.SampleLostStatus; //导入依赖的package包/类
public void on_sample_lost(DataReader arg0, SampleLostStatus arg1) {
}