LIB define DDE inside a lib

Hello,
is it intended to define the myDDE inside myLib an use this DDE via my application when I import myLib to this application.
If I could do so, I could define only one DDE which is cmcompatible to all my applcations and I have not to define one DDE for each application. So I get not so much redundant code.
How can I build such a hierarchy?

Kind regards,
Marcel

Hello @mklueh

currently it is not possible to obtain the complete data descriptor or parts of it directly from a library.

However, you could achieve your goal as follows:

  • You create a data descriptor and use the variables it contains in your library as if the data descriptor were in the main.dde file.

  • You copy the created data descriptor as a code snippet into the help. Similar to what we did for the “RS485 interface Config” in the modbus-master-mt library

  • Whenever you create an IoT app in which you use your Library, you use the Copy icon to copy the code snippet with the Data Descriptor to the clipboard and then paste it into the main.dde file.

  • If you need additional fields in the Data Descriptor in the IoT app, you can simply append them to the Data Descriptor after inserting the code snippet

Kind regards
MicrotronicsEngineering

Hello,
thank you for the explanation.

If I understand it correctly, the DDE of a LIB cannot be accessed from the APP so far.
Does that mean at the same time that the uplink-Lib does not work within a LIB either,
insofar as I want to reach the DDE from the APP via the uplink-Lib?

Kind regards,
Marcel

Hello @mklueh

I hope I understood the question correctly. It is quite possible to use the functions of the uplink lib in other libraries. It is also possible to use the variables defined in the DDE within a library, but they must then be named the same in every APP that integrates the library. To ensure this, I also gave the tip in the previous post with the integration of the expected DDE as a suggestion in the help of the library.

Kind regards
MicrotronicsEngineering