当前位置: 首页>>代码示例>>Java>>正文


Java WaitSet类代码示例

本文整理汇总了Java中com.rti.dds.infrastructure.WaitSet的典型用法代码示例。如果您正苦于以下问题:Java WaitSet类的具体用法?Java WaitSet怎么用?Java WaitSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WaitSet类属于com.rti.dds.infrastructure包,在下文中一共展示了WaitSet类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ReaderWaitset

import com.rti.dds.infrastructure.WaitSet; //导入依赖的package包/类
public ReaderWaitset(final ReaderListener readerListener, final WaitSet waitset, final DataReader reader) {
    this.waitset = waitset;
    this.readerListener = readerListener;
    this.reader = reader;
    
    start();
}
 
开发者ID:ridernator,项目名称:ddsWrapper,代码行数:8,代码来源:ReaderWaitset.java

示例2: DiscoveryAdapter

import com.rti.dds.infrastructure.WaitSet; //导入依赖的package包/类
protected DiscoveryAdapter(final DataReader reader) {
    this.terminar = false;
    this.reader   = reader;
    this.duracion = new Duration_t(MAX_TIME_SEC, MAX_TIME_NANO);
    this.waitset  = new WaitSet();
    this.waitset.attach_condition(reader.get_statuscondition());
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:8,代码来源:Participante.java

示例3: DataCallback

import com.rti.dds.infrastructure.WaitSet; //导入依赖的package包/类
/**
 * Crea una nueva instancia para un lector con condición dada.
 *
 * @param reader Lector del que recibir datos.
 * @param condicion Condición a aplicar sobre los datos.
 */
public DataCallback(final DynamicDataReader reader, final int mask) {
    this.procesar = true;
    this.terminar = false;

    this.reader    = reader;
    this.mask      = mask;
    this.duracion  = new Duration_t(MAX_TIME_SEC, MAX_TIME_NANO);
    this.waitset   = new WaitSet();

    // Le añado el StatusCondition de condición
    StatusCondition condicion = reader.get_statuscondition();
    condicion.set_enabled_statuses(StatusKind.DATA_AVAILABLE_STATUS);
    this.waitset.attach_condition(condicion);
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:21,代码来源:LectorBase.java

示例4: doStart

import com.rti.dds.infrastructure.WaitSet; //导入依赖的package包/类
@Override
  protected void doStart() throws Exception {
      ddsContext = ((RtiEndpoint)getEndpoint()).createDdsContext();
      if (ddsContext == null) {
          throw new CamelException("Cannot start RtiPollingConsumer: invalid setup.");
      }

      // Create the data reader using the default subscriber
      DomainParticipant p = ddsContext.getParticipant().getValue();
      typeSupport = ddsContext.getParticipant().getRegisteredTypeSupport(ddsContext.getEndpoint().getRegisteredType());
      
      subscriber = p.create_subscriber(
      	getSubscriberQos(p, ((DdsInstanceData)getEndpoint()).getSubscriberQos()), 
          null, 
          StatusKind.STATUS_MASK_NONE);
      if (subscriber == null) {
          throw new CamelException("Cannot start RtiPollingConsumer: invalid setup.");
      }
      
      // create the data reader -- no listener
      reader = subscriber.create_datareader(
          ddsContext.getTopic().getValue(), 
          getDataReaderQos(p, ((DdsInstanceData)getEndpoint()).getDataReaderQos()),
          null, 
          StatusKind.STATUS_MASK_NONE);
      if (reader == null) {
          throw new CamelException("Cannot start RtiPollingConsumer: invalid setup.");
      }
      
      // create the WaitSet infrastructure
waitSet = new WaitSet();
statusCond = reader.get_statuscondition();
statusCond.set_enabled_statuses(StatusKind.DATA_AVAILABLE_STATUS);
waitSet.attach_condition(statusCond);

// create object that can be reused when retrieving an instance handle
keyHolder = typeSupport.create_data();
dataSeq = new LoanableSequence(keyHolder.getClass());
infoSeq = new SampleInfoSeq();

LOG.info("RtiPollingConsumer(" + reader.get_topicdescription().get_name() + ") started...");

  }
 
开发者ID:EdwardOst,项目名称:mdpnp,代码行数:44,代码来源:RtiPollingConsumer.java


注:本文中的com.rti.dds.infrastructure.WaitSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。