Examples of EMType


Examples of org.openhab.binding.em.internal.EMBindingConfig.EMType

  public void testParsingEMData() throws Exception {

    String address = ParsingUtils.parseAddress(EM_DATA[0]);
    Assert.assertEquals("05", address);

    EMType type = ParsingUtils.parseType(EM_DATA[0]);
    Assert.assertEquals(EMType.EM100EM, type);

    int cumulatedValue = ParsingUtils.parseCumulatedValue(EM_DATA[0]);
    Assert.assertEquals(1227, cumulatedValue);
View Full Code Here

Examples of org.openhab.binding.em.internal.EMBindingConfig.EMType

    String address = ParsingUtils.parseAddress(data);
    if (!checkNewMessage(address, ParsingUtils.parseCounter(data))) {
      logger.warn("Received message from " + address + " more than once");
      return;
    }
    EMType type = ParsingUtils.parseType(data);
    EMBindingConfig emConfig = findConfig(type, address, Datapoint.CUMULATED_VALUE);
    if (emConfig != null) {
      updateItem(emConfig, ParsingUtils.parseCumulatedValue(data));
    }
    if (data.length() > 10) {
View Full Code Here

Examples of org.openhab.binding.em.internal.EMBindingConfig.EMType

  public void processBindingConfiguration(String context, Item item, String bindingConfig)
      throws BindingConfigParseException {
    super.processBindingConfiguration(context, item, bindingConfig);
    String[] parts = bindingConfig.split(";");
    String address = null;
    EMType type = null;
    Datapoint datapoint = null;
    double correctionFactor = 0;
    for (String part : parts) {
      String[] keyValue = part.split("=");
      if ("type".equals(keyValue[0])) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.