1078-设置路线...
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.genersoft.iot.vmp.jt1078.proc.response;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTPolygonArea;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTRoute;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
/**
|
||||
* 设置路线
|
||||
*/
|
||||
@MsgId(id = "8606")
|
||||
public class J8606 extends Rs {
|
||||
|
||||
/**
|
||||
* 路线
|
||||
*/
|
||||
private JTRoute route;
|
||||
|
||||
|
||||
@Override
|
||||
public ByteBuf encode() {
|
||||
ByteBuf buffer = Unpooled.buffer();
|
||||
buffer.writeBytes(route.encode());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public JTRoute getRoute() {
|
||||
return route;
|
||||
}
|
||||
|
||||
public void setRoute(JTRoute route) {
|
||||
this.route = route;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.genersoft.iot.vmp.jt1078.proc.response;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 删除路线
|
||||
*/
|
||||
@MsgId(id = "8605")
|
||||
public class J8607 extends Rs {
|
||||
|
||||
|
||||
/**
|
||||
* 待删除的路线ID
|
||||
*/
|
||||
private List<Long> idList;
|
||||
|
||||
|
||||
@Override
|
||||
public ByteBuf encode() {
|
||||
ByteBuf buffer = Unpooled.buffer();
|
||||
if (idList == null || idList.isEmpty()) {
|
||||
buffer.writeByte(0);
|
||||
return buffer;
|
||||
}else {
|
||||
buffer.writeByte(idList.size());
|
||||
}
|
||||
for (Long id : idList) {
|
||||
buffer.writeInt((int) (id & 0xffffffffL));
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public List<Long> getIdList() {
|
||||
return idList;
|
||||
}
|
||||
|
||||
public void setIdList(List<Long> idList) {
|
||||
this.idList = idList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user