Link Search Menu Expand Document

Function Entity

Oct 12 2022 at 12:00 AM

  1. Description
  2. Configuration

Description

Function entities provide the user the ability to use the toolset of **Entity Functions to transform any data or provide a different logic-based output, ie: Performing a mathematical sum on a set of data, outputting a TRUE or FALSE depending on a logical check, or just simply scaling a value.

Configuration

Select the “Entity Functions” option, and a window that allows you to create a new entity is displayed. When you have given the entity a name, click on the “Save And Close” button, and the new Entity Function will be created under the specified parent in the entity tree. Clip 1 below demonstrates how an Entity Function is created:

Clip 1: Create an Entity Function

After creating the Entity Function, you can select it and the “Entity Properties” are displayed on the right. Figure 1 below shows the properties you can set for the Entity Function:

Figure 1 - Entity Properties

  1. Entity ID - a unique identification assigned to the entity.
  2. Entity Type - this is the type of entity you created.
  3. Name - this field displays the name of the entity.
  4. Blueprint tags - apply blueprints from a list of those already on the tenant, or visualise if the entity has been tagged with a Blueprint.
  5. Description - a brief description of the entity.
  6. Value timeout (minutes) - shows you that data has timed out or your site is not working. It checks the timestamp, if the timestamp is older than the timeout value set then the data is considered to be timed out, which means that the data is no longer coming in from your device.
  7. Enabled - this toggle allows you to define whether the function should calculate (enabled) or if it should be dormant (disabled). If you leave it as disabled, it’s going to keep showing you lost values because it’s not actually computing.
  8. Last value - this is the value returned after the Entity Function has completed building the logic required by your enterprise.
  9. Edit function - a button that allows you to navigate to the build window where you can build the logic required.

The Entity Function can be edited by clicking the “Edit function” button within the entity properties. A build window will open, containing all the Entity Functions and toolsets you can use to build the logic required for that function. The Clip 2 below shows how you navigate to the build window to edit the Entity Function:

Clip 2: Edit an Entity Functions

The build window for a function and/or trigger uses the drag and drop methodology in order for the user to build the logic required with the toolsets provided (on the left hand side of the build window), as well as the ability to drag entities from the Entity Tree (on the right hand side of the build window). See a demonstration in Clip 3 below:

Clip 3: Configure an Entity Function

Once you have built the logic required using the toolsets provided, Enable the function, click the “Save and close ” button to successfully update the Entity Function and exit the build window.

You can successfully update an Entity Function without closing the build window by clicking the “Save” button. This allows you to continue working on this window.

To exit the build window and navigate back to the “Entity Properties” window, click on the “Discard” button. This will Discard any changes made within the function since last saved.

If the “Enabled” toggle displays “Yes” the function will calculate, and if it displays “No” it means that the function is dormant, therefore it will not calculate.


The above mentioned buttons as well as the Enable toggle are highlighted in Figure 2 below:

Figure 2 – Function Settings