All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.lunasaw.gb28181.common.entity.control.DeviceControlAlarm Maven / Gradle / Ivy

The newest version!
package io.github.lunasaw.gb28181.common.entity.control;

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 lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 *
 * /**
 * 
 * 
 * DeviceControl
 * 179173
 * 213
 * ResetAlarm
 * 
 * 123
 * alarmType
 * 
 * 
 * 
 * @author luna
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@XmlRootElement(name = "Control")
@XmlAccessorType(XmlAccessType.FIELD)
public class DeviceControlAlarm extends DeviceControlBase {

    @XmlElement(name = "AlarmCmd")
    public String    alarmCmd;

    @XmlElement(name = "Info")
    public AlarmInfo alarmInfo;

    public DeviceControlAlarm(String cmdType, String sn, String deviceId) {
        super(cmdType, sn, deviceId);
        this.setControlType("AlarmCmd");
    }

    public static void main(String[] args) {
        DeviceControlAlarm alarm = new DeviceControlAlarm();
        alarm.setCmdType("DeviceControl");
        alarm.setSn("179173");
        alarm.setDeviceId("123");
        alarm.setAlarmCmd("ResetAlarm");

        AlarmInfo alarmInfo = new AlarmInfo();
        alarmInfo.setAlarmMethod("!231");
        alarmInfo.setAlarmType("alarmType");
        alarm.setAlarmInfo(alarmInfo);

        System.out.println(alarm);

    }

    @Getter
    @Setter
    @AllArgsConstructor
    @NoArgsConstructor
    @XmlRootElement(name = "Info")
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class AlarmInfo {

        @XmlElement(name = "AlarmMethod")
        public String alarmMethod;

        @XmlElement(name = "AlarmType")
        public String alarmType;

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy