io.github.lunasaw.gb28181.common.entity.response.DeviceInfo Maven / Gradle / Ivy
The newest version!
package io.github.lunasaw.gb28181.common.entity.response;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import io.github.lunasaw.gb28181.common.entity.base.DeviceBase;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* @author luna
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@XmlRootElement(name = "Response")
@XmlAccessorType(XmlAccessType.FIELD)
public class DeviceInfo extends DeviceBase {
@XmlElement(name = "DeviceName")
private String deviceName;
@XmlElement(name = "Result")
private String result;
/**
* 设备生产商
*/
@XmlElement(name = "Manufacturer")
private String manufacturer;
/**
* 设备型号(可选)
*/
@XmlElement(name = "Model")
private String model;
/**
* 设备固件版本(可选)
*/
@XmlElement(name = "Firmware")
private String firmware;
/**
* 视频输入通道数(可选)
*/
@XmlElement(name = "Channel")
private int channel;
public DeviceInfo(String cmdType, String sn, String deviceId) {
super(cmdType, sn, deviceId);
}
public static void main(String[] args) {
DeviceInfo deviceInfo = new DeviceInfo();
Object o = DeviceInfo.parseObj("\n" +
" DeviceInfo \n" +
" 1 \n" +
" 34020000001320000001 \n" +
" OK \n" +
" 34020000001320000001 \n" +
" HIK \n" +
" DS-2CD2T20FD-I5 \n" +
" V5.5.82 build 180314 \n" +
" 1 \n" +
" ", DeviceInfo.class);
System.out.println(o);
}
}