Class WinccoaCnsTreeNode

CNS Tree Node for a CNS tree.

Constructors

Properties

Constructors

  • Constructor.

    Parameters

    • name: string

      Name as string

    • displayName: unknown = ''

      Display name of the new node as multi-language string.

    • dp: 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.

    • Optionalchildren: WinccoaCnsTreeNode[]

      Optional children which define subtree of the current tree node.

    Returns WinccoaCnsTreeNode

    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);
    }
    }

Properties

children?: WinccoaCnsTreeNode[]

Optional children which define subtree of the current tree node.

displayName: unknown = ''

Display name of the new node as multi-language string.

dp: 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: string

Name as string