Examples of Energy


Examples of org.openhab.binding.plugwise.internal.Energy

    if(matcher.matches()) {
      MAC = matcher.group(1);
      datapoints = new Energy[4];

      if(!matcher.group(2).equals("FFFFFFFF")){
        datapoints[0] = new Energy(matcher.group(2), Long.parseLong(matcher.group(3), 16), 3600);
      }
      else {
        datapoints[0] = null;
      }
      if(!matcher.group(4).equals("FFFFFFFF")){
        datapoints[1] = new Energy(matcher.group(2), Long.parseLong(matcher.group(5), 16), 3600);
      }
      else {
        datapoints[1] = null;
      }
      if(!matcher.group(6).equals("FFFFFFFF")){
        datapoints[2] = new Energy(matcher.group(2), Long.parseLong(matcher.group(7), 16), 3600);
      }
      else {
        datapoints[2] = null;
      }
      if(!matcher.group(8).equals("FFFFFFFF")){
        datapoints[3] = new Energy(matcher.group(2), Long.parseLong(matcher.group(9), 16), 3600);
      }
      else {
        datapoints[3] = null;
      }
View Full Code Here

Examples of org.openhab.binding.plugwise.internal.Energy

    Pattern RESPONSE_PATTERN = Pattern.compile("(\\w{16})(\\w{4})(\\w{4})(\\w{8})(\\w{4})(\\w{4})(\\w{4})");

    Matcher matcher = RESPONSE_PATTERN.matcher(payLoad);
    if(matcher.matches()) {
      MAC = matcher.group(1);
      oneSecond = new Energy(DateTime.now(), Integer.parseInt(matcher.group(2), 16), 1);
      eightSecond = new Energy(DateTime.now(), Integer.parseInt(matcher.group(3), 16), 8);
      allSeconds = new Energy(DateTime.now(), Integer.parseInt(matcher.group(4), 16), 0);
      unknown1 = Integer.parseInt(matcher.group(5), 16);
      unknown2 = Integer.parseInt(matcher.group(6), 16);
      unknown3 = Integer.parseInt(matcher.group(7), 16);

    }
View Full Code Here

Examples of personal.mhc.pardus.model.commodities.Energy

        CommodityImpl comm;
        // Loop through each commodity ...
        for(int i =1; i<=44; i++) {
            switch (i) {
                case  1: comm = new Food();break;
                case  2: comm = new Energy();break;
                case  3: comm = new Water();break;
                case  4: comm = new AnimalEmbryos();break;
                case  5: comm = new Ore();break;
                case  6: comm = new Metal();break;
                case  7: comm = new Electronics();break;
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.