|
|
@ -3527,7 +3527,7 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
* @param startTime 开始时间 时:分:秒 |
|
|
|
* @param startTime 开始时间 时:分:秒 |
|
|
|
* @param endTime 结束时间 时:分:秒 |
|
|
|
* @param endTime 结束时间 时:分:秒 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setLightCfg(NativeLong loginID,int emMode,int nPreValue,int nBrightness,String startTime , String endTime){ |
|
|
|
public boolean setLightCfg(NativeLong loginID,int emMode,int nPreValue,int nBrightness,String startTime , String endTime,String startTime2,String endTime2){ |
|
|
|
//10:10:11
|
|
|
|
//10:10:11
|
|
|
|
int startHour = Integer.parseInt(startTime.substring(0,2)); |
|
|
|
int startHour = Integer.parseInt(startTime.substring(0,2)); |
|
|
|
int startMinute = Integer.parseInt(startTime.substring(3,5)); |
|
|
|
int startMinute = Integer.parseInt(startTime.substring(3,5)); |
|
|
@ -3536,6 +3536,13 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
int endMinute = Integer.parseInt(endTime.substring(3,5)); |
|
|
|
int endMinute = Integer.parseInt(endTime.substring(3,5)); |
|
|
|
int endSecond = Integer.parseInt(endTime.substring(6,8)); |
|
|
|
int endSecond = Integer.parseInt(endTime.substring(6,8)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int startHour2 = Integer.parseInt(startTime2.substring(0,2)); |
|
|
|
|
|
|
|
int startMinute2 = Integer.parseInt(startTime2.substring(3,5)); |
|
|
|
|
|
|
|
int startSecond2 = Integer.parseInt(startTime2.substring(6,8)); |
|
|
|
|
|
|
|
int endHour2 = Integer.parseInt(endTime2.substring(0,2)); |
|
|
|
|
|
|
|
int endMinute2 = Integer.parseInt(endTime2.substring(3,5)); |
|
|
|
|
|
|
|
int endSecond2 = Integer.parseInt(endTime2.substring(6,8)); |
|
|
|
|
|
|
|
|
|
|
|
int nCommand = EM_DEVICE_CFG_TYPE.DEVICE_CFG_SOC_CONSTANT_LAMP; |
|
|
|
int nCommand = EM_DEVICE_CFG_TYPE.DEVICE_CFG_SOC_CONSTANT_LAMP; |
|
|
|
NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM cfgSupplementLightItem = getCfgSupplementLightItem(loginID,nCommand); |
|
|
|
NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM cfgSupplementLightItem = getCfgSupplementLightItem(loginID,nCommand); |
|
|
|
cfgSupplementLightItem.stSOCLamps[0].emMode = emMode; |
|
|
|
cfgSupplementLightItem.stSOCLamps[0].emMode = emMode; |
|
|
@ -3551,6 +3558,14 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
s.stuTimeSection[0].nEndHour= endHour; |
|
|
|
s.stuTimeSection[0].nEndHour= endHour; |
|
|
|
s.stuTimeSection[0].nEndMinute= endMinute; |
|
|
|
s.stuTimeSection[0].nEndMinute= endMinute; |
|
|
|
s.stuTimeSection[0].nEndSecond= endSecond; |
|
|
|
s.stuTimeSection[0].nEndSecond= endSecond; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s.stuTimeSection[1].bValue = (byte) 1; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nStartHour= startHour2; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nStartMinute= startMinute2; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nStartSecond= startSecond2; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nEndHour= endHour2; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nEndMinute= endMinute2; |
|
|
|
|
|
|
|
s.stuTimeSection[1].nEndSecond= endSecond2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IntByReference inBufferSize = new IntByReference(0); |
|
|
|
IntByReference inBufferSize = new IntByReference(0); |
|
|
@ -3568,6 +3583,7 @@ public class run_device_cfg implements ActionListener, ListSelectionListener { |
|
|
|
6000); |
|
|
|
6000); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("set light config result = " + result); |
|
|
|
System.out.println("set light config result = " + result); |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|