CA UIM NodeJS interface to work with pu.exe in a full async way.
Warning : This module spawn new node processes, so it will break if you try to parralelize to much things!
const nodeuim = require('nodeuim');
const request = nodeuim.Request({
path: "E:/Nimsoft/bin/pu.exe",
login: "administrator",
password: "NimSoft!01"
});
async function main() {
const PDS = await request({
callback: 'getrobots',
timeout: 1500,
args: new nodeuim.PDS(void 0, void 0)
});
for(const robot of PDS.get('robotlist')) {
console.log(`robotName => ${robot.name}`);
}
}
main().catch(console.error);
- NodeJS 7.7.0 or higher
npm install nodeuim [--save]
Find API & Documentations on the wiki page - Here
- implement nimAlarm
- implement argMap class
- add PDS_VOID type to stdout parsing
- add non-regex elements key(s)/value(s) from stdout parsing.
- add "toObject" method and rename PDS.parse to "toMap"