]> git.basschouten.com Git - openhab-addons.git/blob
30bc10d492137a1a93a8890af7c718ad333fc324
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.enocean.internal.eep.Base;
14
15 import static org.openhab.binding.enocean.internal.messages.ESP3Packet.*;
16
17 import org.openhab.binding.enocean.internal.messages.ERP1Message;
18 import org.openhab.binding.enocean.internal.messages.ERP1Message.RORG;
19
20 /**
21  *
22  * @author Dominik Vorreiter - Initial contribution
23  */
24 public class _4BSTeachInVariation3Response extends _4BSMessage {
25
26     public _4BSTeachInVariation3Response(ERP1Message packet, boolean teachIn) {
27         byte[] payload = packet.getPayload(ESP3_RORG_LENGTH, RORG._4BS.getDataLength());
28
29         payload[3] = (byte) (teachIn ? 0xF0 : 0xD0); // telegram with EEP number and Manufacturer ID,
30                                                      // EEP supported, Sender ID stored or deleted, Response
31
32         setData(payload);
33         setDestinationId(packet.getSenderId());
34         setSuppressRepeating(false);
35         setStatus((byte) 0x00);
36     }
37 }