]> git.basschouten.com Git - openhab-addons.git/blob
285bcc0c96d0735266f95e967dd1286bfbf69f0e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.lifx.internal.dto;
14
15 import java.nio.ByteBuffer;
16
17 /**
18  * @author Tim Buckley - Initial contribution
19  * @author Karel Goderis - Enhancement for the V2 LIFX Firmware and LAN Protocol Specification
20  */
21 public class GetLabelRequest extends Packet {
22
23     public static final int TYPE = 0x17;
24
25     public GetLabelRequest() {
26         setTagged(false);
27         setAddressable(true);
28         setResponseRequired(true);
29     }
30
31     @Override
32     public int packetType() {
33         return TYPE;
34     }
35
36     @Override
37     protected int packetLength() {
38         return 0;
39     }
40
41     @Override
42     protected void parsePacket(ByteBuffer bytes) {
43         // do nothing
44     }
45
46     @Override
47     protected ByteBuffer packetBytes() {
48         return ByteBuffer.allocate(0);
49     }
50
51     @Override
52     public int[] expectedResponses() {
53         return new int[] { StateLabelResponse.TYPE };
54     }
55 }