Search in sources :

Example 1 with Resources

use of org.eclipse.vorto.codegen.lwm2m.generated.LWM2M.Object.Resources in project vorto by eclipse.

the class FunctionBlockXmlTemplate method addSortedResourceIds.

private void addSortedResourceIds(final String functionBlockName, final Object lwm2mObject) {
    final Resources lwm2mResources = new Resources();
    final List<Item> resourceItems = lwm2mResources.getItem();
    if (resourceIdSet.isEmpty()) {
        final String errMsg = "Empty Function Block <" + functionBlockName + "> (contains no resources)" + STR_ABORT_GENERATOR;
        throw new IllegalArgumentException(errMsg);
    }
    resourceItems.addAll(resourceIdSet);
    lwm2mObject.setResources(lwm2mResources);
}
Also used : Item(org.eclipse.vorto.codegen.lwm2m.generated.LWM2M.Object.Resources.Item) Resources(org.eclipse.vorto.codegen.lwm2m.generated.LWM2M.Object.Resources)

Aggregations

Resources (org.eclipse.vorto.codegen.lwm2m.generated.LWM2M.Object.Resources)1 Item (org.eclipse.vorto.codegen.lwm2m.generated.LWM2M.Object.Resources.Item)1