org.ogema.core.application.ApplicationManager.getChannelAccess()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.ogema.core.application.ApplicationManager.getChannelAccess()方法的一些代码示例,展示了ApplicationManager.getChannelAccess()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationManager.getChannelAccess()方法的具体详情如下:
包路径:org.ogema.core.application.ApplicationManager
类名称:ApplicationManager
方法名:getChannelAccess

ApplicationManager.getChannelAccess介绍

暂无

代码示例

代码示例来源:origin: org.ogema.drivers/hm-hl

@Override
  public void run() {
    while (true && Activator.bundleIsRunning) {
      try {
        Thread.sleep(Constants.DEVICE_SCAN_WAITING_TIME);
      } catch (InterruptedException e) {
      } catch (Exception e) {
        e.printStackTrace();
      }
      if (!Activator.bundleIsRunning)
        return;
      logger.debug("Start device scan ...");
      try {
        this.appManager.getChannelAccess().discoverDevices("homematic-driver", "USB", null, this);
      } catch (ChannelAccessException e) {
        logger.warn("device scan failed", e.getCause());
        e.printStackTrace();
      }
      logger.debug("... device scan finished!");
    }
  }
}

代码示例来源:origin: org.ogema.drivers/hm-hl

public void deviceScan(@Descriptor("The interface ID/Port name (USB, /dev/ttyUSB0, etc.).") String interfaceId) {
    try {
      driver.appManager.getChannelAccess().discoverDevices("homematic-driver", interfaceId, null, driver);
    } catch (ChannelAccessException e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: org.ogema.drivers/hm-hl

channelList = new ArrayList<ChannelConfiguration>(); // UpdateListenerList
commandChannel = new HashMap<String, ChannelConfiguration>();
channelAccess = appManager.getChannelAccess();
resourceManager = appManager.getResourceManagement();
resourceAccess = appManager.getResourceAccess();

代码示例来源:origin: org.ogema.drivers/channel-mapper-v2

@SuppressWarnings("unchecked")
@Override
public void start(ApplicationManager appManager) {
  Objects.requireNonNull(ctx);
  this.logger = appManager.getLogger();
  this.appMan = appManager;
  this.ca = appManager.getChannelAccess();
  this.configs = appManager.getResourceManagement().createResource("channelMapperConfigurations", ResourceList.class);
  configs.setElementType(ChannelMapperConfiguration.class);
  configs.activate(false);
  appManager.getResourcePatternAccess().addPatternDemand(ChannelMapperConfigPattern.class, this, AccessPriority.PRIO_LOWEST);
  this.sreg = ctx.registerService(ChannelMapper.class, this, null);
}

代码示例来源:origin: org.ogema.drivers/hm-hl

public HM_hlDevice(HM_hlDriver driver, ApplicationManager appManager, DeviceLocator deviceLocator) {
  this.appManager = appManager;
  channelAccess = appManager.getChannelAccess();
  attributeChannel = new HashMap<String, ChannelConfiguration>();
  channelList = new ArrayList<ChannelConfiguration>();

代码示例来源:origin: org.ogema.drivers/drs485de-driver

this.channelAccess = appManager.getChannelAccess();
this.logger = appManager.getLogger();

相关文章