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


Java LLRPManager类代码示例

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


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

示例1: initializeLLRPContext

import org.fosstrak.ale.server.readers.llrp.LLRPManager; //导入依赖的package包/类
/**
 * Initialize the LLRP Context.
 * Initialize & set the unique instance of the Adaptor Management.
 * Initialize & set the Remote Adaptor.
 */
public static void  initializeLLRPContext () {
	LOG.debug("InitializeLLRPContext ...");
	String readConfig = null;
	String writeConfig = null;
	boolean commitChanges = false;
	if (!getAdaptorMgmtInitialized()) {
		llrpAdaptorMgmt = AdaptorManagement.getInstance();
		if (!llrpAdaptorMgmt.isInitialized()) {
			//musn't happen when we launch the fc-server in fosstrak
			try {
				llrpAdaptorMgmt.initialize(readConfig, writeConfig, commitChanges, null, null);
			} catch (LLRPRuntimeException e) {
				LOG.error("Error when trying to initialize LLRP Adaptor Management", e);
			}
		}
		setAdaptorMgmtInitialized(true);
		//llrpRemoteAdaptor = llrpAdaptorMgmt.getAdaptorNames().get(0);
		llrpRemoteAdaptor = ALEApplicationContext.getBean(LLRPManager.class).getAdaptor();
		// Register the handlers, so the adaptor management will
		// distribute the LLRP messages automatically and asynchronously. 
		llrpAdaptorMgmt.registerFullHandler(defineMessageHandler());
		llrpAdaptorMgmt.setExceptionHandler(defineExceptionHandler());
	}
	LOG.debug("End initializeLLRPContext.");
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:31,代码来源:AdaptorMgmt.java

示例2: initializeLLRPContext

import org.fosstrak.ale.server.readers.llrp.LLRPManager; //导入依赖的package包/类
/**
 * Initialize the LLRP Context.
 * Initialize & set the unique instance of the Adaptor Management.
 * Initialize & set the Remote Adaptor.
 */
public static void  initializeLLRPContext () {
	LOG.debug("InitializeLLRPContext ...");
	if (!getAdaptorMgmtInitialized()) {
		llrpAdaptorMgmt = AdaptorManagement.getInstance();
		if (!llrpAdaptorMgmt.isInitialized()) {
			//must not happen when we launch the fc-server in fosstrak
			try {
				final boolean commitChanges = false;
				Map<String, Object> config = new HashMap<String, Object> ();
				final String configurationClass = DefaultConfiguration.class.getCanonicalName();
				llrpAdaptorMgmt.initialize(config, config, configurationClass, commitChanges, null, null);
				
			} catch (LLRPRuntimeException e) {
				LOG.error("Error when trying to initialize LLRP Adaptor Management", e);
			}
		}
		setAdaptorMgmtInitialized(true);
		//llrpRemoteAdaptor = llrpAdaptorMgmt.getAdaptorNames().get(0);
		llrpRemoteAdaptor = ALEApplicationContext.getBean(LLRPManager.class).getAdaptor();
		// Register the handlers, so the adaptor management will
		// distribute the LLRP messages automatically and asynchronously. 
		llrpAdaptorMgmt.registerFullHandler(defineMessageHandler());
		llrpAdaptorMgmt.setExceptionHandler(defineExceptionHandler());
	}
	LOG.debug("End initializeLLRPContext.");
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:32,代码来源:AdaptorMgmt.java


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