package org.ts.ddcs.DataItemTemplate;

import org.ts.ddcs.Log.LogHelper;
import org.ts.ddcs.Tool.BytesHelp;

/**
 * f0
 * 观测时间
 */
@SuppressWarnings("all")
public class DataItemTemplateTT extends DataItemTemplate {

    @Override
    public byte[] Stream(byte[] data) {
        byte[] remain = data;
        if (this.macth) {
            return remain;
        }
        int count = 0;
        String flag = BytesHelp.byte2HexStr(remain, count, 1);
        count += 1;
        if (flag.equals(this.feture)) {
            byte[] len = BytesHelp.subBytes(remain, count, 1);
            count += 1;
            byte[] tt = BytesHelp.subBytes(remain, count, 5);
            count += 5;
            this.varcharValue = BytesHelp.byte2HexStr(tt);
            remain = BytesHelp.subBytes(remain, count, remain.length - count);
            this.macth = true;
        }
        return remain;
    }

}
