本文整理汇总了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.");
}
示例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.");
}