package com.casic.tube.frame; import com.casic.common.CasicFrame; import java.util.List; public class EventFrame extends CasicFrame { final String MESSAGE_TYPE_IDENTIFY = "01"; final String MESSAGE_TYPE_STRING = "Event/Tube"; final String MESSAGE_TYPE_DESCRIPTION = "事件消息/管盯"; public List<EventItem> eventItemList; @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("{"); builder.append(MESSAGE_TYPE_DESCRIPTION).append(":").append(MESSAGE_TYPE_STRING).append(";"); builder.append("设备编号:").append(getDeviceCode()).append("; "); builder.append("上报时间:").append(getUptime()).append("; "); for (EventItem eventItem : eventItemList) { builder.append("["); builder.append(eventItem); builder.append("],"); } builder.append("}"); return builder.toString(); } }