Link system
The MindDev link system allows nodes to be connected to each other, even if they are located far apart in the protocol tree.
These links are created by the code and cannot be modified. Furthermore, only certain nodes provide link areas.
Links are entities required for the proper functioning of the node to which they are attached. They are used internally within the code and may relate to completely different functional aspects.
Link in a Node
When a link is available in a node, it is often necessary to specify the linked entity.
Links are an integral part of the node’s code and must not remain empty.
Empty Link
When a link is empty, it is highly likely that the node will not behave as expected.
Creating a link between entities
Creating a link between two entities in MindDev is done easily using drag-and-drop.
From the protocol tree, simply drag the node to be linked into the corresponding link area.
Unable to create a link
To minimize linking errors, links have an invisible type constraint.
For a given link, the type of node that can be connected may be very restricted.
MindDev automatically prevents any link that does not comply with this type constraint.
Deletion and visualization
Each link area provides two buttons allowing:
- Visualization of the linked node
- Deletion of the link
A simple click on the visualization button highlights the linked node.
The delete button removes the link without deleting either of the two linked nodes.
Deleting a Linked Node
When deleting a node, MindDev first checks whether this node, or any node in its hierarchy, is used outside of that hierarchy.
If so, a confirmation message is displayed.
Calculation Links
A specific category of links is called Calculation Links. These links are, in a way, tripartite links.
Indeed, the connection must be established between the current node and a calculation entity. This calculation entity can itself be linked to another entity that provides the data required to perform its computation.
A calculation entity is responsible for computing a numerical value based on the environment (for example, the average trial duration from the previous experiment).
The computed value is then used by the current node to modify its behavior (for example, defining a maximum trial duration based on the average duration of the previous experiment).