| | |
| | | * @param presetIndex 调用预置位编号,开启看守位时使用,取值范围0~255
|
| | | */
|
| | | @Override
|
| | | public void homePositionCmd(Device device, String channelId,String frontCmd, String enabled, String resetTime, String presetIndex, SipSubscribe.Event errorEvent,SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException {
|
| | | public void homePositionCmd(Device device, String channelId, String enabled, String resetTime, String presetIndex, SipSubscribe.Event errorEvent,SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException {
|
| | |
|
| | | StringBuffer cmdXml = new StringBuffer(200);
|
| | | String charset = device.getCharset();
|
| | |
| | | cmdXml.append("<DeviceID>" + channelId + "</DeviceID>\r\n");
|
| | | }
|
| | | cmdXml.append("<HomePosition>\r\n");
|
| | | if (StringUtils.hasText(frontCmd)){
|
| | | cmdXml.append(frontCmd);
|
| | | }else{
|
| | | if (NumericUtil.isInteger(enabled) && (!enabled.equals("0"))) {
|
| | | cmdXml.append("<Enabled>1</Enabled>\r\n");
|
| | | if (NumericUtil.isInteger(resetTime)) {
|
| | |
| | | } else {
|
| | | cmdXml.append("<Enabled>0</Enabled>\r\n");
|
| | | }
|
| | | }
|
| | |
|
| | | cmdXml.append("</HomePosition>\r\n");
|
| | | cmdXml.append("</Control>\r\n");
|
| | |
|