2 * Copyright (c) 2010-2023 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.novafinedust.internal.sds011protocol.messages;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Reply from sensor to a set working period command
20 * @author Stefan Triller - Initial contribution
24 public class WorkingPeriodReply extends SensorReply {
26 private final byte actionType;
27 private final byte period;
29 public WorkingPeriodReply(byte[] bytes) {
32 this.actionType = bytes[3];
33 this.period = bytes[4];
37 * Get the type of action
39 * @return 0 = query 1 = set mode
41 public byte getActionType() {
46 * Get the set working period
48 * @return working period set on the sensor
50 public byte getPeriod() {
55 public String toString() {
56 return "WorkingPeriodReply: [Period=" + this.period + "]";