我无法连接我的设备。你能说我的js代码有什么问题吗?
var ctypes = require('ctypes');
var lib = ctypes.open("./_RC_UTIL.dll");
var msgBox = lib.declare("__Show_Error_Message",ctypes.default_abi, ctypes.voidptr_t, ctypes.int);
var getStatus = lib.declare("__Get_Status",ctypes.default_abi,ctypes.int,ctypes.uint32_t,ctypes.uint32_t,ctypes.uint32_t,ctypes.uint16_t,ctypes.bool);
var deviceSerial=210551803;
var devicePass=2724104912;
var deviceIpInt=3232235816;
var deviceIpStr="192.168.1.40";
var devicePort=5522;
var ipInt = msgBox(getStatus(deviceSerial,devicePass,deviceIpInt,devicePort,true));
var ipStr = msgBox(getStatus(deviceSerial,devicePass,deviceIpStr,devicePort,true));
lib.close();
这是我的设备SDK信息:
_int __Get_Status ( DWORD deviceSerialNo, DWORD password, DWORD ip, WORD port,
bool task, void *status )
您可以获得一般设备状态。此功能是基本功能。
此功能的答案包括许多重要值。
(时间,输入引脚状态,中继引脚状态,记录计数,RGB led状态...)
[Parameter]
[ DWORD deviceSerialNo ] Serial no of target device.
[ DWORD password ] Password of target device.
[ DWORD ip ] IP address of target device.
[ WORD port ] PORT of target device.
[ bool task ] Default is false. True value will be explained in 'Online mode functions'.
[ void *status ] Struct pointer for answer.
_H_status struct is defined in '_RC_SDK.h' file.
[Return Value]
0 successful.
other fail ( for detail, call __Get_Error_Message or __Show_Error_Message functions )
[Related Function]
All functions