com.github.andy2003.ui.rawview.FrameData Maven / Gradle / Ivy
/**
* This file is part of Kayak.
*
* Kayak is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Kayak is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Kayak. If not, see .
*
*/
package com.github.andy2003.ui.rawview;
import com.github.andy2003.core.Frame;
/**
*
* @author Jan-Niklas Meier
*/
public class FrameData {
private int identifier;
private byte[] data;
private boolean dataChanged;
private int[] frequency;
private long timestamp;
private long interval;
private boolean inTable;
private boolean extended;
public boolean isDataChanged() {
return dataChanged;
}
public void setDataChanged(boolean dataChanged) {
this.dataChanged = dataChanged;
}
public boolean isInTable() {
return inTable;
}
public void setInTable(boolean inTable) {
this.inTable = inTable;
}
public byte[] getData() {
return data;
}
public int getIdentifier() {
return identifier;
}
public long getInterval() {
return interval;
}
public long getTimestamp() {
return timestamp;
}
public int[] getFrequency() {
return frequency;
}
public boolean isExtended() {
return extended;
}
public FrameData(Frame f) {
identifier = f.getIdentifier();
timestamp = f.getTimestamp();
data = f.getData();
frequency = new int[data.length];
for(int i=0;i=1)
frequency[i]--;
}
} else {
int[] newFrequency = new int[newData.length];
for(int i=0;i