Constructor.
Name as string
Display name of the new node as multi-language string.
The data point (element) which is linked to the node as string. If no data point shall be linked an empty string can be defined.
Optional
children: WinccoaCnsTreeNode[]Optional children which define subtree of the current tree node.
import { WinccoaManager, WinccoaCnsTreeNode } from 'winccoa-manager';
const winccoa = new WinccoaManager();
async function test() {
const tree = new WinccoaCnsTreeNode('CarTree', {'en': 'Car', 'de': 'Auto'}, '', [
new WinccoaCnsTreeNode('B', 'B', '', [
new WinccoaCnsTreeNode('dp', 'ExampleDP_Rpt1', 'System1:ExampleDP_Rpt1.')
]),
new WinccoaCnsTreeNode('C')
]);
try {
await winccoa.cnsAddTree('System1.View1', tree);
} catch(exc) {
console.error(exc);
}
}
Optional
childrenOptional children which define subtree of the current tree node.
Display name of the new node as multi-language string.
The data point (element) which is linked to the node as string. If no data point shall be linked an empty string can be defined.
Name as string
CNS Tree Node for a CNS tree.