package com.xydl.cac.model.spectrogram;

import lombok.Data;

import java.io.DataInputStream;

import static com.xydl.cac.model.spectrogram.SpectrogramModel.*;

@Data
public class YspChannelCrest {
    String name;
    Integer j;
    Float time;
    Float startTime;
    Float endTime;
    Float height;
    Float area;

    public void readFrom(DataInputStream dis) throws Exception {
        name = readString(dis, 10);
        j = dis.read();
        time = readLittleEndianFloat(dis);
        startTime = readLittleEndianFloat(dis);
        endTime = readLittleEndianFloat(dis);
        height = readLittleEndianFloat(dis);
        area = readLittleEndianFloat(dis);
    }
}
