|
|
|
@ -40,6 +40,7 @@ import sdk.java.lib.netmanager.NetDefs;
@@ -40,6 +40,7 @@ import sdk.java.lib.netmanager.NetDefs;
|
|
|
|
|
import sdk.java.lib.netmanager.NetLib; |
|
|
|
|
import sdk.java.lib.netmanager.NetEnums.EM_DEVICE_CFG_TYPE; |
|
|
|
|
import sdk.java.lib.netmanager.NetEnums.EM_WHITE_BALANCE; |
|
|
|
|
import sdk.java.lib.netmanager.NetStructs; |
|
|
|
|
import sdk.java.lib.netmanager.NetStructs.STU_CFG_ALARM_IN_PARAM; |
|
|
|
|
import sdk.java.lib.netmanager.NetStructs.STU_CFG_ALARM_OUT_PARAM; |
|
|
|
|
import sdk.java.lib.netmanager.NetStructs.STU_CFG_ALARM_PARAM; |
|
|
|
@ -661,6 +662,9 @@ public class run_device_cfg implements ActionListener, ListSelectionListener {
@@ -661,6 +662,9 @@ public class run_device_cfg implements ActionListener, ListSelectionListener {
|
|
|
|
|
else if(EM_DEVICE_CFG_TYPE.DEVICE_CFG_ZK == command) |
|
|
|
|
{ |
|
|
|
|
stu = new STU_CFG_ZK_SERVICE(); |
|
|
|
|
}else if(EM_DEVICE_CFG_TYPE.DEVICE_CFG_SOC_CONSTANT_LAMP == command) |
|
|
|
|
{ |
|
|
|
|
stu = new NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return stu; |
|
|
|
@ -3517,6 +3521,40 @@ public class run_device_cfg implements ActionListener, ListSelectionListener {
@@ -3517,6 +3521,40 @@ public class run_device_cfg implements ActionListener, ListSelectionListener {
|
|
|
|
|
System.out.println("result = " + result); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void getLigntCfg(NativeLong loginID){ |
|
|
|
|
int nCommand = EM_DEVICE_CFG_TYPE.DEVICE_CFG_SOC_CONSTANT_LAMP; |
|
|
|
|
NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM cfgSupplementLightItem = getCfgSupplementLightItem(loginID,nCommand); |
|
|
|
|
System.out.println(JSON.toJSONString(cfgSupplementLightItem.stSOCLamps[0])); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM getCfgSupplementLightItem(NativeLong loginID, int nCommand){ |
|
|
|
|
|
|
|
|
|
IntByReference outBufferSize = new IntByReference(0); |
|
|
|
|
IntByReference nReturnSize = new IntByReference(0); |
|
|
|
|
Pointer ptrOutBuffer = initStuData(nCommand, outBufferSize); |
|
|
|
|
boolean bResult = NetLib.instance.Net_GetDeviceCfg( |
|
|
|
|
loginID, |
|
|
|
|
nCommand, |
|
|
|
|
0, |
|
|
|
|
ptrOutBuffer, |
|
|
|
|
outBufferSize.getValue(), |
|
|
|
|
nReturnSize, |
|
|
|
|
6000); |
|
|
|
|
|
|
|
|
|
if(!bResult) |
|
|
|
|
{ |
|
|
|
|
int error = NetLib.instance.Net_LastError(); |
|
|
|
|
String strError = String.format("Net_GetDeviceCfg fail, command = %d, errorCode = %d", nCommand, error); |
|
|
|
|
System.out.println(strError); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM cfg = new NetStructs.STU_CFG_SOC_CONSTANT_LAMP_PARAM(); |
|
|
|
|
DataUtils.sdk_data_ptrToStructure(ptrOutBuffer, cfg); |
|
|
|
|
|
|
|
|
|
return cfg; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @param bRealtimeEnable 使能 0-否 1-是 |
|
|
|
|