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.souliss.internal.protocol;
15 import java.net.DatagramPacket;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * Data Structure for class SendDispatcherThread
22 * @author Tonino Fazio - Initial contribution
23 * @author Luca Calcaterra - Refactor for OH3
26 public class PacketStruct {
27 private DatagramPacket packet;
29 public DatagramPacket getPacket() {
33 private boolean sent = false;
34 private long time = 0;
36 public PacketStruct(DatagramPacket packetPar) {
40 public long getTime() {
44 public boolean getSent() {
48 public void setSent(boolean sent) {
52 public void setTime(long time) {
53 // set the time only if it has not already been set once