Package org.openhab.binding.zwave.internal.protocol

Examples of org.openhab.binding.zwave.internal.protocol.SerialMessage


   * Gets a SerialMessage with the BASIC GET command
   * @return the serial message
   */
  public SerialMessage getValueMessage() {
    logger.debug("Creating new message for application command BASIC_GET for node {}", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get);
      byte[] newPayload = {   (byte) this.getNode().getNodeId(),
                  2,
                (byte) getCommandClass().getKey(),
                (byte) BASIC_GET };
      result.setMessagePayload(newPayload);
      return result;   
  }
View Full Code Here


   * @param the level to set.
   * @return the serial message
   */
  public SerialMessage setValueMessage(int level) {
    logger.debug("Creating new message for application command BASIC_SET for node {}", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
      byte[] newPayload = {   (byte) this.getNode().getNodeId(),
                  3,
                (byte) getCommandClass().getKey(),
                (byte) BASIC_SET,
                (byte) level
                };
      result.setMessagePayload(newPayload);
      return result;   
  }
View Full Code Here

   * Gets a SerialMessage with the ManufacturerSpecific GET command
   * @return the serial message
   */
  public SerialMessage getManufacturerSpecificMessage() {
    logger.debug("NODE {}: Creating new message for application command MANUFACTURER_SPECIFIC_GET", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.Get);
      byte[] newPayload = {   (byte) this.getNode().getNodeId(),
                  2,
                (byte) getCommandClass().getKey(),
                (byte) MANUFACTURER_SPECIFIC_GET };
      result.setMessagePayload(newPayload);
      return result;   
  }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public SerialMessage getValueMessage() {
    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_MODE_GET", this.getNode().getNodeId());
    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Get);
    byte[] payload = {
        (byte) this.getNode().getNodeId(),
        2,
        (byte) getCommandClass().getKey(),
        THERMOSTAT_MODE_GET
    };
    result.setMessagePayload(payload);
    return result;
  }
View Full Code Here

   * @return the serial message, or null if the supported command is not supported.
   */
  public SerialMessage getSupportedMessage() {
    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_MODE_SUPPORTED_GET", this.getNode().getNodeId());

    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.High);
    byte[] newPayload = {   (byte) this.getNode().getNodeId(),
        2,
        (byte) getCommandClass().getKey(),
        (byte) THERMOSTAT_MODE_SUPPORTED_GET };
    result.setMessagePayload(newPayload);
    return result;   
  }
View Full Code Here

      return null;
    }

    logger.debug("NODE {}: Creating new message for application command THERMOSTAT_MODE_SET", this.getNode().getNodeId());

    SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);
    byte[] newPayload = {   (byte) this.getNode().getNodeId(),
        3,
        (byte) getCommandClass().getKey(),
        (byte) THERMOSTAT_MODE_SET,
        (byte) value
    };
    result.setMessagePayload(newPayload);
    return result;   
  }
View Full Code Here

TOP

Related Classes of org.openhab.binding.zwave.internal.protocol.SerialMessage

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.