PDI supports calling libraries from the specification tree instead of from the code. Each library call described in the specification tree relies on:
The specification tree is a file written in the YAML format and provided to PDI at initialization. The specification tree is the place where one defines which plugins to load in order to access libraries, and what library calls to make.
The data store handles data transfer between the code and libraries.
Data transfer is the action of making data available to another part of the code. For example, in a function call the list of parameters determines data transfer.
In PDI, the store offers this service. The store is a set of references where each reference is made of:
Buffers referenced in the store are available for access from the libraries. On can use them from the specification tree.
While the data store handles data transfer between the simulation code and libraries, the event system handles control transfer. Control transfer is the action of passing the CPU control to another part of the code. For example, a function call is a way to transfer control, creating a thread is another way.
In PDI, this is handled by events that are emitted:
Libraries can be notified when an event is emitted and take action at that time. Control transfer in PDI is synchronous (same as a function call), but plugins can choose to implement any other behavior on top of that such as the creation of a thread for asynchronous execution for example.