Node.js Integration for Advantech IIoT platform function.
Notice that an Advantech IIoT Platform SDK have to be installed to make this node works correctly. Advantech IIoT Platform SDK download link is shown below:
Windows: https://github.com/Advantech-IIoT/Platform-SDK/tree/master/windows/bin
Linux: https://github.com/Advantech-IIoT/Platform-SDK/tree/master/linux/bin
Use npm command to install this package locally in the Node-RED modules directory
npm install node-atplatform
or install it globally with the command
npm install node-atplatform -g
Platform package provides the following functions:
- Get Module ID
- Get BIOS version
- Get EC version
- Get OS version
- Get CPU model name
- Get COM ports
- Get Memory available
- Get Disk information
Please refer to demo.js
.
All these examples are started with:
var platform = require('node-atplatform');
Print platform module ID
console.log(platform.hwmonGetInfo(platform.TOPIC_MODULE_ID));
Print BIOS version
console.log(platform.hwmonGetInfo(platform.TOPIC_BIOS_VER));
Print EC version
console.log(platform.hwmonGetInfo(platform.TOPIC_EC_VER));
Print OS version
console.log(platform.hwmonGetInfo(platform.TOPIC_OS_VER));
Print CPU model name
console.log(platform.hwmonGetInfo(platform.TOPIC_CPU_NAME));
Print all COM ports
console.log(platform.hwmonGetInfo(platform.TOPIC_COM_PORTS));
Print available memory
console.log(platform.hwmonGetInfo(platform.TOPIC_MEM_AVAIL));
Print disk information
console.log(platform.hwmonGetInfo(platform.TOPIC_DISK_INFO));
Print all platform information
console.log(platform.hwmonGetInfo(platform.TOPIC_ALL));
- Windows 10 Enterprise LTSB with node.js 18.14.1
- 3.0.1 - June 2023 : update for NODE_MODULE_VERSION=108 (C++ addons use Node-API)
- 2.0.0 - November 2019 : update for NODE_MODULE_VERSION=64 (C++ addons use Native Abstractions for Node.js)
- 0.0.1 - March 2018 : Initial Release
Copyright 2023 ADVANTECH Corp. under the Apache 2.0 license.