You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
backend/src/main/java/com/xydl/cac/model/spectrogram/Ysp.java

41 lines
1.0 KiB
Java

package com.xydl.cac.model.spectrogram;
import lombok.Data;
import java.io.DataInputStream;
import java.util.ArrayList;
import java.util.List;
@Data
public class Ysp extends SpectrogramModel {
Integer code;
Integer length;
Long createTime;
Integer flag;
Float xInterval;
Float yMax;
Integer xUnit;
Integer yUnit;
Integer k;
Integer m;
List<YspChannel> channels = new ArrayList<>();
public void readFrom(DataInputStream dis) throws Exception {
code = dis.read();
length = readLittleEndianInt(dis);
createTime = readLittleEndianLong(dis);
flag = dis.read();
xInterval = readLittleEndianFloat(dis);
yMax = readLittleEndianFloat(dis);
xUnit = dis.read();
yUnit = dis.read();
k = readLittleEndianInt(dis);
m = dis.read();
for (int i = 0; i < m; i++) {
YspChannel channel = new YspChannel();
channel.readFrom(dis, k);
channels.add(channel);
}
}
}