Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

These functions can be used to create user-defined Server Items (also referred to as Custom Items). These Custom Items can be organized in a user-defined hierarchy that is integrated into the Server Item Tree. Using custom items provides the most flexible way to add control functionality – they can be used the same way as real Server Items. The only difference is that they are only available in the server's virtual data model – there is no physical datapoint that is connected to it. Therefore, Custom Items can be seen as virtual datapoints.

Note that Custom Items can only be create and deleted during server start up (e.g. within the "OnInitEvent" callback).

Description

Signature

string nxa.AddCustomItem (string, string, nxa.access, nxa.type, string, string, string, ..., string)

This function adds a new Custom Item during the initialization phase of the server and returns its ID. In general, this function shall be used within the "OnInitEvent" callback only.

Parameters

...

Return

...

Example: nxa.AddCustomItem( "TestItem", "my test item description", nxa.access.All, nxa.type.Real, "/", "MySubDir", "MySubDir2") This will create a Custom Item called "TestItem" within the Server Item Tree under the sub tree "Custom/MySubDir/MySubDir2". Thus, the itemID of the new Custom Item is "Custom/MySubDir/MySubdir2/TestItem".

Description

Signature

string nxa.AddExtCustomItem (string, string, nxa.access, nxa.type, bool, bool, bool, string, string, string, ..., string)

This function adds a new Custom Item during the initialization phase of the server and returns its ID. In general, this function shall be used within the "OnInitEvent" callback only. Compared to the function "nxa.AddCustomI the flags for "Persistent", "Historical", and "Synchronziation" can also be set.

Parameters

...

Return

...

Description

Signature

string nxa.AddSysCustomItem (string, string, nxa.access, nxa.type, string, number, number, string, string, string, ..., string)

This function adds a new System Custom Item during the initialization phase of the server and returns its ID. Compared to a normal custom item, a system custom item can be placed anywhere in the item tree. In general, this function shall be used within the "OnInitEvent" callback only.

Parameters

...

Return

...

Description

Signature

string nxa.AddExtSysCustomItem (string, string, nxa.access, nxa.type, bool, bool, bool, string, number, number, string, string, string, ..., string)

This function adds a new System Custom Item during the initialization phase of the server and returns its ID. Compared to a normal custom item, a system custom item can be placed anywhere in the item tree. In general, this function shall be used within the "OnInitEvent" callback only. Compared to the function "nxa.AddSysCustomItem", the flags for "Persistent", "Historical", and "Synchronziation" can also be set.

Parameters

...

Return

...

Description

Signature

nxa.AddItemLink (string, string, number)

This function links a source item to a destination item. This means that the value of the source item will be forwarded to the destination item.

Parameters

...

Return

None.

Description

Signature

nxa.AddDirectLink (string, string)

This function directly links a source item to a destination item. This means that the value of the source item will be forwarded to the destination item. Compared to "'nxa.AddItemLink"', loops are detected.

Parameters

...

Return

None.

Description

Signature

nxa.RemoveDirectLink (string, string)

This function removes a direct link again.

Parameters

...

Return

None.

Description

Signature

nxa.AddDirectBiLink (string, string)

This function bi-directly links a source item to a destination item. This means that the value of the source item will be forwarded to the destination item and vice versa. Compared to "'nxa.AddItemLink"', loops are detected.

Parameters

...

Return

None.

Description

Signature

nxa.RemoveDirectBiLink (string, string)

This function removes a bi-directional link again.

Parameters

...

Return

None.

Description

Signature

nxa.AddItemEvent (string, bool, bool, bool, number, string)

This function adds a new event that is triggered whenever the given item changes.

Parameters

...

Return

None.

Description

Signature

number nxa.AddItemTemplate ()

This function creates a new template for Custom Items and adds it to the template list inside the server.

Parameters

None.

Return

...

Description

Signature

nxa.AddPropertyTemplate (number, number, string, nxa.type, variant)

This function can be used to add a property to an item template. The template has to be created with "nxa.AddItemTemplate" before.

Parameters

...

Return

None.

Description

Signature

nxa.AttachTemplate (string, number)

This function assigns a template to a Custom Item.

Parameters

...

Return

None.

Description

Signature

nxa.DetachTemplate (string)

This function detaches a template again.

Parameters

...

Return

None.