package com.hxzk.gps.util.UDP;
|
|
import com.hxzk.gps.entity.Person.TbPerson;
|
import com.hxzk.gps.entity.Tag.TbTag;
|
import com.hxzk.gps.service.System.TbSystemOperationLogService;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
|
public class UDP_Tag {
|
private static final Logger log = LoggerFactory.getLogger(TbSystemOperationLogService.class);
|
|
|
/*
|
* 新增设备
|
* */
|
public static void AddTagToCs(TbTag tag) {
|
String xieyi = "BSTOCS1,ADDTAG," + tag.getTagId() + ",未绑定,150,10000,1,"+tag.getType()+",END";
|
Udp_Out.udp_to_cs(xieyi);
|
log.info("发送UDP消息到CS端:" + xieyi);
|
}
|
|
/*
|
* 修改设备
|
* */
|
public static void UpTagToCs(TbTag tag) {
|
String xieyi = "BSTOCS1,ALTERTAG," + tag.getTagId() + ",未绑定,150,10000,1,"+tag.getType()+",END";
|
Udp_Out.udp_to_cs(xieyi);
|
log.info("发送UDP消息到CS端:" + xieyi);
|
}
|
/*
|
* 删除设备
|
* */
|
public static void DeTagToCs(TbTag tag) {
|
String xieyi = "BSTOCS1,DELETETAG," + tag.getTagId() + ",END";
|
Udp_Out.udp_to_cs(xieyi);
|
log.info("发送UDP消息到CS端:" + xieyi);
|
}
|
|
}
|