package com.zt.plat.module.qms.iot.tcpserver.publisher;

import cn.hutool.extra.spring.SpringUtil;
import com.zt.plat.module.qms.iot.tcpserver.core.EventConstant;
import com.zt.plat.module.qms.iot.tcpserver.core.MeasurePoint;
import com.zt.plat.module.qms.iot.tcpserver.event.MeasurePointEvent;

import java.util.HashMap;
import java.util.Map;

/**
 * <b>MeasurePointPublisher</b>
 * 计量点事件发送
 * <p>更新历史：</p>
 * <pre> 版本         更新时间            更新者        更新内容
 * V1.0      2021-6-25          王兴荣         Add</pre>
 * <b>Copyright (C)  云南志者竟成科技有限公司</b> 
 * @author 王兴荣 &lt;xingrong_wang@will-way.cn&gt;
 * @version V1.0 
 * @since 2021-6-25
 */
public class MeasurePointPublisher {

    public static void publishEvent() {
        MeasurePoint measurePoint = new MeasurePoint();
        
        Map<String, Object> event = new HashMap<>(16);
        event.put(EventConstant.EVENT_MEASURE_POINT, measurePoint);
        SpringUtil.publishEvent(new MeasurePointEvent(event));
    }
}
