package org.ts.ddcs.DataTemplate;

import com.alibaba.fastjson.JSONObject;
import org.ts.ddcs.Log.LogHelper;

import java.util.LinkedList;
import java.util.List;

/**
 * 0x90
 * 水资源 RTU 重启
 */
@SuppressWarnings("all")
public class DataTemplateSzyC90 extends DataTemplateSzy2012 {

    private String dataInfo;


    @Override
    public void Stream() {
        try {
            if (dataLen > 0) {
                int count = 0;


                JSONObject data = new JSONObject();
                data.put("func", "90");
                List<JSONObject> items = new LinkedList<>();
                JSONObject item = new JSONObject();
                item.put("name", "RTU重启");
                item.put("value", "已重启");
                items.add(item);
                data.put("data", items);
                this.dataInfo = data.toJSONString();


            }
        } catch (Exception e) {
            LogHelper.error(e);
        }
    }

    @Override
    public String getDataInfo() {
        return dataInfo;
    }
}
