NodeJS OPC UA 客户端 - 构造扩展对象

问题描述 投票:0回答:0

我正在尝试与实现 OPC-UA 服务器的 RFID 阅读器连接。

我正在尝试调用方法 ScanStart,它具有扩展对象的输入参数

async  StartScan(aduration: number, acycles: number, adataAvailable: boolean){
        
        const scanSettingsParams = {
            duration : aduration,
            cycles : acycles,
            dataAvailable : adataAvailable,
            locationType: 0
        }
        
        try {
            // NodeID for InputArguments struct type (inherits from ScanSettings)
            const nodeID = new NodeId(NodeIdType.NUMERIC, 3010, 3);
            // Create ExtensionObject for InputArguments
            const scanSettingsObj = await this.session.constructExtensionObject(nodeID, scanSettingsParams);
...
                

运行后,控制台有来自populate_data_type_manager的警告。执行 constructExtensionObject 方法时打印警告:

07:34:50.171Z :populate_data_type_manager_104:67    Error Error:  Cannot find dataType Definition ! with nodeId =ns=2;i=6522
 ...                                                    at C:\Development\Projects\sample_client_ts\node_modules\node-opcua-client-dynamic-extension-object\source\private\populate_data_type_manager_104.ts:46:19
 ...                                                    at Generator.next (<anonymous>)
 ...                                                    at fulfilled (C:\Development\Projects\sample_client_ts\node_modules\node-opcua-client-dynamic-extension-object\dist\private\populate_data_type_manager_104.js:5:58)
 ...                                                    at processTicksAndRejections (node:internal/process/task_queues:96:5)

有人知道我如何摆脱警告以及如何以正确的方式构造 ExtensionObject 吗?

node.js rfid node-opcua
© www.soinside.com 2019 - 2024. All rights reserved.