| | |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import io.github.yezhihao.protostar.annotation.Field; |
| | | import io.github.yezhihao.protostar.annotation.Message; |
| | | import lombok.Data; |
| | | import org.yzh.protocol.basics.JTMessage; |
| | | import org.yzh.protocol.commons.JT808; |
| | | import org.yzh.protocol.commons.transform.AttributeConverter; |
| | |
| | | * @author yezhihao |
| | | * https://gitee.com/yezhihao/jt808-server |
| | | */ |
| | | @JsonIgnoreProperties({"attributes", "alarmList", "dateTime", "messageId", "properties", "protocolVersion", "clientId", "serialNo", "packageTotal", "packageNo", "verified", "bodyLength", "encryption", "subpackage", "version", "reserved"}) |
| | | @JsonIgnoreProperties({"attributes", |
| | | "alarmList", |
| | | "dateTime", |
| | | "messageId", |
| | | "properties", |
| | | "protocolVersion", |
| | | "clientId", "serialNo", |
| | | "packageTotal", "packageNo", |
| | | "verified", |
| | | "bodyLength", |
| | | "encryption", |
| | | "subpackage", |
| | | "version", |
| | | "reserved"}) |
| | | @Message(JT808.位置信息汇报) |
| | | @Data |
| | | public class T0200 extends JTMessage { |
| | | |
| | | @Field(length = 4, desc = "报警标志") |
| | |
| | | private LocalDateTime deviceTime; |
| | | @Field(converter = AttributeConverter.class, desc = "位置附加信息", version = {-1, 0}) |
| | | @Field(converter = AttributeConverterYue.class, desc = "位置附加信息(粤标)", version = 1) |
| | | private Map<Long, Object> attributes; |
| | | private Map<Integer, Object> attributes; |
| | | |
| | | public int getWarnBit() { |
| | | return warnBit; |
| | |
| | | this.deviceTime = deviceTime; |
| | | } |
| | | |
| | | public Map<Long, Object> getAttributes() { |
| | | return attributes; |
| | | } |
| | | |
| | | public void setAttributes(Map<Long, Object> attributes) { |
| | | this.attributes = attributes; |
| | | } |
| | | |
| | | public int getAttributeInt(int key) { |
| | | if (attributes != null) { |