• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - Sequencer
  • DataNodes Block

DataNodes Block

Introduction

The DataNodes block, a key component within the Sequencer module, serves as a powerful tool for translating dynamic message event data into structured, navigable data formats, such as trees or lists. This transformation is fundamental in scenarios where event-driven data needs to be organized, visualized, and interacted with in a coherent and user-friendly manner.

Usage

DataNodes is primarily employed to handle and organize complex data structures dynamically within a CDP application. Its key functionalities include:

  • Creation: It allows for the construction of hierarchical or flat data nodes, building a structured framework from incoming data streams.
  • Updating: DataNodes can update existing nodes with new information as it becomes available, ensuring that the data structure stays current and relevant.
  • Deletion: It offers the capability to remove nodes that are no longer needed, maintaining the cleanliness and efficiency of the data structure.

This approach enables applications to not only display data in a user-friendly and navigable format but also react to changes in real-time. Whether it's reflecting updates from a live data feed, user interactions, or other sources, DataNodes ensures that the data structure remains dynamic, responsive, and reflective of the current state of information.

Configuration

Configuring the DataNodes block involves setting property values for node management and configuring event properties to suit specific operational requirements. This process tailors the block's behavior to fit the dynamic data handling needs of a CDP application:

  • Property Configuration: Adjusting properties like NodeUnique, NodeValues to define how nodes are structured, displayed, and maintained.
  • Event Configuration: Setting up events such as Init, Add, Update, and Remove to determine how the block reacts to different operations, thereby managing the lifecycle of data nodes within the application.

Through this configuration, DataNodes can be finely tuned to reflect the structure and behavior desired for the data it manages, ensuring that it aligns with the specific use case and interaction patterns of the application.

Properties

PropertyDescription
NodeUniqueDefines unique names for data nodes based on child argument values.
LevelSeparatorsCharacters in NodeUnique values for creating tree structure levels.
NodeValuesChild arguments represented as values on data nodes.
ReaddUpdatesDetermines if re-adding a node updates it or adds a new unique node.
IndexValueSelect the child argument of the DataNode that should act as an auto-generated index for the child nodes being added. Note: All child nodes will automatically include this index. If a child node's index value is updated to match an existing node's index, the node will be reordered, and the values specified in ReorderReplicates will be replicated from the existing node at the specified index into the moved node.
ReorderReplicatesWhen node value selected in IndexValue is changed to some other existing index value, values listed in ReorderReplicates will be replicated from the existing node at set index value (when present) to reordered node.

Events

EventDescription
Init and InitedInitializes DataNodes, removing all current data nodes, when done emits Inited.
Add and AddedAdds a new node or updates an existing one if ReaddUpdates is true, emits Added when add is done or Updated when update is done.
Update and UpdatedUpdates an existing data node with new values, emits Updated when done.
Remove and RemovedRemoves an existing data node, emits Removed when done.
Iterate, Iterator, IteratedStarts iteration of all the NodeData nodes in the DataNodes structure, emits Iterator for every NodeData node, when done emits Iterated.
ChangedEmitted when NodeData is changed by somehting else than Update message, for example by user from HMI.
ReorderedEmitted when a DataNode is moved to a new position in the DataNodes structure.

Use Case: Displaying Database Query Results

Scenario

Consider a database with customer information that you want to display in a UI. The database holds details like names, emails, and purchase histories. The goal is to create an interface for selecting customers to view their details.

Solution

Use the DataNodes block to dynamically represent customer data. Each customer's information forms a separate node. As customers are added or updated in the database, DataNodes reflects these changes in real-time.

The DBQuery block fetches data from the database. For each query execution, DBQuery's Row event sends data to DataNodes' Add event for node population.

Integration with NodeTable and NodeList Widgets

NodeTable and NodeList widgets in the CDP framework visualize data nodes from DataNodes. These widgets automatically reflect DataNodes' structure, offering a dynamic UI.

Workflow

  1. DBQuery executes a SQL query for customer data.
  2. Each fetched row emits DBQuery's Row event.
  3. Row event data is sent to DataNodes' Add event for node updates.
  4. NodeTable or NodeList widgets connected to DataNodes update to show the current customer data node structure.
  5. Users interact with these widgets for detailed customer information.

Benefits

This use case combines DataNodes' dynamic data handling with the visualization capabilities of CDP's NodeTable and NodeList widgets. It offers an efficient, user-friendly way to manage and display data structures in real-time, enhancing CDP applications' interactivity and responsiveness.

See also EventIn, EventOut, and Service Blocks.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top