package cn.org.hentai.jtt1078.entity;
|
|
import cn.org.hentai.jtt1078.entity.enums.ProtocolVersion;
|
import lombok.Data;
|
|
@Data
|
public class AudioSendData {
|
// 设备SIM卡号
|
private String sim;
|
// 逻辑通道号
|
private byte channel;
|
// 序列号
|
private short sequenceNumber;
|
|
// 原始音频数据
|
private byte[] audioBytes;
|
|
//协议版本
|
private ProtocolVersion protocolVersion; // 2016 或 2019
|
|
public AudioSendData(String sim, byte channel, byte[] audioBytes,ProtocolVersion protocolVersion) {
|
this.sim = sim;
|
this.channel = channel;
|
this.audioBytes = audioBytes;
|
this.sequenceNumber = generateSequence();
|
this.protocolVersion = protocolVersion;
|
}
|
|
private static short sequence = 0;
|
private static synchronized short generateSequence() {
|
return sequence++;
|
}
|
}
|