Package org.housecream.restmcu.it.resource

Examples of org.housecream.restmcu.it.resource.LineInfo


            }
        });
    }

    public LineInfo fillPin() {
        LineInfo line = new LineInfo(42);
        line.setDescription(new RestMcuLine());
        line.getDescription().setDescription("pin 42 description");
        line.getDescription().setDirection(RestMcuLineDirection.INPUT);
        line.getDescription().setType(RestMcuLineType.ANALOG);
        line.getDescription().setValueMax(1024f);
        line.getDescription().setValueMin(0f);

        line.setSettings(new RestMcuLineSettings());
        line.getSettings().setName("name of pin");
        List<RestMcuLineNotify> notifies = new ArrayList<RestMcuLineNotify>();
        notifies.add(new RestMcuLineNotify(SUP_OR_EQUAL, 42));
        notifies.add(new RestMcuLineNotify(INF_OR_EQUAL, 42));

        line.getSettings().setNotifies(notifies);

        return line;
    }
View Full Code Here


    public LineInfoBuilder(Integer id) {
        this.id = id;
    }

    public LineInfo build() {
        LineInfo pinInfo = new LineInfo(id);
        pinInfo.setDescription(new RestMcuLine());
        pinInfo.setSettings(new RestMcuLineSettings());
        pinInfo.setValue(value);
        pinInfo.getSettings().setName(name);
        pinInfo.getDescription().setDirection(direction);
        return pinInfo;
    }
View Full Code Here

TOP

Related Classes of org.housecream.restmcu.it.resource.LineInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.