本文整理汇总了Java中org.eclipse.leshan.client.resource.BaseInstanceEnabler类的典型用法代码示例。如果您正苦于以下问题:Java BaseInstanceEnabler类的具体用法?Java BaseInstanceEnabler怎么用?Java BaseInstanceEnabler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BaseInstanceEnabler类属于org.eclipse.leshan.client.resource包,在下文中一共展示了BaseInstanceEnabler类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: encode_client_description_with_version_1_0
import org.eclipse.leshan.client.resource.BaseInstanceEnabler; //导入依赖的package包/类
@Test
public void encode_client_description_with_version_1_0() {
List<LwM2mObjectEnabler> objectEnablers = new ArrayList<>();
Map<Integer, LwM2mInstanceEnabler> instancesMap = new HashMap<>();
instancesMap.put(0, new BaseInstanceEnabler());
objectEnablers.add(new ObjectEnabler(6, getObjectModel(6), instancesMap, null));
Link[] links = LinkFormatHelper.getClientDescription(objectEnablers, null);
String strLinks = Link.serialize(links);
assertEquals("</>;rt=\"oma.lwm2m\", </6/0>", strLinks);
}
示例2: encode_client_description_with_version_2_0
import org.eclipse.leshan.client.resource.BaseInstanceEnabler; //导入依赖的package包/类
@Test
public void encode_client_description_with_version_2_0() {
List<LwM2mObjectEnabler> objectEnablers = new ArrayList<>();
Map<Integer, LwM2mInstanceEnabler> instancesMap = new HashMap<>();
instancesMap.put(0, new BaseInstanceEnabler());
instancesMap.put(1, new BaseInstanceEnabler());
objectEnablers.add(new ObjectEnabler(6, getVersionedObjectModel(6, "2.0"), instancesMap, null));
Link[] links = LinkFormatHelper.getClientDescription(objectEnablers, null);
String strLinks = Link.serialize(links);
assertEquals("</>;rt=\"oma.lwm2m\", </6>;ver=\"2.0\", </6/0>, </6/1>", strLinks);
}