package org.ts.ddcs.DataItemTemplate;

import org.ts.ddcs.Tool.BytesHelp;

/**
 * 0xFF0B
 * 测站编码
 */
@SuppressWarnings("all")
public class DataItemTemplateFF0B 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, 2);
        count += 2;
        if (flag.equals(this.feture)) {
            byte[] len = BytesHelp.subBytes(remain, count, 1);
            count += 1;
            byte[] st = BytesHelp.subBytes(remain, count, 8);
            count += 8;
            this.varcharValue = BytesHelp.byte2HexStr(st);
            remain = BytesHelp.subBytes(remain, count, remain.length - count);
            this.macth = true;
        }
        return remain;

    }

}
