|  |  |  | 
|---|
|  |  |  | package com.genersoft.iot.vmp.conf; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.junit.jupiter.api.Order; | 
|---|
|  |  |  | import org.springframework.boot.context.properties.ConfigurationProperties; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Component | 
|---|
|  |  |  | @ConfigurationProperties(prefix = "sip", ignoreInvalidFields = true) | 
|---|
|  |  |  | @Order(0) | 
|---|
|  |  |  | public class SipConfig { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String ip; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String showIp; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Integer port; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private String password; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer ptzSpeed = 50; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer keepaliveTimeOut = 255; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer registerTimeInterval = 120; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | this.ptzSpeed = ptzSpeed; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setKeepaliveTimeOut(Integer keepaliveTimeOut) { | 
|---|
|  |  |  | this.keepaliveTimeOut = keepaliveTimeOut; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setRegisterTimeInterval(Integer registerTimeInterval) { | 
|---|
|  |  |  | this.registerTimeInterval = registerTimeInterval; | 
|---|
|  |  |  | 
|---|
|  |  |  | return ptzSpeed; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer getKeepaliveTimeOut() { | 
|---|
|  |  |  | return keepaliveTimeOut; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer getRegisterTimeInterval() { | 
|---|
|  |  |  | return registerTimeInterval; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public void setAlarm(boolean alarm) { | 
|---|
|  |  |  | this.alarm = alarm; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getShowIp() { | 
|---|
|  |  |  | if (this.showIp == null) { | 
|---|
|  |  |  | return this.ip; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return showIp; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setShowIp(String showIp) { | 
|---|
|  |  |  | this.showIp = showIp; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|