2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.plugwise.internal.protocol;
15 import static org.openhab.binding.plugwise.internal.protocol.field.MessageType.DEVICE_ROLE_CALL_REQUEST;
17 import org.openhab.binding.plugwise.internal.protocol.field.MACAddress;
20 * Requests the Circle+ to return the MAC address for a specific node. This message is answered by a
21 * {@link RoleCallResponseMessage} which contains the MAC address. Because a Plugwise network can have 64 devices,
22 * the node ID value has a range from 0 to 63.
24 * @author Wouter Born, Karel Goderis - Initial contribution
26 public class RoleCallRequestMessage extends Message {
30 public RoleCallRequestMessage(MACAddress macAddress, int nodeID) {
31 super(DEVICE_ROLE_CALL_REQUEST, macAddress);
36 public String getPayload() {
37 return String.format("%02X", nodeID);
41 protected String payloadToHexString() {
42 return String.format("%02X", nodeID);