Examples of AckMsg


Examples of org.openhab.binding.maxcul.internal.messages.AckMsg

        boolean passToBinding = true;
        /* Handle Internal Messages */
        MaxCulMsgType msgType = BaseMsg.getMsgType(data);
        if (msgType == MaxCulMsgType.ACK) {
          passToBinding = false;
          AckMsg msg = new AckMsg(data);
          if (pendingAckQueue.containsKey(msg.msgCount)
              && msg.dstAddrStr.compareTo(srcAddr) == 0) {
            SenderQueueItem qi = pendingAckQueue
                .remove(msg.msgCount);
            /* verify ACK */
            if ((qi.msg.dstAddrStr.equalsIgnoreCase(msg.srcAddrStr))
                && (qi.msg.srcAddrStr
                    .equalsIgnoreCase(msg.dstAddrStr))) {
              if (msg.getIsNack()) {
                /* NAK'd! */
                // TODO resend?
                logger.error("Message was NAK'd, packet lost");
              } else {
                logger.debug("Message " + msg.msgCount
View Full Code Here

Examples of org.openhab.binding.maxcul.internal.messages.AckMsg

   *
   * @param msg
   *            Message we are acking
   */
  public void sendAck(BaseMsg msg) {
    AckMsg ackMsg = new AckMsg(msg.msgCount, (byte) 0x0, msg.groupid,
        this.srcAddr, msg.srcAddrStr, false);
    ackMsg.setFastSend(true); // all ACKs are sent to waiting device.
    sendMessage(ackMsg);
  }
View Full Code Here

Examples of org.openhab.binding.maxcul.internal.messages.AckMsg

   *
   * @param msg
   *            Message we are nacking
   */
  public void sendNack(BaseMsg msg) {
    AckMsg nackMsg = new AckMsg(msg.msgCount, (byte) 0x0, msg.groupid,
        this.srcAddr, msg.srcAddrStr, false);
    nackMsg.setFastSend(true); // all NACKs are sent to waiting device.
    sendMessage(nackMsg);
  }
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.