package cn.amq.traffic;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import cn.amq.basis.AmqBasisEvent;
import cn.amq.basis.AmqConst;
import cn.amq.business.AmqMainPoint;
import cn.amq.peas.TrafficEventAlarmHolder;
import cn.amq.peas.TrafficEventAlarmPeas;
import cn.amq.peas.XdPtzDefinedHolder;
import cn.amq.peas.XdPtzDefinedPeas;
import cn.amq.peas.XdPtzMovedNotifyPeas;
import cn.base.bean.BeanHelper;
/**
 * 发送预置点位定义信息amq/接收预置点位定义信息amq
 * */
public class AmqXdPtzDefinedService {

	static Logger logger = Logger.getLogger(AmqXdPtzDefinedService.class);
	
	/**
	 * 发送预置点位定义信息 AMQ
	 */
	public void publishPresetPointAction(List<XdPtzDefinedPeas> list) {
		XdPtzDefinedHolder holder = new XdPtzDefinedHolder();
		holder.setList(list);
		AmqMainPoint.publishJob.publishGeneralEvent(holder, AmqConst.AMQ_SUBJECT_xdPtzDefined);//发送预置点位定义信息
	}
	
	/**
	 * 接收预置点位信息amq
	 * @param amqBasisMsg
	 */
	public void doPresetPointAction(AmqBasisEvent amqBasisMsg) {
		XdPtzDefinedHolder holder = (XdPtzDefinedHolder)amqBasisMsg;
		List<XdPtzDefinedPeas> list = holder.getList();
		for(int i=0;i<list.size();i++){
			logger.info("接收相机定义通知：------------"+list.get(i));
		}
	}
	
}
