From f0b769fa29833f7db6dd846934393698a1bd9074 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 31 Jan 2024 22:54:45 +0300 Subject: [PATCH 01/50] "New Library" button --- .../org.fbme.ide.richediting.plugin.mps | 33 +++++++++++++++++++ .../richediting/actions/NewLibraryAction.kt | 11 +++++++ .../src/main/resources/META-INF/plugin.xml | 4 +++ 3 files changed, 48 insertions(+) create mode 100644 code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt diff --git a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps index f9cc459f5..6a6446b37 100644 --- a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps +++ b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps @@ -51,6 +51,7 @@ + @@ -58,6 +59,7 @@ + @@ -3755,5 +3757,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt new file mode 100644 index 000000000..2702415df --- /dev/null +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -0,0 +1,11 @@ +package org.fbme.ide.richediting.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent + +class NewLibraryAction : AnAction() { + + override fun actionPerformed(event: AnActionEvent) { + } + +} diff --git a/code/richediting/src/main/resources/META-INF/plugin.xml b/code/richediting/src/main/resources/META-INF/plugin.xml index 561b0538d..07d3b7fe2 100644 --- a/code/richediting/src/main/resources/META-INF/plugin.xml +++ b/code/richediting/src/main/resources/META-INF/plugin.xml @@ -15,6 +15,10 @@ + + Date: Thu, 1 Feb 2024 15:52:45 +0300 Subject: [PATCH 02/50] "New Library" button actionPerformed implementation --- .../richediting/actions/NewLibraryAction.kt | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 2702415df..3c8ba7a9c 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -2,10 +2,52 @@ package org.fbme.ide.richediting.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil +import jetbrains.mps.ide.projectPane.ProjectPane +import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel +import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog +import jetbrains.mps.project.MPSExtentions +import jetbrains.mps.project.Solution +import jetbrains.mps.workbench.MPSDataKeys class NewLibraryAction : AnAction() { override fun actionPerformed(event: AnActionEvent) { + val mpsProject = event.getData(MPSCommonDataKeys.MPS_PROJECT) + val virtualFolder = event.getData(MPSDataKeys.NAMESPACE) + val cfg = + NameLocationPanel(NewModuleDialog.projectHome(mpsProject!!), "Solution name:", "Solution file location:") + cfg.withDefaults("NewSolution", "solutions") + val dialog = NewModuleDialog(mpsProject, cfg) + dialog.withCheck { + NewModuleUtil.check( + mpsProject, + MPSExtentions.DOT_SOLUTION, + cfg.moduleName, + cfg.moduleLocation.absolutePath + ) + } + dialog.withFactory { + val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) + mpsProject.setVirtualFolder(result, virtualFolder) + mpsProject.save() + result + } + + dialog.title = "New Solution" + dialog.show() + if (!dialog.isOK) { + return + } + + val solution = dialog.result ?: return + + // TODO: Sync ProjectPane.rebuildTree() with NewSolution, CloneModule actions + + // TODO: Sync ProjectPane.rebuildTree() with NewSolution, CloneModule actions + val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) + projectPane.selectModule(solution, false) } } From f29e8df1d6335209be3fd73c55c6c6c3f82be4a1 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 14 Feb 2024 12:34:57 +0300 Subject: [PATCH 03/50] Import created library model to all models in project when creating a library --- .../richediting/actions/NewLibraryAction.kt | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 3c8ba7a9c..f22d0c362 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -2,20 +2,30 @@ package org.fbme.ide.richediting.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.project.modifyModules import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.ide.projectPane.ProjectPane import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog +import jetbrains.mps.openapi.navigation.NavigationSupport +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.MPSExtentions import jetbrains.mps.project.Solution +import jetbrains.mps.smodel.ModelImports import jetbrains.mps.workbench.MPSDataKeys +import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.persistence.Iec61499ModelFactory +import org.fbme.ide.platform.projectWizard.LibraryTemplate +import org.jetbrains.mps.openapi.model.SModel +import org.jetbrains.mps.openapi.model.SModelName class NewLibraryAction : AnAction() { override fun actionPerformed(event: AnActionEvent) { val mpsProject = event.getData(MPSCommonDataKeys.MPS_PROJECT) - val virtualFolder = event.getData(MPSDataKeys.NAMESPACE) +// val virtualFolder = event.getData(MPSDataKeys.NAMESPACE) val cfg = NameLocationPanel(NewModuleDialog.projectHome(mpsProject!!), "Solution name:", "Solution file location:") cfg.withDefaults("NewSolution", "solutions") @@ -28,14 +38,35 @@ class NewLibraryAction : AnAction() { cfg.moduleLocation.absolutePath ) } + + var model: SModel? = null + dialog.withFactory { val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) - mpsProject.setVirtualFolder(result, virtualFolder) +// mpsProject.setVirtualFolder(result, virtualFolder) + val root = result.modelRoots.iterator().next() as DefaultModelRoot + model = try { + val fullModelName = "NewLibrary@content" + root.createModel(SModelName(fullModelName), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE) + } catch (e: ModelCannotBeCreatedException) { + throw RuntimeException("Model can not be created", e) + } + val repository = PlatformRepositoryProvider.getInstance(mpsProject) + val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) +// model.module.declaredDependencies + mpsProject.repository.modelAccess.runReadInEDT { + val navigationSupport = NavigationSupport.getInstance() + navigationSupport.openNode(mpsProject, initialElement.node, true, false) + navigationSupport.selectInTree(mpsProject, initialElement.node, false) + } + mpsProject.save() result } - dialog.title = "New Solution" + + + dialog.title = "New Library" dialog.show() if (!dialog.isOK) { return @@ -48,6 +79,12 @@ class NewLibraryAction : AnAction() { // TODO: Sync ProjectPane.rebuildTree() with NewSolution, CloneModule actions val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) + + mpsProject.repository.modules.forEach { + it.models.forEach { + ModelImports(it).addModelImport(model!!.reference) + } + } } } From 8fa3c606e919481570b8776cb3d5307bf0c99dfb Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 15 Feb 2024 12:24:35 +0300 Subject: [PATCH 04/50] Add model import via model access --- .../org/fbme/ide/richediting/actions/NewLibraryAction.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index f22d0c362..e88d2f0cd 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -80,9 +80,11 @@ class NewLibraryAction : AnAction() { val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) - mpsProject.repository.modules.forEach { - it.models.forEach { - ModelImports(it).addModelImport(model!!.reference) + mpsProject.modelAccess.runWriteAction { + mpsProject.repository.modules.forEach { it -> + it.models.forEach { + ModelImports(it).addModelImport(model!!.reference) + } } } } From 1dad0570780ff39da5f4f31e917b54792cb90d0d Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 15 Feb 2024 18:31:35 +0300 Subject: [PATCH 05/50] Trying to properly import model --- .../richediting/actions/NewLibraryAction.kt | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index e88d2f0cd..1bc5108d2 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -12,6 +12,7 @@ import jetbrains.mps.openapi.navigation.NavigationSupport import jetbrains.mps.persistence.DefaultModelRoot import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.MPSExtentions +import jetbrains.mps.project.ModelImporter import jetbrains.mps.project.Solution import jetbrains.mps.smodel.ModelImports import jetbrains.mps.workbench.MPSDataKeys @@ -80,13 +81,27 @@ class NewLibraryAction : AnAction() { val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) - mpsProject.modelAccess.runWriteAction { - mpsProject.repository.modules.forEach { it -> - it.models.forEach { - ModelImports(it).addModelImport(model!!.reference) + + val models: ArrayList = ArrayList() + mpsProject.modelAccess.runReadAction { + mpsProject.repository.modules.forEach { module -> + + module.models.forEach { +// ModelImports(it).addModelImport(model!!.reference) + val modelImporter = ModelImporter(it) + modelImporter.prepare(model!!.reference) + models.add(modelImporter) } } } + + mpsProject.modelAccess.runWriteAction { + for (curModel in models){ + curModel.execute() + } + } + + } } From a56df69c0ce97f92d63dbeb990ec3eb044807e84 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 16 Feb 2024 10:21:40 +0300 Subject: [PATCH 06/50] Another try to properly import the library model --- .../ide/richediting/actions/NewLibraryAction.kt | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 1bc5108d2..87477b052 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -81,27 +81,17 @@ class NewLibraryAction : AnAction() { val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) - - val models: ArrayList = ArrayList() - mpsProject.modelAccess.runReadAction { + mpsProject.modelAccess.runWriteAction { mpsProject.repository.modules.forEach { module -> - module.models.forEach { -// ModelImports(it).addModelImport(model!!.reference) val modelImporter = ModelImporter(it) modelImporter.prepare(model!!.reference) - models.add(modelImporter) + modelImporter.execute() } } } - mpsProject.modelAccess.runWriteAction { - for (curModel in models){ - curModel.execute() - } - } - - + } } From 58fa46b69cbcb453498e49d3ffc17bd73937efba Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 16 Feb 2024 12:15:50 +0300 Subject: [PATCH 07/50] Importing library model and module properly but with a crutch --- .../ide/richediting/actions/NewLibraryAction.kt | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 87477b052..bafd906ff 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -21,6 +21,7 @@ import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.projectWizard.LibraryTemplate import org.jetbrains.mps.openapi.model.SModel import org.jetbrains.mps.openapi.model.SModelName +import org.jetbrains.uast.util.isInstanceOf class NewLibraryAction : AnAction() { @@ -83,15 +84,19 @@ class NewLibraryAction : AnAction() { mpsProject.modelAccess.runWriteAction { mpsProject.repository.modules.forEach { module -> - module.models.forEach { - val modelImporter = ModelImporter(it) - modelImporter.prepare(model!!.reference) - modelImporter.execute() + if (module.moduleName != null) { + if (module.moduleName!!.contains("org.fbme")) { + module.models.forEach { + val modelImporter = ModelImporter(it) + modelImporter.prepare(model!!.reference) + modelImporter.execute() + } + } } } } - + } } From fc044afe782e83e4d0798e8ed8184fe44cd97a66 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 19 Feb 2024 12:36:29 +0300 Subject: [PATCH 08/50] removing crutch --- .../ide/richediting/actions/NewLibraryAction.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index bafd906ff..d57cebb95 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -82,7 +82,9 @@ class NewLibraryAction : AnAction() { val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) - mpsProject.modelAccess.runWriteAction { + /*mpsProject.modelAccess.runWriteAction { + + // TODO: use mpsProject.projectModules instead mpsProject.repository.modules.forEach { module -> if (module.moduleName != null) { if (module.moduleName!!.contains("org.fbme")) { @@ -94,6 +96,16 @@ class NewLibraryAction : AnAction() { } } } + }*/ + + mpsProject.modelAccess.runWriteAction { + mpsProject.projectModules.forEach { module -> + module.models.forEach { + val modelImporter = ModelImporter(it) + modelImporter.prepare(model!!.reference) + modelImporter.execute() + } + } } From 162a37e38ddae9ca3fe8868c3931145ec06a33f8 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 19 Feb 2024 14:17:41 +0300 Subject: [PATCH 09/50] smth --- .../kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index d57cebb95..ea43f332c 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -100,6 +100,7 @@ class NewLibraryAction : AnAction() { mpsProject.modelAccess.runWriteAction { mpsProject.projectModules.forEach { module -> +// TODO: import created module&model only to module/models with specific facet module.models.forEach { val modelImporter = ModelImporter(it) modelImporter.prepare(model!!.reference) From c7510cdeccc839bb17e1d4e42ee22e9164bf7431 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 23 Feb 2024 13:06:20 +0300 Subject: [PATCH 10/50] tried to create custom facet --- .../org/fbme/ide/richediting/CustomFacet.java | 14 +++++++++++ .../ide/richediting/CustomFacetFactory.java | 24 +++++++++++++++++++ .../richediting/actions/NewLibraryAction.kt | 18 +++++++------- 3 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java create mode 100644 code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java new file mode 100644 index 000000000..11a1ddd64 --- /dev/null +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java @@ -0,0 +1,14 @@ +package org.fbme.ide.richediting; + +import jetbrains.mps.extapi.module.ModuleFacetBase; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.module.SModule; + +public class CustomFacet extends ModuleFacetBase { + + private static final String FACET_TYPE = "library"; + + protected CustomFacet(@NotNull SModule module) { + super(FACET_TYPE, module); + } +} diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java new file mode 100644 index 000000000..44c68a096 --- /dev/null +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java @@ -0,0 +1,24 @@ +package org.fbme.ide.richediting; + +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.module.FacetsFacade; +import org.jetbrains.mps.openapi.module.SModule; +import org.jetbrains.mps.openapi.module.SModuleFacet; + +public class CustomFacetFactory implements FacetsFacade.FacetFactory { + @Override + public boolean isApplicable(@NotNull SModule module) { + return FacetsFacade.FacetFactory.super.isApplicable(module); + } + + @Override + public SModuleFacet create(@NotNull SModule sModule) { + return new CustomFacet(sModule); + } + + @NotNull + @Override + public String getPresentation() { + return "Library"; + } +} diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index ea43f332c..61146e2d0 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -2,7 +2,6 @@ package org.fbme.ide.richediting.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.project.modifyModules import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.ide.projectPane.ProjectPane @@ -14,20 +13,16 @@ import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.MPSExtentions import jetbrains.mps.project.ModelImporter import jetbrains.mps.project.Solution -import jetbrains.mps.smodel.ModelImports -import jetbrains.mps.workbench.MPSDataKeys import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.projectWizard.LibraryTemplate import org.jetbrains.mps.openapi.model.SModel import org.jetbrains.mps.openapi.model.SModelName -import org.jetbrains.uast.util.isInstanceOf class NewLibraryAction : AnAction() { override fun actionPerformed(event: AnActionEvent) { val mpsProject = event.getData(MPSCommonDataKeys.MPS_PROJECT) -// val virtualFolder = event.getData(MPSDataKeys.NAMESPACE) val cfg = NameLocationPanel(NewModuleDialog.projectHome(mpsProject!!), "Solution name:", "Solution file location:") cfg.withDefaults("NewSolution", "solutions") @@ -62,6 +57,16 @@ class NewLibraryAction : AnAction() { navigationSupport.selectInTree(mpsProject, initialElement.node, false) } +// NOTE: companion object with JVMStatic field turns off the new lib button for some reason +// if (FacetsFacade.getInstance().getFacetFactory("library") == null) { +// FacetsFacade.getInstance().addFactory("library", customFacetFactory) +// } + +// val facetFactory = FacetsRegistry.getInstance().getFacetFactory("library") +// val libFacet = facetFactory!!.create(result) +// result.moduleDescriptor.addFacetDescriptor(libFacet) + + mpsProject.save() result } @@ -76,9 +81,6 @@ class NewLibraryAction : AnAction() { val solution = dialog.result ?: return - // TODO: Sync ProjectPane.rebuildTree() with NewSolution, CloneModule actions - - // TODO: Sync ProjectPane.rebuildTree() with NewSolution, CloneModule actions val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) From 399b3c7f2465a340f144e695674232210b23ad49 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 23 Feb 2024 16:22:37 +0300 Subject: [PATCH 11/50] added lib icon --- .../richediting/actions/NewLibraryAction.kt | 19 ------------------- .../src/main/resources/META-INF/plugin.xml | 4 +++- .../src/main/resources/icons/lib.svg | 1 + 3 files changed, 4 insertions(+), 20 deletions(-) create mode 100644 code/richediting/src/main/resources/icons/lib.svg diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 61146e2d0..9ec819e44 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -40,7 +40,6 @@ class NewLibraryAction : AnAction() { dialog.withFactory { val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) -// mpsProject.setVirtualFolder(result, virtualFolder) val root = result.modelRoots.iterator().next() as DefaultModelRoot model = try { val fullModelName = "NewLibrary@content" @@ -50,7 +49,6 @@ class NewLibraryAction : AnAction() { } val repository = PlatformRepositoryProvider.getInstance(mpsProject) val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) -// model.module.declaredDependencies mpsProject.repository.modelAccess.runReadInEDT { val navigationSupport = NavigationSupport.getInstance() navigationSupport.openNode(mpsProject, initialElement.node, true, false) @@ -66,7 +64,6 @@ class NewLibraryAction : AnAction() { // val libFacet = facetFactory!!.create(result) // result.moduleDescriptor.addFacetDescriptor(libFacet) - mpsProject.save() result } @@ -84,22 +81,6 @@ class NewLibraryAction : AnAction() { val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) projectPane.selectModule(solution, false) - /*mpsProject.modelAccess.runWriteAction { - - // TODO: use mpsProject.projectModules instead - mpsProject.repository.modules.forEach { module -> - if (module.moduleName != null) { - if (module.moduleName!!.contains("org.fbme")) { - module.models.forEach { - val modelImporter = ModelImporter(it) - modelImporter.prepare(model!!.reference) - modelImporter.execute() - } - } - } - } - }*/ - mpsProject.modelAccess.runWriteAction { mpsProject.projectModules.forEach { module -> // TODO: import created module&model only to module/models with specific facet diff --git a/code/richediting/src/main/resources/META-INF/plugin.xml b/code/richediting/src/main/resources/META-INF/plugin.xml index 07d3b7fe2..c10bc3a13 100644 --- a/code/richediting/src/main/resources/META-INF/plugin.xml +++ b/code/richediting/src/main/resources/META-INF/plugin.xml @@ -17,7 +17,9 @@ + text="New Library" + icon="/icons/lib.svg" + /> \ No newline at end of file From 98fd32124ee7e50e180bd69a30f5ef5f7bfb3d90 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 27 Feb 2024 12:54:00 +0300 Subject: [PATCH 12/50] Tried to add Runtime.Basev3.0.0.2 lib --- .mps/modules.xml | 1 + solutions/Runtime.Base/Runtime.Base.msd | 24 +++ .../Runtime.Base/models/NewLibrary/ADD.fbt | 33 +++ .../models/NewLibrary/ANAMATH.fbt | 48 +++++ .../Runtime.Base/models/NewLibrary/AND.fbt | 33 +++ .../models/NewLibrary/ANY2ANY.fbt | 33 +++ .../models/NewLibrary/BC_MODBUS.fbt | 72 +++++++ .../models/NewLibrary/BC_PROFIBUS.fbt | 63 ++++++ .../Runtime.Base/models/NewLibrary/BITMAN.fbt | 42 ++++ .../Runtime.Base/models/NewLibrary/BM_CAB.fbt | 76 +++++++ .../models/NewLibrary/BM_CIFXPB.fbt | 84 ++++++++ .../Runtime.Base/models/NewLibrary/BM_CUB.fbt | 99 +++++++++ .../models/NewLibrary/BM_DCSMINI.fbt | 66 ++++++ .../Runtime.Base/models/NewLibrary/BM_DLL.fbt | 85 ++++++++ .../models/NewLibrary/BM_ETHERCAT.fbt | 126 +++++++++++ .../models/NewLibrary/BM_FILE.fbt | 82 +++++++ .../models/NewLibrary/BM_MODBUS.fbt | 135 ++++++++++++ .../models/NewLibrary/BM_PROFIBUS.fbt | 71 ++++++ .../models/NewLibrary/BM_SIMBUS.fbt | 68 ++++++ .../models/NewLibrary/BROADCASTINFO.fbt | 33 +++ .../models/NewLibrary/BUSCOUPLER.fbt | 64 ++++++ .../models/NewLibrary/BUSDEVICE.fbt | 66 ++++++ .../models/NewLibrary/BUSDEVICECONFIG.fbt | 55 +++++ .../models/NewLibrary/CABDEVICE.fbt | 77 +++++++ .../models/NewLibrary/CAB_KNX.fbt | 40 ++++ .../models/NewLibrary/CAB_MBX.fbt | 130 +++++++++++ .../models/NewLibrary/CAB_SDO.fbt | 136 ++++++++++++ .../models/NewLibrary/CALC_FORMULAR.fbt | 46 ++++ .../models/NewLibrary/CFG_ANY_GET.fbt | 56 +++++ .../models/NewLibrary/CFG_ANY_SET.fbt | 51 +++++ .../models/NewLibrary/CFG_DIRECT_GET.fbt | 56 +++++ .../models/NewLibrary/CFG_DIRECT_SET.fbt | 51 +++++ .../models/NewLibrary/CFG_EVENT.fbt | 53 +++++ .../models/NewLibrary/COMMCHANNEL.fbt | 60 ++++++ .../models/NewLibrary/COMMCHANNELUDPRECV.fbt | 35 +++ .../models/NewLibrary/COMPARE.fbt | 43 ++++ .../models/NewLibrary/COSEM_GET.fbt | 55 +++++ .../models/NewLibrary/CPUTICK.fbt | 35 +++ .../models/NewLibrary/DALI_CAB.fbt | 99 +++++++++ .../models/NewLibrary/DALI_IO.fbt | 64 ++++++ .../models/NewLibrary/DEV_MGR.fbt | 85 ++++++++ .../Runtime.Base/models/NewLibrary/DIV.fbt | 37 ++++ .../Runtime.Base/models/NewLibrary/DMKRNL.fbt | 34 +++ .../models/NewLibrary/DS_SELECT.fbt | 35 +++ .../models/NewLibrary/DS_SELECTX.fbt | 35 +++ .../models/NewLibrary/EIB_CONTROL.fbt | 51 +++++ .../Runtime.Base/models/NewLibrary/EIB_IN.fbt | 52 +++++ .../models/NewLibrary/EIB_OUT.fbt | 52 +++++ .../models/NewLibrary/EMB_RES.res | 14 ++ .../models/NewLibrary/EMB_RES_ENH.res | 20 ++ .../models/NewLibrary/ENOCEANIF_CAB.fbt | 45 ++++ .../models/NewLibrary/ENOCEANIF_SERIAL.fbt | 49 +++++ .../models/NewLibrary/ENOCEAN_CAB.fbt | 172 +++++++++++++++ .../models/NewLibrary/ENOCEAN_IN.fbt | 67 ++++++ .../models/NewLibrary/ENOCEAN_IO.fbt | 50 +++++ .../models/NewLibrary/ENOCEAN_OUT.fbt | 132 ++++++++++++ .../models/NewLibrary/ENOCEAN_STCEVC_DEV.fbt | 84 ++++++++ .../models/NewLibrary/ETHERCAT_COE.fbt | 133 ++++++++++++ .../models/NewLibrary/ETHERCAT_FOE.fbt | 123 +++++++++++ .../models/NewLibrary/ETHERCAT_SLAVE.fbt | 124 +++++++++++ .../models/NewLibrary/ETHERCAT_SOE.fbt | 139 ++++++++++++ .../models/NewLibrary/EVENTCHAIN.fbt | 50 +++++ .../models/NewLibrary/EVENTCHAINHEAD.fbt | 48 +++++ .../models/NewLibrary/EVENTSCHEDULER.fbt | 57 +++++ .../Runtime.Base/models/NewLibrary/E_CTU.fbt | 38 ++++ .../models/NewLibrary/E_CYCLE.fbt | 60 ++++++ .../models/NewLibrary/E_DELAY.fbt | 52 +++++ .../models/NewLibrary/E_DELAYR.fbt | 55 +++++ .../models/NewLibrary/E_DEMUX.fbt | 29 +++ .../Runtime.Base/models/NewLibrary/E_D_FF.fbt | 30 +++ .../models/NewLibrary/E_F_TRIG.fbt | 23 ++ .../models/NewLibrary/E_HRCYCLE.fbt | 62 ++++++ .../models/NewLibrary/E_MERGE.fbt | 22 ++ .../models/NewLibrary/E_N_TABLE.fbt | 87 ++++++++ .../models/NewLibrary/E_PERMIT.fbt | 26 +++ .../Runtime.Base/models/NewLibrary/E_REND.fbt | 22 ++ .../models/NewLibrary/E_RESTART.fbt | 38 ++++ .../Runtime.Base/models/NewLibrary/E_RS.fbt | 27 +++ .../models/NewLibrary/E_R_TRIG.fbt | 23 ++ .../models/NewLibrary/E_SELECT.fbt | 28 +++ .../models/NewLibrary/E_SPLIT.fbt | 22 ++ .../Runtime.Base/models/NewLibrary/E_SR.fbt | 27 +++ .../models/NewLibrary/E_SWITCH.fbt | 26 +++ .../models/NewLibrary/E_TABLE.fbt | 77 +++++++ .../models/NewLibrary/E_TRAIN.fbt | 77 +++++++ .../models/NewLibrary/EnoceanCommDevice.fbt | 50 +++++ .../NewLibrary/EnoceanCommInterface.fbt | 47 ++++ .../Runtime.Base/models/NewLibrary/FB_DLL.fbt | 58 +++++ .../models/NewLibrary/FILEREADER.fbt | 162 ++++++++++++++ .../models/NewLibrary/FILEWRITER.fbt | 75 +++++++ .../models/NewLibrary/FORCE_IND.fbt | 31 +++ .../Runtime.Base/models/NewLibrary/HASH.fbt | 40 ++++ .../models/NewLibrary/HMISERVER.fbt | 36 ++++ .../Runtime.Base/models/NewLibrary/KNX_IN.fbt | 64 ++++++ .../models/NewLibrary/KNX_OUT.fbt | 64 ++++++ .../NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt | 57 +++++ .../NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt | 33 +++ .../NewLibrary/LINKPUBLISHER_32_0_8_0.fbt | 59 +++++ .../Runtime.Base/models/NewLibrary/LOGGER.fbt | 52 +++++ .../models/NewLibrary/MBUSDEVCTRL.fbt | 130 +++++++++++ .../models/NewLibrary/MBUSDEVICE.fbt | 54 +++++ .../Runtime.Base/models/NewLibrary/MIBGET.fbt | 46 ++++ .../models/NewLibrary/MODBUSIO.fbt | 62 ++++++ .../Runtime.Base/models/NewLibrary/MUL.fbt | 33 +++ .../Runtime.Base/models/NewLibrary/NETIO.fbt | 68 ++++++ .../Runtime.Base/models/NewLibrary/NOT.fbt | 33 +++ .../models/NewLibrary/NUMBER2TIME.fbt | 33 +++ .../models/NewLibrary/OPCUASERVER.fbt | 36 ++++ .../Runtime.Base/models/NewLibrary/OR.fbt | 33 +++ .../models/NewLibrary/PD_ANY_IN.fbt | 63 ++++++ .../models/NewLibrary/PD_ANY_OUT.fbt | 52 +++++ .../models/NewLibrary/PD_BIT_IN.fbt | 52 +++++ .../models/NewLibrary/PD_BIT_OUT.fbt | 46 ++++ .../models/NewLibrary/PD_BYTEWORD_IN.fbt | 56 +++++ .../models/NewLibrary/PD_BYTEWORD_OUT.fbt | 50 +++++ .../models/NewLibrary/PD_BYTE_IN.fbt | 52 +++++ .../models/NewLibrary/PD_BYTE_OUT.fbt | 46 ++++ .../models/NewLibrary/PD_DIRECT_IN.fbt | 57 +++++ .../models/NewLibrary/PD_DIRECT_OUT.fbt | 52 +++++ .../models/NewLibrary/PD_DWORD_IN.fbt | 54 +++++ .../models/NewLibrary/PD_DWORD_OUT.fbt | 48 +++++ .../Runtime.Base/models/NewLibrary/PD_KNX.fbt | 42 ++++ .../models/NewLibrary/PD_WORD_IN.fbt | 54 +++++ .../models/NewLibrary/PD_WORD_OUT.fbt | 48 +++++ .../models/NewLibrary/PERSISTENCE.fbt | 57 +++++ .../models/NewLibrary/PERSISTENCE_FRAM.fbt | 56 +++++ .../models/NewLibrary/PRIOSCHEDULER.fbt | 62 ++++++ .../models/NewLibrary/QUERY_CONNECTION.fbt | 37 ++++ .../models/NewLibrary/REPORT_APP_STATE.fbt | 71 ++++++ .../models/NewLibrary/RES_WATCHDOG.fbt | 130 +++++++++++ .../models/NewLibrary/RMT_RES.res | 63 ++++++ .../Runtime.Base/models/NewLibrary/ROL.fbt | 35 +++ .../Runtime.Base/models/NewLibrary/ROR.fbt | 35 +++ .../models/NewLibrary/RTWatchdog.fbt | 55 +++++ .../Runtime.Base/models/NewLibrary/SELECT.fbt | 35 +++ .../models/NewLibrary/SERIALIO.fbt | 57 +++++ .../models/NewLibrary/SERVERNXT_8_8.fbt | 73 +++++++ .../Runtime.Base/models/NewLibrary/SHL.fbt | 35 +++ .../Runtime.Base/models/NewLibrary/SHR.fbt | 35 +++ .../models/NewLibrary/SIMULATION_RES.res | 9 + .../models/NewLibrary/SMI_DEVICE.fbt | 75 +++++++ .../models/NewLibrary/SMI_INTERFACE.fbt | 45 ++++ .../Runtime.Base/models/NewLibrary/SMOOTH.fbt | 50 +++++ .../models/NewLibrary/SMOOTH_BOOL.fbt | 41 ++++ .../models/NewLibrary/SMOOTH_DINT.fbt | 42 ++++ .../models/NewLibrary/SMOOTH_INT.fbt | 42 ++++ .../models/NewLibrary/SMOOTH_REAL.fbt | 42 ++++ .../models/NewLibrary/SMOOTH_UDINT.fbt | 42 ++++ .../models/NewLibrary/SMOOTH_UINT.fbt | 42 ++++ .../models/NewLibrary/SNTPCLIENT.fbt | 48 +++++ .../models/NewLibrary/STATS_LOGGER.fbt | 35 +++ .../NewLibrary/STATS_LOGGER_ARCHIVE.fbt | 25 +++ .../models/NewLibrary/STATS_LOGGER_DEV.fbt | 27 +++ .../NewLibrary/STATS_LOGGER_FOREACH.fbt | 57 +++++ .../NewLibrary/STATS_LOGGER_INTEGRATE.fbt | 40 ++++ .../models/NewLibrary/STATS_LOGGER_MAX.fbt | 40 ++++ .../models/NewLibrary/STATS_LOGGER_NET.fbt | 25 +++ .../models/NewLibrary/STATS_LOGGER_RSRC.fbt | 30 +++ .../NewLibrary/STATS_LOGGER_TRIGIFCHG.fbt | 24 +++ .../Runtime.Base/models/NewLibrary/SUB.fbt | 33 +++ .../models/NewLibrary/SYMLINKMULTIQUEDST.fbt | 45 ++++ .../models/NewLibrary/SYMLINKMULTIQUESRC.fbt | 45 ++++ .../models/NewLibrary/SYMLINKMULTIVALDST.fbt | 49 +++++ .../models/NewLibrary/SYMLINKMULTIVALSRC.fbt | 49 +++++ .../models/NewLibrary/SYMLINKMULTIVARDST.fbt | 45 ++++ .../models/NewLibrary/SYMLINKMULTIVARSRC.fbt | 47 ++++ .../models/NewLibrary/SYMLINKSTATUS.fbt | 68 ++++++ .../models/NewLibrary/SYSLOGLOGGER.fbt | 39 ++++ .../models/NewLibrary/SYSMONITOR.fbt | 71 ++++++ .../Runtime.Base/models/NewLibrary/TCPIO.fbt | 63 ++++++ .../models/NewLibrary/TERIDIAN_CLIENT.fbt | 111 ++++++++++ .../models/NewLibrary/ULUX_IN.fbt | 51 +++++ .../models/NewLibrary/ULUX_OUT.fbt | 53 +++++ .../models/NewLibrary/ULUX_SWITCH.fbt | 202 ++++++++++++++++++ .../models/NewLibrary/VALFORMAT.fbt | 37 ++++ .../models/NewLibrary/VALSCAN.fbt | 36 ++++ .../models/NewLibrary/WATCHSERVER.fbt | 36 ++++ .../Runtime.Base/models/NewLibrary/XOR.fbt | 33 +++ .../models/NewLibrary/header.iec61499 | 3 + 179 files changed, 9946 insertions(+) create mode 100644 solutions/Runtime.Base/Runtime.Base.msd create mode 100644 solutions/Runtime.Base/models/NewLibrary/ADD.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ANAMATH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/AND.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ANY2ANY.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BC_PROFIBUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BITMAN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_CAB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_CIFXPB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_CUB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_DCSMINI.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_DLL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_ETHERCAT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_FILE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_MODBUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_PROFIBUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BROADCASTINFO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CABDEVICE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CAB_KNX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CAB_MBX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CAB_SDO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/COMMCHANNEL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/COMPARE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/COSEM_GET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/CPUTICK.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_CAB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_IO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DEV_MGR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DIV.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DMKRNL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EMB_RES.res create mode 100644 solutions/Runtime.Base/models/NewLibrary/EMB_RES_ENH.res create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CTU.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CYCLE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAY.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAYR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DEMUX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_D_FF.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_MERGE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_PERMIT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_REND.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RESTART.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SELECT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SPLIT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SWITCH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TABLE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TRAIN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/FB_DLL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/FILEREADER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/FILEWRITER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/FORCE_IND.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/HASH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/HMISERVER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/LOGGER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/MIBGET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/MODBUSIO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/MUL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/NETIO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/NOT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/OR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BIT_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BIT_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BYTE_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_BYTE_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DWORD_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DWORD_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_KNX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_WORD_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_WORD_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/RMT_RES.res create mode 100644 solutions/Runtime.Base/models/NewLibrary/ROL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ROR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/RTWatchdog.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SELECT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SERIALIO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SERVERNXT_8_8.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SHL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SHR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.res create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_BOOL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_DINT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_INT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_REAL.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_UDINT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH_UINT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SNTPCLIENT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_FOREACH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_INTEGRATE.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_MAX.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_TRIGIFCHG.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SUB.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/TCPIO.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/TERIDIAN_CLIENT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_IN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/VALFORMAT.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/VALSCAN.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/XOR.fbt create mode 100644 solutions/Runtime.Base/models/NewLibrary/header.iec61499 diff --git a/.mps/modules.xml b/.mps/modules.xml index 995e49edc..45cfb52c8 100644 --- a/.mps/modules.xml +++ b/.mps/modules.xml @@ -31,6 +31,7 @@ + \ No newline at end of file diff --git a/solutions/Runtime.Base/Runtime.Base.msd b/solutions/Runtime.Base/Runtime.Base.msd new file mode 100644 index 000000000..04f838922 --- /dev/null +++ b/solutions/Runtime.Base/Runtime.Base.msd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solutions/Runtime.Base/models/NewLibrary/ADD.fbt b/solutions/Runtime.Base/models/NewLibrary/ADD.fbt new file mode 100644 index 000000000..840439716 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ADD.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ANAMATH.fbt b/solutions/Runtime.Base/models/NewLibrary/ANAMATH.fbt new file mode 100644 index 000000000..66c3c61b1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ANAMATH.fbt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/AND.fbt b/solutions/Runtime.Base/models/NewLibrary/AND.fbt new file mode 100644 index 000000000..9642aadfb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/AND.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.fbt b/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.fbt new file mode 100644 index 000000000..1857368e7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.fbt b/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.fbt new file mode 100644 index 000000000..d4638c94d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.fbt @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BC_PROFIBUS.fbt b/solutions/Runtime.Base/models/NewLibrary/BC_PROFIBUS.fbt new file mode 100644 index 000000000..ced0dac95 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BC_PROFIBUS.fbt @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BITMAN.fbt b/solutions/Runtime.Base/models/NewLibrary/BITMAN.fbt new file mode 100644 index 000000000..80f1a7b4e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BITMAN.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_CAB.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_CAB.fbt new file mode 100644 index 000000000..f432c67d6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_CAB.fbt @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_CIFXPB.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_CIFXPB.fbt new file mode 100644 index 000000000..594c3fe73 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_CIFXPB.fbt @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_CUB.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_CUB.fbt new file mode 100644 index 000000000..bf0b78d77 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_CUB.fbt @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_DCSMINI.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_DCSMINI.fbt new file mode 100644 index 000000000..8f3975443 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_DCSMINI.fbt @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_DLL.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_DLL.fbt new file mode 100644 index 000000000..3e8f95a73 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_DLL.fbt @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_ETHERCAT.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_ETHERCAT.fbt new file mode 100644 index 000000000..73d6d735d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_ETHERCAT.fbt @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_FILE.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_FILE.fbt new file mode 100644 index 000000000..2ffa9b9b0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_FILE.fbt @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_MODBUS.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_MODBUS.fbt new file mode 100644 index 000000000..024519d81 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_MODBUS.fbt @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_PROFIBUS.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_PROFIBUS.fbt new file mode 100644 index 000000000..31685d235 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_PROFIBUS.fbt @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.fbt b/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.fbt new file mode 100644 index 000000000..5e80fcddd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.fbt @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BROADCASTINFO.fbt b/solutions/Runtime.Base/models/NewLibrary/BROADCASTINFO.fbt new file mode 100644 index 000000000..e62d29120 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BROADCASTINFO.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.fbt b/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.fbt new file mode 100644 index 000000000..acf8667ac --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.fbt @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.fbt b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.fbt new file mode 100644 index 000000000..29e51b5e2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.fbt @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.fbt b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.fbt new file mode 100644 index 000000000..fb1ec7b63 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.fbt @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.fbt b/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.fbt new file mode 100644 index 000000000..0715ecb4c --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.fbt @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CAB_KNX.fbt b/solutions/Runtime.Base/models/NewLibrary/CAB_KNX.fbt new file mode 100644 index 000000000..937b21cfd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CAB_KNX.fbt @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CAB_MBX.fbt b/solutions/Runtime.Base/models/NewLibrary/CAB_MBX.fbt new file mode 100644 index 000000000..0690b8979 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CAB_MBX.fbt @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CAB_SDO.fbt b/solutions/Runtime.Base/models/NewLibrary/CAB_SDO.fbt new file mode 100644 index 000000000..921fcb306 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CAB_SDO.fbt @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.fbt b/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.fbt new file mode 100644 index 000000000..4bf6be260 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.fbt @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.fbt b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.fbt new file mode 100644 index 000000000..1a369b24e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.fbt @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.fbt b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.fbt new file mode 100644 index 000000000..1a006129b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.fbt @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.fbt b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.fbt new file mode 100644 index 000000000..d4b2c030a --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.fbt @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.fbt b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.fbt new file mode 100644 index 000000000..b8e5eb924 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.fbt @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.fbt b/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.fbt new file mode 100644 index 000000000..4bcd18658 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.fbt @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/COMMCHANNEL.fbt b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNEL.fbt new file mode 100644 index 000000000..da0afe72e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNEL.fbt @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.fbt b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.fbt new file mode 100644 index 000000000..6eef53373 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/COMPARE.fbt b/solutions/Runtime.Base/models/NewLibrary/COMPARE.fbt new file mode 100644 index 000000000..0f6b92e49 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COMPARE.fbt @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/COSEM_GET.fbt b/solutions/Runtime.Base/models/NewLibrary/COSEM_GET.fbt new file mode 100644 index 000000000..0a1133f52 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COSEM_GET.fbt @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/CPUTICK.fbt b/solutions/Runtime.Base/models/NewLibrary/CPUTICK.fbt new file mode 100644 index 000000000..48f77eeec --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CPUTICK.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.fbt b/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.fbt new file mode 100644 index 000000000..dfd35a5cf --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.fbt @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_IO.fbt b/solutions/Runtime.Base/models/NewLibrary/DALI_IO.fbt new file mode 100644 index 000000000..997a3d70c --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DALI_IO.fbt @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DEV_MGR.fbt b/solutions/Runtime.Base/models/NewLibrary/DEV_MGR.fbt new file mode 100644 index 000000000..18c095290 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DEV_MGR.fbt @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DIV.fbt b/solutions/Runtime.Base/models/NewLibrary/DIV.fbt new file mode 100644 index 000000000..3cc9c026d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DIV.fbt @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DMKRNL.fbt b/solutions/Runtime.Base/models/NewLibrary/DMKRNL.fbt new file mode 100644 index 000000000..3810c4ed2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DMKRNL.fbt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.fbt b/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.fbt new file mode 100644 index 000000000..876e595b5 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.fbt b/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.fbt new file mode 100644 index 000000000..527c2534d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.fbt b/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.fbt new file mode 100644 index 000000000..048110377 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.fbt @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/EIB_IN.fbt new file mode 100644 index 000000000..9ef57cee0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_IN.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.fbt new file mode 100644 index 000000000..b8f1c123b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EMB_RES.res b/solutions/Runtime.Base/models/NewLibrary/EMB_RES.res new file mode 100644 index 000000000..3027d413e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EMB_RES.res @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EMB_RES_ENH.res b/solutions/Runtime.Base/models/NewLibrary/EMB_RES_ENH.res new file mode 100644 index 000000000..8902217a6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EMB_RES_ENH.res @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + 27 + 179 + + Data + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.fbt new file mode 100644 index 000000000..5354492fb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.fbt @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.fbt new file mode 100644 index 000000000..05ea17d0e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.fbt @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.fbt new file mode 100644 index 000000000..aa1e5c305 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.fbt @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.fbt new file mode 100644 index 000000000..e636a8f31 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.fbt @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.fbt new file mode 100644 index 000000000..ef4468de9 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.fbt @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.fbt new file mode 100644 index 000000000..6d2898ab5 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.fbt @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.fbt b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.fbt new file mode 100644 index 000000000..7f0c5a3a9 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.fbt @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.fbt b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.fbt new file mode 100644 index 000000000..903e7c4df --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.fbt @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.fbt b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.fbt new file mode 100644 index 000000000..88755e590 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.fbt @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.fbt b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.fbt new file mode 100644 index 000000000..130fa7ba1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.fbt @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.fbt b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.fbt new file mode 100644 index 000000000..edd5c6857 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.fbt @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.fbt b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.fbt new file mode 100644 index 000000000..75aea8429 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.fbt @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.fbt b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.fbt new file mode 100644 index 000000000..00886cfa3 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.fbt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.fbt b/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.fbt new file mode 100644 index 000000000..ec054ced2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CTU.fbt b/solutions/Runtime.Base/models/NewLibrary/E_CTU.fbt new file mode 100644 index 000000000..5af9c30b8 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_CTU.fbt @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.fbt b/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.fbt new file mode 100644 index 000000000..8e5b02e2c --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.fbt @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAY.fbt b/solutions/Runtime.Base/models/NewLibrary/E_DELAY.fbt new file mode 100644 index 000000000..eb967713d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DELAY.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.fbt b/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.fbt new file mode 100644 index 000000000..e4509a39a --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.fbt @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.fbt b/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.fbt new file mode 100644 index 000000000..06a78d435 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.fbt @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_D_FF.fbt b/solutions/Runtime.Base/models/NewLibrary/E_D_FF.fbt new file mode 100644 index 000000000..07eae19e1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_D_FF.fbt @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.fbt b/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.fbt new file mode 100644 index 000000000..3eb9d4f78 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.fbt @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.fbt b/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.fbt new file mode 100644 index 000000000..a45eb19b1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.fbt @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_MERGE.fbt b/solutions/Runtime.Base/models/NewLibrary/E_MERGE.fbt new file mode 100644 index 000000000..ee2b28cde --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_MERGE.fbt @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.fbt b/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.fbt new file mode 100644 index 000000000..5b8e9e3a4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.fbt @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.fbt b/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.fbt new file mode 100644 index 000000000..bb5ca0c7e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.fbt @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_REND.fbt b/solutions/Runtime.Base/models/NewLibrary/E_REND.fbt new file mode 100644 index 000000000..38ef0478d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_REND.fbt @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RESTART.fbt b/solutions/Runtime.Base/models/NewLibrary/E_RESTART.fbt new file mode 100644 index 000000000..cba59c7fb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_RESTART.fbt @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RS.fbt b/solutions/Runtime.Base/models/NewLibrary/E_RS.fbt new file mode 100644 index 000000000..2769a732e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_RS.fbt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.fbt b/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.fbt new file mode 100644 index 000000000..229ff7c39 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.fbt @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SELECT.fbt b/solutions/Runtime.Base/models/NewLibrary/E_SELECT.fbt new file mode 100644 index 000000000..de99dc914 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SELECT.fbt @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.fbt b/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.fbt new file mode 100644 index 000000000..3d4ab7cf5 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.fbt @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SR.fbt b/solutions/Runtime.Base/models/NewLibrary/E_SR.fbt new file mode 100644 index 000000000..9ec03778f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SR.fbt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.fbt b/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.fbt new file mode 100644 index 000000000..bef5dc842 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.fbt @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TABLE.fbt b/solutions/Runtime.Base/models/NewLibrary/E_TABLE.fbt new file mode 100644 index 000000000..b54e1edb6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_TABLE.fbt @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.fbt b/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.fbt new file mode 100644 index 000000000..c4a5697a0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.fbt @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.fbt b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.fbt new file mode 100644 index 000000000..5494294ed --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.fbt @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.fbt b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.fbt new file mode 100644 index 000000000..ed64a4393 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.fbt @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/FB_DLL.fbt b/solutions/Runtime.Base/models/NewLibrary/FB_DLL.fbt new file mode 100644 index 000000000..6634fe652 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FB_DLL.fbt @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/FILEREADER.fbt b/solutions/Runtime.Base/models/NewLibrary/FILEREADER.fbt new file mode 100644 index 000000000..554cb836a --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FILEREADER.fbt @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/FILEWRITER.fbt b/solutions/Runtime.Base/models/NewLibrary/FILEWRITER.fbt new file mode 100644 index 000000000..9a6c8ff69 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FILEWRITER.fbt @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.fbt b/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.fbt new file mode 100644 index 000000000..bbe0ef955 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.fbt @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/HASH.fbt b/solutions/Runtime.Base/models/NewLibrary/HASH.fbt new file mode 100644 index 000000000..4d0e64965 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/HASH.fbt @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/HMISERVER.fbt b/solutions/Runtime.Base/models/NewLibrary/HMISERVER.fbt new file mode 100644 index 000000000..5dfd76ee0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/HMISERVER.fbt @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/KNX_IN.fbt new file mode 100644 index 000000000..cb9f5bddd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/KNX_IN.fbt @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.fbt new file mode 100644 index 000000000..138c550c4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.fbt @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt new file mode 100644 index 000000000..38f01e9a1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt new file mode 100644 index 000000000..533ec2e07 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt new file mode 100644 index 000000000..1b9c5f5ed --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LOGGER.fbt b/solutions/Runtime.Base/models/NewLibrary/LOGGER.fbt new file mode 100644 index 000000000..b40ae0e72 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/LOGGER.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.fbt b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.fbt new file mode 100644 index 000000000..0acb1db40 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.fbt @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.fbt b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.fbt new file mode 100644 index 000000000..390e4faac --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.fbt @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/MIBGET.fbt b/solutions/Runtime.Base/models/NewLibrary/MIBGET.fbt new file mode 100644 index 000000000..1f44f9730 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MIBGET.fbt @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.fbt b/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.fbt new file mode 100644 index 000000000..5b38b3609 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.fbt @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/MUL.fbt b/solutions/Runtime.Base/models/NewLibrary/MUL.fbt new file mode 100644 index 000000000..87256b692 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MUL.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/NETIO.fbt b/solutions/Runtime.Base/models/NewLibrary/NETIO.fbt new file mode 100644 index 000000000..7c951c73b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NETIO.fbt @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/NOT.fbt b/solutions/Runtime.Base/models/NewLibrary/NOT.fbt new file mode 100644 index 000000000..2123da141 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NOT.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.fbt b/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.fbt new file mode 100644 index 000000000..1dcba65d0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.fbt b/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.fbt new file mode 100644 index 000000000..709edd815 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.fbt @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/OR.fbt b/solutions/Runtime.Base/models/NewLibrary/OR.fbt new file mode 100644 index 000000000..ac7c15c98 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/OR.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.fbt new file mode 100644 index 000000000..066a87798 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.fbt @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.fbt new file mode 100644 index 000000000..1d7bc7f85 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BIT_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BIT_IN.fbt new file mode 100644 index 000000000..5b86e5068 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BIT_IN.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BIT_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BIT_OUT.fbt new file mode 100644 index 000000000..1d96f3c84 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BIT_OUT.fbt @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_IN.fbt new file mode 100644 index 000000000..c6f3208d6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_IN.fbt @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_OUT.fbt new file mode 100644 index 000000000..582599f52 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BYTEWORD_OUT.fbt @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_IN.fbt new file mode 100644 index 000000000..5a8e22968 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_IN.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_OUT.fbt new file mode 100644 index 000000000..f86781441 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_BYTE_OUT.fbt @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.fbt new file mode 100644 index 000000000..c4bcf72fb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.fbt new file mode 100644 index 000000000..55cd3648a --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.fbt @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_IN.fbt new file mode 100644 index 000000000..baa8be85f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_IN.fbt @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_OUT.fbt new file mode 100644 index 000000000..136518941 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DWORD_OUT.fbt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_KNX.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_KNX.fbt new file mode 100644 index 000000000..673edbc88 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_KNX.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_WORD_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_WORD_IN.fbt new file mode 100644 index 000000000..9ff2a8d99 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_WORD_IN.fbt @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_WORD_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/PD_WORD_OUT.fbt new file mode 100644 index 000000000..e56bc27e7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_WORD_OUT.fbt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.fbt b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.fbt new file mode 100644 index 000000000..909e5c090 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.fbt b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.fbt new file mode 100644 index 000000000..0ee8936e1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.fbt @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.fbt b/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.fbt new file mode 100644 index 000000000..5ab0019f6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.fbt @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.fbt b/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.fbt new file mode 100644 index 000000000..def58451b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.fbt @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.fbt b/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.fbt new file mode 100644 index 000000000..97ac730bd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.fbt @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.fbt b/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.fbt new file mode 100644 index 000000000..e75e3b052 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.fbt @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/RMT_RES.res b/solutions/Runtime.Base/models/NewLibrary/RMT_RES.res new file mode 100644 index 000000000..ce647e6ec --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/RMT_RES.res @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 27 + 179 + + true + + + + 30 + 238.036469 + + true + + + + 25 + 208.036469 + + true + + + diff --git a/solutions/Runtime.Base/models/NewLibrary/ROL.fbt b/solutions/Runtime.Base/models/NewLibrary/ROL.fbt new file mode 100644 index 000000000..1d184f9ee --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ROL.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ROR.fbt b/solutions/Runtime.Base/models/NewLibrary/ROR.fbt new file mode 100644 index 000000000..a245d8bee --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ROR.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.fbt b/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.fbt new file mode 100644 index 000000000..ae8797958 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.fbt @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SELECT.fbt b/solutions/Runtime.Base/models/NewLibrary/SELECT.fbt new file mode 100644 index 000000000..7d02b5639 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SELECT.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SERIALIO.fbt b/solutions/Runtime.Base/models/NewLibrary/SERIALIO.fbt new file mode 100644 index 000000000..9fda77909 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SERIALIO.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SERVERNXT_8_8.fbt b/solutions/Runtime.Base/models/NewLibrary/SERVERNXT_8_8.fbt new file mode 100644 index 000000000..60642cdc4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SERVERNXT_8_8.fbt @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SHL.fbt b/solutions/Runtime.Base/models/NewLibrary/SHL.fbt new file mode 100644 index 000000000..0a8d07fef --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SHL.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SHR.fbt b/solutions/Runtime.Base/models/NewLibrary/SHR.fbt new file mode 100644 index 000000000..82d50c025 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SHR.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.res b/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.res new file mode 100644 index 000000000..78d789f50 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.res @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.fbt b/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.fbt new file mode 100644 index 000000000..4818e549c --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.fbt @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.fbt b/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.fbt new file mode 100644 index 000000000..b490efe62 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.fbt @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH.fbt new file mode 100644 index 000000000..9e415f070 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH.fbt @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_BOOL.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_BOOL.fbt new file mode 100644 index 000000000..ba2ad2add --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_BOOL.fbt @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_DINT.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_DINT.fbt new file mode 100644 index 000000000..f59e69280 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_DINT.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_INT.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_INT.fbt new file mode 100644 index 000000000..8492602ea --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_INT.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_REAL.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_REAL.fbt new file mode 100644 index 000000000..101d91d0f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_REAL.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UDINT.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UDINT.fbt new file mode 100644 index 000000000..ac6d7f26d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UDINT.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UINT.fbt b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UINT.fbt new file mode 100644 index 000000000..2f6d14942 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH_UINT.fbt @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SNTPCLIENT.fbt b/solutions/Runtime.Base/models/NewLibrary/SNTPCLIENT.fbt new file mode 100644 index 000000000..320f43e39 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SNTPCLIENT.fbt @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.fbt new file mode 100644 index 000000000..e2a380d41 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.fbt @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.fbt new file mode 100644 index 000000000..4e45db6f3 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.fbt @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.fbt new file mode 100644 index 000000000..dfa88569f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.fbt @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_FOREACH.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_FOREACH.fbt new file mode 100644 index 000000000..018d5a059 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_FOREACH.fbt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_INTEGRATE.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_INTEGRATE.fbt new file mode 100644 index 000000000..77038ca65 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_INTEGRATE.fbt @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_MAX.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_MAX.fbt new file mode 100644 index 000000000..5e39050d0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_MAX.fbt @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.fbt new file mode 100644 index 000000000..32e8f1d93 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.fbt @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.fbt new file mode 100644 index 000000000..8bf9d47d1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.fbt @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_TRIGIFCHG.fbt b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_TRIGIFCHG.fbt new file mode 100644 index 000000000..25c435647 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_TRIGIFCHG.fbt @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SUB.fbt b/solutions/Runtime.Base/models/NewLibrary/SUB.fbt new file mode 100644 index 000000000..03cd84233 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SUB.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.fbt new file mode 100644 index 000000000..5cc2e79cd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.fbt @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.fbt new file mode 100644 index 000000000..b8b917f81 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.fbt @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.fbt new file mode 100644 index 000000000..485277598 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.fbt @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.fbt new file mode 100644 index 000000000..7b0589d28 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.fbt @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.fbt new file mode 100644 index 000000000..14358fefa --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.fbt @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.fbt new file mode 100644 index 000000000..0cf672835 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.fbt @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.fbt b/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.fbt new file mode 100644 index 000000000..80da4bfa9 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.fbt @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.fbt b/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.fbt new file mode 100644 index 000000000..202917a65 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.fbt @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.fbt b/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.fbt new file mode 100644 index 000000000..257b1cb32 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.fbt @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/TCPIO.fbt b/solutions/Runtime.Base/models/NewLibrary/TCPIO.fbt new file mode 100644 index 000000000..fe87da974 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/TCPIO.fbt @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/TERIDIAN_CLIENT.fbt b/solutions/Runtime.Base/models/NewLibrary/TERIDIAN_CLIENT.fbt new file mode 100644 index 000000000..2eea8c9e1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/TERIDIAN_CLIENT.fbt @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.fbt b/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.fbt new file mode 100644 index 000000000..6918e66fd --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.fbt @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.fbt b/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.fbt new file mode 100644 index 000000000..bcee4fdf1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.fbt @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.fbt b/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.fbt new file mode 100644 index 000000000..579b4f266 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.fbt @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.fbt b/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.fbt new file mode 100644 index 000000000..bad132bf2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.fbt @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/VALSCAN.fbt b/solutions/Runtime.Base/models/NewLibrary/VALSCAN.fbt new file mode 100644 index 000000000..4c9559681 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/VALSCAN.fbt @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.fbt b/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.fbt new file mode 100644 index 000000000..c04e6fd87 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.fbt @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/XOR.fbt b/solutions/Runtime.Base/models/NewLibrary/XOR.fbt new file mode 100644 index 000000000..2676eb1f4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/XOR.fbt @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/header.iec61499 b/solutions/Runtime.Base/models/NewLibrary/header.iec61499 new file mode 100644 index 000000000..568f255f9 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/header.iec61499 @@ -0,0 +1,3 @@ + + + From 4e64d0d710c3deab1685e009032609c4028f303c Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 27 Feb 2024 12:54:00 +0300 Subject: [PATCH 13/50] Tried to add Runtime.Basev3.0.0.2 lib --- .../models/NewLibrary/ADD.doc.xml | 21 ++ .../models/NewLibrary/ANAMATH.doc.xml | 21 ++ .../models/NewLibrary/AND.doc.xml | 76 ++++++++ .../models/NewLibrary/ANY2ANY.doc.xml | 20 ++ .../models/NewLibrary/BC_MODBUS.doc.xml | 20 ++ .../models/NewLibrary/BITMAN.doc.xml | 34 ++++ .../models/NewLibrary/BM_DLL.doc.xml | 26 +++ .../models/NewLibrary/BM_SIMBUS.doc.xml | 18 ++ .../models/NewLibrary/BUSCOUPLER.doc.xml | 20 ++ .../models/NewLibrary/BUSDEVICE.doc.xml | 18 ++ .../models/NewLibrary/BUSDEVICECONFIG.doc.xml | 18 ++ .../models/NewLibrary/CABDEVICE.doc.xml | 18 ++ .../models/NewLibrary/CALC_FORMULAR.doc.xml | 29 +++ .../models/NewLibrary/CFG_ANY_GET.doc.xml | 18 ++ .../models/NewLibrary/CFG_ANY_SET.doc.xml | 18 ++ .../models/NewLibrary/CFG_DIRECT_GET.doc.xml | 18 ++ .../models/NewLibrary/CFG_DIRECT_SET.doc.xml | 18 ++ .../models/NewLibrary/CFG_EVENT.doc.xml | 18 ++ .../NewLibrary/COMMCHANNELUDPRECV.doc.xml | 18 ++ .../models/NewLibrary/COMPARE.doc.xml | 58 ++++++ .../models/NewLibrary/CPUTICK.doc.xml | 27 +++ .../models/NewLibrary/DALI_CAB.doc.xml | 18 ++ .../models/NewLibrary/DALI_IO.doc.xml | 18 ++ .../models/NewLibrary/DIV.doc.xml | 19 ++ .../models/NewLibrary/DS_SELECT.doc.xml | 18 ++ .../models/NewLibrary/DS_SELECTX.doc.xml | 18 ++ .../models/NewLibrary/EIB_CONTROL.doc.xml | 18 ++ .../models/NewLibrary/EIB_IN.doc.xml | 18 ++ .../models/NewLibrary/EIB_OUT.doc.xml | 18 ++ .../models/NewLibrary/ENOCEANIF_CAB.doc.xml | 18 ++ .../NewLibrary/ENOCEANIF_SERIAL.doc.xml | 18 ++ .../models/NewLibrary/ENOCEAN_CAB.doc.xml | 19 ++ .../models/NewLibrary/ENOCEAN_IN.doc.xml | 20 ++ .../models/NewLibrary/ENOCEAN_IO.doc.xml | 18 ++ .../models/NewLibrary/ENOCEAN_OUT.doc.xml | 19 ++ .../NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml | 20 ++ .../models/NewLibrary/ETHERCAT_COE.doc.xml | 18 ++ .../models/NewLibrary/ETHERCAT_FOE.doc.xml | 18 ++ .../models/NewLibrary/ETHERCAT_SLAVE.doc.xml | 18 ++ .../models/NewLibrary/ETHERCAT_SOE.doc.xml | 18 ++ .../models/NewLibrary/EVENTCHAIN.doc.xml | 21 ++ .../models/NewLibrary/EVENTCHAINHEAD.doc.xml | 22 +++ .../models/NewLibrary/EVENTSCHEDULER.doc.xml | 50 +++++ .../models/NewLibrary/E_CTU.doc.xml | 19 ++ .../models/NewLibrary/E_CYCLE.doc.xml | 19 ++ .../models/NewLibrary/E_DELAY.doc.xml | 24 +++ .../models/NewLibrary/E_DELAYR.doc.xml | 28 +++ .../models/NewLibrary/E_DEMUX.doc.xml | 24 +++ .../models/NewLibrary/E_D_FF.doc.xml | 21 ++ .../models/NewLibrary/E_F_TRIG.doc.xml | 19 ++ .../models/NewLibrary/E_HRCYCLE.doc.xml | 26 +++ .../models/NewLibrary/E_MERGE.doc.xml | 23 +++ .../models/NewLibrary/E_N_TABLE.doc.xml | 23 +++ .../models/NewLibrary/E_PERMIT.doc.xml | 19 ++ .../models/NewLibrary/E_REND.doc.xml | 20 ++ .../models/NewLibrary/E_RESTART.doc.xml | 19 ++ .../models/NewLibrary/E_RS.doc.xml | 23 +++ .../models/NewLibrary/E_R_TRIG.doc.xml | 19 ++ .../models/NewLibrary/E_SELECT.doc.xml | 20 ++ .../models/NewLibrary/E_SPLIT.doc.xml | 22 +++ .../models/NewLibrary/E_SR.doc.xml | 23 +++ .../models/NewLibrary/E_SWITCH.doc.xml | 22 +++ .../models/NewLibrary/E_TABLE.doc.xml | 19 ++ .../models/NewLibrary/E_TRAIN.doc.xml | 19 ++ .../NewLibrary/EnoceanCommDevice.doc.xml | 18 ++ .../NewLibrary/EnoceanCommInterface.doc.xml | 18 ++ .../models/NewLibrary/FB_DLL.doc.xml | 20 ++ .../models/NewLibrary/FORCE_IND.doc.xml | 32 ++++ .../models/NewLibrary/HASH.doc.xml | 20 ++ .../models/NewLibrary/HMISERVER.doc.xml | 18 ++ .../models/NewLibrary/KNX_IN.doc.xml | 18 ++ .../models/NewLibrary/KNX_OUT.doc.xml | 18 ++ .../models/NewLibrary/LOGGER.doc.xml | 25 +++ .../models/NewLibrary/MBUSDEVCTRL.doc.xml | 18 ++ .../models/NewLibrary/MBUSDEVICE.doc.xml | 18 ++ .../models/NewLibrary/MIBGET.doc.xml | 41 ++++ .../models/NewLibrary/MODBUSIO.doc.xml | 35 ++++ .../models/NewLibrary/MUL.doc.xml | 19 ++ .../models/NewLibrary/NETIO.doc.xml | 59 ++++++ .../models/NewLibrary/NOT.doc.xml | 32 ++++ .../models/NewLibrary/NUMBER2TIME.doc.xml | 22 +++ .../models/NewLibrary/OPCUASERVER.doc.xml | 30 +++ .../Runtime.Base/models/NewLibrary/OR.doc.xml | 77 ++++++++ .../models/NewLibrary/PD_ANY_IN.doc.xml | 20 ++ .../models/NewLibrary/PD_ANY_OUT.doc.xml | 23 +++ .../models/NewLibrary/PD_DIRECT_IN.doc.xml | 18 ++ .../models/NewLibrary/PD_DIRECT_OUT.doc.xml | 18 ++ .../models/NewLibrary/PERSISTENCE.doc.xml | 25 +++ .../NewLibrary/PERSISTENCE_FRAM.doc.xml | 37 ++++ .../models/NewLibrary/PRIOSCHEDULER.doc.xml | 40 ++++ .../NewLibrary/QUERY_CONNECTION.doc.xml | 23 +++ .../NewLibrary/REPORT_APP_STATE.doc.xml | 18 ++ .../models/NewLibrary/RES_WATCHDOG.doc.xml | 18 ++ .../models/NewLibrary/ROL.doc.xml | 19 ++ .../models/NewLibrary/ROR.doc.xml | 19 ++ .../models/NewLibrary/RTWatchdog.doc.xml | 19 ++ .../models/NewLibrary/SELECT.doc.xml | 19 ++ .../models/NewLibrary/SERIALIO.doc.xml | 34 ++++ .../models/NewLibrary/SHL.doc.xml | 19 ++ .../models/NewLibrary/SHR.doc.xml | 19 ++ .../models/NewLibrary/SIMULATION_RES.doc.xml | 19 ++ .../models/NewLibrary/SMI_DEVICE.doc.xml | 18 ++ .../models/NewLibrary/SMI_INTERFACE.doc.xml | 18 ++ .../models/NewLibrary/SMOOTH.doc.xml | 22 +++ .../models/NewLibrary/STATS_LOGGER.doc.xml | 18 ++ .../NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml | 18 ++ .../NewLibrary/STATS_LOGGER_DEV.doc.xml | 18 ++ .../NewLibrary/STATS_LOGGER_NET.doc.xml | 18 ++ .../NewLibrary/STATS_LOGGER_RSRC.doc.xml | 18 ++ .../models/NewLibrary/SUB.doc.xml | 19 ++ .../NewLibrary/SYMLINKMULTIQUEDST.doc.xml | 19 ++ .../NewLibrary/SYMLINKMULTIQUESRC.doc.xml | 19 ++ .../NewLibrary/SYMLINKMULTIVALDST.doc.xml | 30 +++ .../NewLibrary/SYMLINKMULTIVALSRC.doc.xml | 27 +++ .../NewLibrary/SYMLINKMULTIVARDST.doc.xml | 28 +++ .../NewLibrary/SYMLINKMULTIVARSRC.doc.xml | 27 +++ .../models/NewLibrary/SYMLINKSTATUS.doc.xml | 18 ++ .../models/NewLibrary/SYSLOGLOGGER.doc.xml | 18 ++ .../models/NewLibrary/SYSMONITOR.doc.xml | 18 ++ .../models/NewLibrary/TCPIO.doc.xml | 55 ++++++ .../models/NewLibrary/ULUX_IN.doc.xml | 180 ++++++++++++++++++ .../models/NewLibrary/ULUX_OUT.doc.xml | 95 +++++++++ .../models/NewLibrary/ULUX_SWITCH.doc.xml | 89 +++++++++ .../models/NewLibrary/VALFORMAT.doc.xml | 32 ++++ .../models/NewLibrary/VALSCAN.doc.xml | 30 +++ .../models/NewLibrary/WATCHSERVER.doc.xml | 18 ++ .../models/NewLibrary/XOR.doc.xml | 109 +++++++++++ 127 files changed, 3349 insertions(+) create mode 100644 solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/AND.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/OR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml create mode 100644 solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml diff --git a/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml new file mode 100644 index 000000000..dae371eb1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml @@ -0,0 +1,21 @@ + +
+ + + + + + + + +

This function block implements a mathematical add operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

 

+

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Calculates the sum of all inputs 'IN1' ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type.

'OUT' := 'IN1' + 'IN2' + ... + 'INn'

 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml new file mode 100644 index 000000000..cf5a7f08f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml @@ -0,0 +1,21 @@ + +
+ + + + + + + + +

This function block calculates the minimum/maximum and average values of [len] numerical input values.

It is a generic block. Input and output datatypes (except input 'len') can be defined. The number of inputs and outputs is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

+ Temporal Behavior

'RESET'-Event input:

- Clears the internal list

- Set outputs to zero: 'tAvg${i}', 'tMax${i}', 'tMin${i}' and 'tDeadT${i}'

- Fires an 'RESET0'-Event

 

'REQ'-Event input:

- Reads the 'len'-input, updates the internal list size

- Reads the 'pv${i}'-input

- If the list is empty then

    - Copy the input value of 'pv$' to all 'len' elements in the list

- Adds the input value to the list

- If the number of values in the list is equal to 'len'

    - Remove the oldest value and pass it to 'tDeadT${i}'-output

    - Add new value to the list

- Else

    - Add new value to the list

- Perform calculation of the minimum/maximum and average value

- Pass results to the corresponding outputs: 'tAvg${i}', 'tMax${i}', 'tMin${i}'

- Fire a 'CNF'-Event

 

Functional Behavior

The value of the 'len'-input defines the number of the elements the list can hold and also used for all calculations. The first 'REQ'-Event copies the value of the 'pv$'-input to every element in the list of 'len' entries. So the first average value calculated will be equal to the first input value.

At every 'REQ' event the calculation of the average 'tAvg1', maximum value 'tMax' and minimum value 'tMin' are performed. The output 'tDeadT$' will be updated when the list is full and a new value is added. 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml new file mode 100644 index 000000000..ce76d10fa --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml @@ -0,0 +1,76 @@ + +
+ + + + + + + + +

This function block implements a logical AND.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: AND leads to output 'OUT' TRUE(1), if all enabled inputs ('IN1' ... 'INn') are TRUE. Otherwise the output is FALSE (0).

 

+

+ + + + + + + + + + + + + + + + + + + + + + +
logic table
In2In1Out
000
010
100
111

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise logical AND of the INPUTs. The result is stored into OUT.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

examples for logic table

In2In1Out
000000000000
000000010000
001000000000
000100010001
001100010001
111010111010

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml new file mode 100644 index 000000000..a4689f688 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block converts one datatype to another.

It is a generic block. The number of inputs (and accordingly outputs) can be chosen from 1 to 16.

The data type of each in- and output can be defined independently.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

ANY2ANY accepts all sorts of datatypes at the input ('IN1' ... 'INn') and converts them into the selected output datatype if possible. Every input has one corresponding output ('IN1' -> 'OUT1', 'IN2' -> 'OUT2', ... 'INTn' -> 'OUTn'). The input value will be ignored, if the conversion cannot be performed (e.g. STRING to INT will be ignored, except there are only numbers.) Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the conversion cannot be represented in the 'OUT' type. (e.g. DINT to INT or SINT may result in loss of data, etc.)

Note: conversions in the form of TIME to REAL, TIME to LREAL, etc. are not supported by ANY2ANY. Use a basic FB for that purpose (conversions like REAL_TO_TIME or TIME_TO_REAL can be executed in structured test - but be careful not to lose data, because REAL generally is to small to hold TIME values).

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml new file mode 100644 index 000000000..7faeab85e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block is internally used for MODBUS Couplers

+

+

+
+

+

This function block is internally used for MODBUS Couplers

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml new file mode 100644 index 000000000..19f08c079 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml @@ -0,0 +1,34 @@ + +
+ + + + + + + + +

This function block is an extremely powerful tool. It enables various sorts of bit-manipulation in all directions.

It is a generic block. The number of inputs and outputs can be chosen independently from 1 to 32.

Pulling the symbol in the bottom right corner of the block up or down changes the number of either inputs or outputs. To change from input-alteration to output-alteration or conversely, just click the symbol in the bottom right corner of the block by a right-click and then choose INCNT or OUTCNT. Afterwards you can alter the selected ports by pulling with left-click again.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'INIT' initiates a check of input 'OP'. Only if the definition corresponds with the number of inputs this event leads to output 'STATUS' ok, otherwise it leads to an error report and the normal 'REQ' doesn't work.

If 'INIT' leads to 'STATUS' ok, each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

After each change of input 'OP' it is necessary to trigger 'INIT' before executing 'REQ'.

+
+ + + + + + +
[tip]If Output STATUS always leads to an error report:
+

Check your input definitions of OP. The number of output information has to be less or equal to the number of input information.

 

Functional Behavior

Input 'OP' defines the functionality of all outputs ('OUT1' ... 'OUTn'). Possible are 32 inputs and 32 outputs as maximum. They can be BOOL, BYTE, WORD, DWORD, LWORD-type.

All inputs together are to be looked upon as one whole bit-image, whereas bit 0 is lsb (least significant bit) of the first input. Highest bit is msb (most significant bit) of the last input. The same order is true for output. [i.e. input1 is BYTE, input2 is BOOL, input3 is BYTE then first output address 0 (LSB of 1.BYTE) -7 (MSB of 1.Byte), then 8 (BOOL), and 9 (LSB of 2.BYTE) - 16 (MSB of 2.Byte)].

There is the possibility to set the starting position for the output bit (e.g. 3=1 means: output bit 3 = input bit 1), but it's optional. If not, starting position is 0, respectively the position where the last operation has finished. Further actions join on the next output bit position.

    +
  • n, or n-m, or m-n, takes the bit number n from input to the next output position, whereby m-n will reverse the order.
  • +
  • n:i, n-m:i, m-n:i, same as above, but with invert value.
  • +
  • n:0 number of n 0-bits from the next output position.
  • +
  • n:1 number of n 1-bits from the next output position.
  • +
  • Not defined output bits are 0.
  • +
  • OP completely blank has the same meaning than 0-n.

Examples:

Endianness-alteration of a DWORD:

24-31,16-23,8-15,0-7

Third bit to output position 0 (=lsb of output1), second to position 8 invert, the third and fourth bit in reversed order on output position 9 and 10, and beginning with position 16 eight times 1:

2,8=1:i,4-3,16=8:1

To split a BYTE from one input in reversed order to 8 BOOL-outputs:

7-0

+

+

diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml new file mode 100644 index 000000000..07b4576ab --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml @@ -0,0 +1,26 @@ + +
+ + + + + + + + +

This function block is the bus master using a standardized DLL as the underlying driver.

+

+
+

This function block provides the bus master using a standardized DLL as the underlying driver. The DLL contains all operations needed to initialize, start, run, stop and uninitialize the driver. The CONFIGURATION input is used to pass all the information necessary to configure the driver instance - for simple drivers this can be a configuration string, for more complicated ones it can be name of the configuration file.

The DLL_NAME parameter contains a name of the DLL to load. The DLL is searched according to the dlopen() semantics.

The OPS_NAME contains a name of the symbol inside the DLL providing the operations structure. Consult the manual for the particular driver to find its value.

Usually there can be only one instance of BM_DLL for every DLL_NAME / OPS_NAME combination. This is not enforced by the FB.

 

+ + + + + + +
[caution]Caution
+

By using a dynamically loaded code you are operating in the memory space of the runtime. Any bugs, memory leaks, multithreading problems, non-deterministic or inappropriately high delays have direct effect on the runtime and can cause its crash or incorrect operation.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml new file mode 100644 index 000000000..6046bf863 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This busmaster is internally used for simulation

+

+
+

This busmaster is internally used for simulation

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml new file mode 100644 index 000000000..919f82ab7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block is internally used for Couplers solely in Hardware CATs.

+

+

+
+

This function block is internally used for Couplers solely in Hardware CATs.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml new file mode 100644 index 000000000..9965d1308 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml @@ -0,0 +1,29 @@ + +
+ + + + + + + + +

This function block evaluates formulas containing mathematical/logical expressions and conditions.

It is a generic block. The number of inputs 'Xn' can be chosen from 2 to 16 of any numerical type. The number of inputs 'FORMULAm' which are strings containing a formula can be in a range from 2 to 8 which is also the number of outputs 'Ym'. The outputs can be of any numerical types. Input and output types do not depend from each other.

Pulling the symbol in the bottom right corner of the block up or down changes the number of either inputs or outputs. To change from input-alteration to output-alteration or conversely, just click the symbol in the bottom right corner of the block by a right-click and then choose INCNT or OUTCNT. Afterwards you can alter the selected ports by pulling with left-click again.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

Performs the initialization and compiles the formulas contained in the 'FORMULA1' ... 'FORMULA8' input strings. A syntax check of all formulas is performed starting at 'FORMULA1' ... 'FORMULA8'. On success the 'COMPILESTATUS' ouput is set to OK. In the case when an error is detected, the check stops immediately at the current 'FORMULA' input and the 'COMPILERSTATUS' outputs an error message. The error shall be fixed and the 'INIT-Event fired again to restart the syntax check until all formulas have been compiled successfully.

On every update of a formula the 'INIT-Event shall be fired. A formula may also be changed during runtime.

Only when the 'COMPILESTATUS' is OK the 'REQ'-Event will work.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic, which means that the input values 'X1' ... 'Xn' are captured and all formulas are evaluated. The results of 'FORMULA1' ... 'FORMULAm' are written to the corresponding outputs 'Y1' ... 'Ym'.

 

'INITO'-Event output:

This event is fired when the initialization and compilation of formulas (successfully or not) have been completed.

 

'CNF'-Event output:

This event is fired when the evaluation of 'FORMULA1' ... 'FORMULAm' has successfully completed and the outputs 'Y1' ... 'Ym' have been written. The output of 'RUNTIMESTATUS' is set to OK.

 

'ERR'-Event output:

This event is fired when the evaluation of 'FORMULA1' ... 'FORMULAm' has not successfully completed because a runtime error (division by zero, etc.) occurred. The output of 'RUNTIMESTATUS' is set to an error message.

On error no 'CNF'-Event is fired.

 

 

Functional Behavior

The following arithmetic expressions are allowed:

+, -, *, /, Xn%Xm , Xn**Xm, asin(Xn), acos(Xn), atan(Xn), sin(Xn), cos(Xn), tan(Xn), sqrt(Xn), ln(Xn), and brackets() as well as all combinations.

All trigonometric functions are calculated in radians. The mathematical constants PI, E are also supported.

Examples for correct syntax:

    +
  • (X1-2)*5-(X2*(X1+3))+X3/2
  • +
  • sqrt(X2*X3)
  • +
  • asin(X1)
  • +
  • X1**X3  or X1**4   ...syntax for exponential function (x^y)
  • +
  • X1%3  or X1%X2    ...syntax for modulo operation, it finds the remainder of a division of one number by another (for example: X1=5 divided by 3: the result = remainder would be 2). For this function the datatype has to be INT (UINT, SINT, USINT, DINT, UDINT, LINT, ULINT)!

 

The following logical expressions are allowed:

AND, OR, XOR, NOT

Examples:

    +
  • X4 AND X5 OR NOT X6

In this case the output value is either 1 or 0 (TRUE or FALSE if output datatype is BOOL).

 

The following conditions are allowed:

> (greater than), >= (greater or equal), = (equal), <> (not equal), <= (less or equal), < (less than)

Examples:

    +
  • X1<=X3
  • +
  • X2>X4 AND X3

In this case the output value is either 1 or 0 (TRUE or FALSE if output datatype is BOOL).

 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml new file mode 100644 index 000000000..f47586218 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access solely in Hardware CATs.

+

+
+

This function block is internally used for hardware access solely in Hardware CATs.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml new file mode 100644 index 000000000..78a4bd39f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internal used for communication with other devices

+

+
+

This function block is internal used for communication with other devices

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml new file mode 100644 index 000000000..0789559be --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml @@ -0,0 +1,58 @@ + +
+ + + + + + + + +

This function block performs an arithmetic comparison of values.

It is a generic block. The input-datatype can be chosen. The number of ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Compares the value of input1 'IN1' with the value of input2 'IN2'. The outputs ('LT', 'LE', 'EQ', 'NE', 'GE' and 'GT') reflect the result of the comparisons which is always of type BOOL and can be either TRUE or FALSE.

 

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

table of operations

type of comparison         description         output name
+

IN1 < IN2

less thanLT
+

IN1 <= IN2

less than or equalLE
+

IN1 = IN2

equalEQ
+

IN1 <> IN2

not equalNE
+

IN1 >= IN2

greater than or equalGE
+

IN1 > IN2

greater thanGT

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml new file mode 100644 index 000000000..3fb8aff98 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml @@ -0,0 +1,27 @@ + +
+ + + + + + + + +

This function block measures the time span between two input events.

+
+

+ Temporal Behavior

+

Each 'REQ'-Event captures the internal time and calculates the difference to the prev. input event. The result is passed to the 'timeDiff'-output and the 'timeDiffUnits'-output. Then a 'CNF'-Event is fired.

+

The first 'REQ'-Event is a special case: The time span from start of the runtime until the arrival of the 'REQ'-Event is calculated.

+

Another option is to use the START event. In that case the 'START' event captures the time and the 'REQ' event calculates the difference and fires the 'CNF' event.

+

 

+

Functional Behavior

+

The 'timeDiff'-output has the the IEC-TIME duration format.

+

The format of the 'timeDiffUnits'-output is selected by the 'unit'-input which is the value 0 for seconds, 1 for milliseconds, 2 for microseconds and 3 for nanoseconds. For values above 3, the default to 3 (nanoseconds) is taken.

+

Depending on the unit selected, the maximum time span which can be measured is 4s294ms967us295ns if nanoseconds are selected, 1h11m34s967ms295ms if microseconds are selected and approximately 49d17h2m47s. Exceeding these limits causes truncation and seemingly irregular results.

+

The resolution of the time difference returned is generally defined by the number of clock ticks per second a particular runtime system is configured at. E.g. given a clock frequency of 1000 ticks per second actually limits the smallest measurable time difference greater than zero to one millisecond no matter what unit is selected.

+

If the platform supports high resolution timers the 'timeDiff' is calculated using the resolution provided by them.

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml new file mode 100644 index 000000000..9a5decbe7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a mathematical divide operation.

It is a generic block. The number of inputs can be chosen from 2 to 16. The number of outputs are 1 to 8 which depend on the number of input pairs.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

The maximum number of inputs is 16. The inputs are organised as pairs. Each pair has one corresponding 'OUT' to hold the result and an 'ERR' for indication of an error. The first input represents operand1, the second operand2. The result is stored in 'OUT'. If the second operand is zero, then 'OUT' is set to zero and 'ERR' is TRUE.

 

For example:

4 inputs:

'IN11': 10#40, 'IN12': 10#5, result: 'OUT1': 10#8, 'ERR1': FALSE 

'IN21': 10#25, 'IN22': 10#0, result: 'OUT2': 10#0, 'ERR2': TRUE 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml new file mode 100644 index 000000000..a5081c82e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

The DS_SELECT function block type allows the selection of dedicated subsets of a given data table due to numbered input events.

It is a generic function block.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

The DS_SELECT function block type is a generic FBT and therefore takes an arbitrary number CNTX of subsets as input. Every subset consists of CNTY variables of arbitrary data type. By receiving one of the CNTX input events REQ the function block selects the according subset with the same index and copies its values to the output variables forming the output subset.

 

Furthermore the output events IND and CNF with the same index as REQ are raised.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml new file mode 100644 index 000000000..9f4e4b2f1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

The DS_SELECTX function block type allows the selection of dedicated subsets of a given data table due to numbered input events.

It is a generic function block.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

The DS_SELECTX function block type is a generic FBT and therefore takes an arbitrary number CNTX of subsets as input. Every subset consists of CNTY variables of arbitrary data type. By receiving one of the CNTX input events REQ the function block selects the according subset with the same index and copies its values to the output variables forming the output subset.

 

Furthermore the output events IND and CNF with the same index as REQ are raised.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml new file mode 100644 index 000000000..370cb5827 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for EIB hardware access

+

+
+

This function block is internally used for EIB hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml new file mode 100644 index 000000000..370cb5827 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for EIB hardware access

+

+
+

This function block is internally used for EIB hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml new file mode 100644 index 000000000..370cb5827 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for EIB hardware access

+

+
+

This function block is internally used for EIB hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml new file mode 100644 index 000000000..91f4be9ee --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + Firstname + Surname + + name@company.com + +

Thermokon STC RS485 EVC EnOcean Gateway on MIO, bi-directional

+

+
+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml new file mode 100644 index 000000000..901210e13 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + Hubert + Winkler + + hubert.winkler@nxtcontrol.com + +

EnOcean RX interface

+

+

+
+
+
 

'INIT' with

   QI=TRUE: connects to busmaster ENOCEAN_STCEVC_DEV 'InterfaceID'. Triggers 'INITO' with QO=TRUE, or QO=FALSE when the connection fails - Note: the master has to be INIT

first.

   QI=FALSE: deconnect from Master.

'SETID' with QI=TRUE changes SensorID and MatchBaseID on the fly, avoiding the full INIT overhead.

'IND' is triggered when the ENOCEAN_STC_EVC (gateway) receives a EnOcean telegram with a RecSensorID matching to SensorID. Match is equal, SensorID=0, or optionally with 'matchBaseID=TRUE' set comparing only the SensorID-basemask bits.

The received data is

'PkType' a BYTE EnOcean TYPE/ORG/RORG/CHOICE, with the defined values

   16#05 RPS, Enocean v2, rocker

   16#06 1BS, Enocean v2, contacts

   16#07 4BS, Enocean v2 actuators

The gateway firmware already maps PkType F6 to 05, D5 to 06 and A5 to 07.

'DataByte0..3' BYTE, the 1-Byte RPS and 1BS data is at DataByte3, the coding is defined in EnOcean Equipment Profiles, e.g. Heating valve actuator HVAC using EEP 07-20-01 (see A5-20-01).

'RecSensorID' the EnOCean sender ID of the received telegram 

'StatusByte'  the status-byte of the received telegram 

Note: EnOcean defines transmission order as 3,2,1,0. DataByte3 is transmitted first.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml new file mode 100644 index 000000000..a93604c5a --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + Hubert + Winkler + + hubert.winkler@nxtcontrol.com + +

EnOcean TX interface

+

+
+

+ 'INIT' with

   QI=TRUE: connects to busmaster ENOCEAN_STCEVC_DEV 'InterfaceID'. Triggers 'INITO' with QO=TRUE, or QO=FALSE when the connection fails - Note: the master has to be INIT

first.

   QI=FALSE: deconnect from Master.

'REQ' sends a EnOcean telegram with

'PkType' a BYTE: EnOcean TYPE/ORG/RORG/CHOICE

  16#05 for a EnOcean RPS telegram - rocker

  16#06 for a EnOcean 1BS telegram - contacts

  16#07 for a EnOcean 4BS telegram - actuators, HVAC..

The EnOcean standard V2.1 defines additional telegram types, and an alternative numbering of PkType (often referred as ORG, RORG or CHOICE), which have equal data definition :

  16#F6 for RPS 

  16#D5 for 1BS  

  16#A5 for 4BS.

'DataByte0..3' BYTE, contains the 4 data bytes. The 1-Byte telegram types RPS and 1BS use DataByte3.

'StatusByte' is the received EnOcean-status byte, contains 4 status bits, and 2 bits transmission count, 2bit repeater count. Only RPS telegrams carry valuable information in the status bits, the counters should be 0.

The 32bit EnOcean-ID of the sent telegram is built from the Gateway_Enocean_ID + AepId [0..127]. Each gateway reserves a range of 128 unique EnOceanIds, the allocation and persistent storage is handled in the AEP_LIST Gateway function block ENOCEAN_STCEVC_DEV. A instantiated ENOCEAN_OUT gets its reserved number, a new one allocates the lowest free number.

Notification about successful transmission occurs in the ENOCEAN_STCEVC_DEV function block via 'IND' and STATUS="TX OK"

Notes:

 EnOcean defines transmission order as 3,2,1,0. DataByte3 is the first one. 1-Byte Packets (RPS,1BS) use only DataByte3.

 Gateway is the ENOCEAN_STCEVC_DEV function block with same 'InterfaceId'.

 The Gateway must be set to mode "send 3 times" to overcome the RX/TX collisions on the RS485 bus.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml new file mode 100644 index 000000000..4cd47d11e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

Interface to Thermokon STC65-RS485-EVC EnOcean-Serial-Gateway

support for send and receive of RPS/1BS/4BS telegrams

+

+

+
+

+

'INIT' with

 'QI'=TRUE initializes the bus InterfaceID with the serial interface parameters 'Com'.

 'QI'=FALSE closes the serial device.

triggers 'INITO' with

 'QO=TRUE : signals success, 'STATUS'="OK"

 'QO'=FALSE : signals failure with error message in 'STATUS'

Note: INIT of connected ENOCEAN_IN and ENOCEAN_OUT function blocks with same InterfaceID must be triggered after INIT, .

 

'REQ' with 'QI'=TRUE is used to send 'GatewayCommand' to the device when 'QI'=TRUE.

 notifications via 'IND' are made later upon TX-start, tX-timeout, TX-repetitions and OK-acknowledge.

'AEP_QUERY' with 'QI'=TRUE occurrence will refresh the 'AepList' 'AepList' and produce an 'AEP_IND' event.
AepList is a listing of all registered actuator end points in the form of <apath0>,<aid0>|<apath1>,<aid2>|<apathN>,<aidN>
<apath> is of type STRING and represents the path to the ENOCEAN_OUT FB ex. CAT1.CAT2.Composite1.Composite2.enOceanOut1
<aid> is of type UINT and represents the actuator adress ex. 123

'AEP_ADD' Occurrence will add an new actuator with 'AepPath' and 'AepId' to the 'AepList' and produce an 'AEP_IND' event
If the given AepId is already assigned to some other AepPath in the AepList the request fails with an error message

'AEP_DEL' will delete an actuator from the aepList and produce an AEP_IND event

'AepPath' with * as content will delete the whole list

'AepPath' with '' emtpy string as content will delete the entry that matches AepId 

'AepPath' with <some.path> as content (without braces) will delete the entry that matches AepPath, AepId will not be evaluated

Input Variables:

QI =TRUE enables the triggered action, QI=FALSE disables the action.

'InterfaceID' is a string defining the bus, and to describe the EnOcean gateway and all connected ENOCEAN_IN and ENOCEAN_OUT function blocks. e.g. "EnOcean1". Spaces are allowed.

'Com' is the serial device and parameters as used in SERIALIO. Default is "dev=COM1: baudrate=9600 bits=8 stopbits=1 parity=odd", in Linux/CUB use dev=/dev/ttyAPP0

'GatewayAddress' must match the DIP-switch setting 0..63 of the gateway [default 0].

'GatewayCommand' is used to send proprietary control commands to the gateway. It is a Hex-String with 2 characters per byte, the message is prepended with the necessary Sync bytes A5 5A, then the defined data is filled, afterwards padded with zeros, checksum calculation, GatewayAddress.

Some examples:

AB 58  : read the Gateway -Enocean Id

FF FF FF 00 FF  : set mode Gateway with 3x transmission

6B 05 0 0 0 0 12345678 0 :  prepend any regular enocean telegram with 6B

'AepPath' is used to identify an ENOCEAN_OUT function block in AEP_ADD and AEP_DEL. Besides the special setting "*" and "" (empty) id is the Function Block name. if AepList is "RES0.FB3,2|RES0.FB2,0", to address the 2nd entry enter "RES.FB2"  Note: the " are not part of the strings.

'AepId' is the sender id 0..127 used in AEP_ADD and optionally in AEP_DEL

 

Output Events

'INITO' is the response for 'INIT', errors

success with QO=TRUE, STATUS="OK" or "TX OK", or harmless information as "repeated", "1st/2nd/3rd TX#2", "TX#1/2 timeout", "

QO=FALSE, STATUS="TX#3 timeout", "chksum", "RX Error", "SYNC1 error", these indicate hardware problems.

 

'IND' : Events releated to RX and TX of EnOcean messages.

success with 'QO'=TRUE, 'STATUS'="OK" or "TX OK",

error with 'QO'=FALSE, 'STATUS'=error message

'Message' is the associated EnOcean message, received or transmitted.

Upon RX, "OK", "repeated", chksum fail

 

A normal receive sequence looks like

IND QO=TRUE STATUS="OK" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:20" : delivered to ENOCEAN_IN

IND QO=TRUE STATUS="repeated" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:24" : repetition, skipped

IND QO=TRUE STATUS="repeated" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:28" : repetition 2, skipped, this strings stay visible during watch

 

Note: Transmission via ENOCEAN_OUT or 'REQ'-GatewayCommand fires 3 IND events in short time, Watching finally shows the latest result.

IND QO=TRUE STATUS="1st TX" MESSAGE="GW:0 ORG:58 DB:00 00 00 00 ID:00000000 st:00" : send a 'AB 58 ' GatewayCommand, the 'AB'  is not visible not shown here

IND QO=TRUE STATUS="OK" MESSAGE="GW:0 ORG:98 DB:FF ED 90 80 ID:00000000 st:00"  : received a GW-ID message from gateway with its ID as data

IND QO=TRUE STATUS="TX OK" MESSAGE="GW:0 ORG:58 DB:00 00 00 00 ID:00000000 st:00" :  this stays visible during watch

 

TX failure will end

 

'AEP_IND' : Response for each AEP_QUERY, AEP_ADD and AEP_DEL Input Event, fills current AepList,

 success with QO=TRUE, STATUS="OK"

 error with QO=FALSE, STATUS=error message : AepId already used|AepPath: no connected output found|GatewayAddress must be in range 0..63|AepId not used|AepPath not found

AepList is a ist of the entries , "<name0>,<id0>|<name1>,<id1>|...|<nameN>,<idN>". Ordered by internal hash value.

 

+

+

diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml new file mode 100644 index 000000000..05389995d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for ETHERCAT hardware access

+

+
+

This function block is internally used for ETHERCAT hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml new file mode 100644 index 000000000..05389995d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for ETHERCAT hardware access

+

+
+

This function block is internally used for ETHERCAT hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml new file mode 100644 index 000000000..05389995d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for ETHERCAT hardware access

+

+
+

This function block is internally used for ETHERCAT hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml new file mode 100644 index 000000000..05389995d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for ETHERCAT hardware access

+

+
+

This function block is internally used for ETHERCAT hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml new file mode 100644 index 000000000..1cd7b347d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml @@ -0,0 +1,21 @@ + +
+ + + + + + + + +

This function block is used for initialization sequences.

EVENTCHAIN belongs to EVENTCHAINHEAD. It implements a selectable number of chain links that belong to one EVENTCHAINHEAD and enables you to control the whole chronological order of this chain, because the priority of every EVENTCHAIN can be set (input 'PRIO').

All EVENTCHAIN-blocks belonging to one EVENTCHAINHEAD have to be named equally (at input 'NAME').

+

'NAME', 'PRIO' and 'INVERT' Do not change

+

+
+

+ Temporal Behavior

'REGISTER'-Event input:

This input is used internally. It has to be left unconnected. It registers the funktionblock after starting the system.

 

'TRIGGER'-Event input:

This input has to be left unconnected, it is used internally when the 'TRIGGER'-eventinput of the EVENTCHAINHEAD is actuated. The 'TRIGGER'-Event of the first EVENTCHAIN-block gets its signal to start and fires its 'EO'-output. But the next EVENTCHAIN-block (with a lower priority) will be triggered not until the 'ACK'-event of the active EVENTCHAIN-block gets the signal that this part of the chain is ready.

 

'ACK'-Event input:

Acknowledge of this part of the chain is ready. The next EVENTCHAIN with lower priority is triggered after the delay time (if set).

 

'EO'-Event output:

This output is fired as a result of triggering the EVENTCHAIN. The signal triggers the REQ or INIT Event inputs of the corresponding functionblocks, then it is to be looped back to 'ACK'-Event input.

 

Functional Behavior

'TIMEOUT'-input:

Defines the maximum time to wait before an internal 'ACK'-signal is produced. Prevents the chain from unintended dead halt, if it never gets an 'ACK'-signal because of an unexpected fault. After the defined time the next EVENTCHAIN in row will be triggered anyway. (If 'TIMEOUT' value is t#0s it is disabled.) Datatype is TIME.

 

'DELAY'-input:

Defines the time to elapse between the incoming 'ACK'-signal and the 'TRIGGER'-signal for the start of the next EVENTCHAIN in row (respectively the 'TRIGGERNEXT'-event of the EVENTCHAINHEAD. Datatype is TIME.

 

'NAME'-input:

Datatype is STRING. The name of the chain is to be specified here. In all EVENTCHAIN functionblocks of this chain the same name has to be used.
The name can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'PRIO'-input:

This input is to set priorities. If it is not defined, the order of EVENTCHAIN-processing will be accidentally. Datatype is USINT.
This value can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'INVERT'-input:

Datatype is BOOL. If it is set TRUE, 0 is the lowest priority range, means the last to process.
If it is set FALSE, 0 has the highest priority range. If the functionblock has priority 0 it will process first.
Attention: All EVENTCHAINs belonging to one EVENTCHAINHEAD must have the same setting. If one of the EVENTCHAINs is set to TRUE while the EVENTCHAINHEAD and all the appropriate EVENTCHAINs are set to FALSE, this one EVENTCHAIN will not work, because this would be handled like it has another name than the EVENTCHAINHEAD.
'INVERT' can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml new file mode 100644 index 000000000..5e53b3484 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml @@ -0,0 +1,22 @@ + +
+ + + + + + + + +

This function block is used for initialization sequences.

EVENTCHAINHEAD belongs to EVENTCHAIN. It implements the head of a selectable number of EVENTCHAIN-blocks that enables you to control the whole chronological order of this chain, because the priority of every EVENTCHAIN can be set (input 'PRIO').

All EVENTCHAIN-blocks belonging to one EVENTCHAINHEAD have to be named equally (at input 'NAME').

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Registers and sorts all EVENTCHAIN-blocks belonging to the same chain (same chain-name)

- Then 'INITO' is fired.

 

'TRIGGER'-Event input:

Starts the Eventchain funktionblocks of this chain. When 'TRIGGER' of the EVENTCHAINHEAD is actuated the 'TRIGGER'-Event at the first EVENTCHAIN-block gets its signal to start and fires its 'EO'-output. But the next EVENTCHAIN-block (with a lower priority) will be triggered not until the 'ACK'-event of the active EVENTCHAIN-block gets the signal that this part of the chain is ready.

 

'TRIGGERNEXT'-Event input:

Has to be left unconnected, because it is used internally and triggers the following EVENTCHAIN on its own, when the currently active EVENTCHAIN has finished.

 

'INITO'-Event output:

Is fired when the funktionblock is initialized. To start the chain immediately, connect this output with the 'TRIGGER'-Event input.

 

'FINISHED'-Event output:

Is fired when all EVENTCHAIN funktionblocks of this chain are finished.

 

'IND'-Event output:

This event indicates a change of state of 'RUNNING' and every 'INIT'-Event. It is fired directly after 'INIT' (while 'RUNNING' = FALSE) and after that, when 'RUNNING' changes. That means  after  a 'TRIGGER'-Event (TRUE) and after a fired 'FINISHED'-Event (FALSE).

 

Functional Behavior

'NAME'-input:

Datatype is STRING. The name of the chain is to be specified here. In all EVENTCHAIN functionblocks of this chain the same name has to be used. The name can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'INVERT'-input:

Datatype is BOOL. If it is set TRUE, 0 is the lowest priority range, means the last to process.
If it is set FALSE, 0 has the highest priority range. EVENTCHAIN functionblocks with priority 0 will process first.
Attention: All EVENTCHAINs belonging to one EVENTCHAINHEAD must have the same setting. If the EVENTCHAINHEAD is set to TRUE while all the appropriate EVENTCHAINs are set to FALSE, they all will not work, because this would be handled like they have another name than the EVENTCHAINHEAD.
'INVERT' can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'RUNNING'-output:

Datatype is BOOL. It shows the state of the chain. It is TRUE when the EVENTCHAINHEAD has started with starting its EVENTCHAIN FBs, and it turns to FALSE again after the last EVENTCHAIN is ready (means, the last EVENTCHAIN has got its 'ACK'-Event and the EVENTCHAINHEAD fires the 'FINISHED'-Event).
In case of no existing EVENTCHAIN FBs, or if 'NAME' of the EVENTCHAIN is not set correctly, this output state will never be TRUE.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml new file mode 100644 index 000000000..32d9ae375 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml @@ -0,0 +1,50 @@ + +
+ + + + + + + + +

 

 

+ + + + + + +
[caution]TITLE
+

This FB is obsolete and will be supported no longer.

+

Please use PRIOSCHEDULER instead.

This function block is used for time scheduler sequences.

This is a generic function block, the number of Channels can be defined from 1 to 64. The data type of all ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

If input 'QI' is TRUE the initialization of the block can happen

 'QO' is set to TRUE

 'INITO' is fired

If input 'QI' is FALSE the block will be deinitialized

 'QO' is set to FALSE

 'INITO' is fired

 

'SET'-Event input:

If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

 A 'SETO'-Event is fired

If 'QI' is FALSE no further action (FB deinitialized)

 

'INITO'-Event output:

is fired after each INIT

 

'SETO'-Event output:

is fired after a triggered SET, if the FB is initialized properly

 

'IND'-Event output:

is fired when defined point of time out of SCHEDULE occurs, in conjunction with that the respective CHANNEL containes the defined value.

After an INIT when the FB looks back in time for the last event to set, it will provide a value at one or more channels but in this case no IND-event is fired.

 

Functional Behavior

'QI'-input:

if TRUE, function block can be initialized.

If set FALSE the block will be deinitialized.

 

'FIRSTCHANNEL'-input:

Defines the channel number of CHANNEL1. CHANNEL1 is equal to FIRSTCHANNEL. CHANNEL2 gets the number of CHANNEL1 plus one.

If FIRSTCHANNEL=0 CHANNEL1=0

With this feature it is possible to use several EVENTSCHEDULER blocks with various channel definitions but only one list to provide 'SCHEDULE'.

 

'MAXINITTIME'-input:

Maximum time the FB looks back in time after INIT to trigger an event that has to happen. This is to fetch the event that has happened before the INIT event has arrived. Only the last event out of the list, that had happened before INIT and within the MAXINITTIME, will be considered. The FB will look no further back in time, even if MAXINITTIME is set to 24 hours or more.

 

'SCHEDULE'-input:

Use the cron format for the SCHEDULE string. If using a list of sequences, seperate them with a semicolon.

Format:

(min hr day mon wday year ch val; min hr...)

each value can be a single number or a list of numbers divided by a comma (min,min hr,hr,hr day mon wday year ch val,val; min hr...)

Possible values:

general: * means always, it is used if no specific value is set

min: [*] [0-59] hr: [*] [0-23] day: [*] [1-31] mon: [*] [1-12]

wday: [*] [0-7] 0 and 7 = sunday, 1 = monday, 2 = tuesday, etc.

year: [*] [####]

ch: [0 - 999999] this value has to be the result of the 'CHANNELn' output number of the FB + the defined value of 'FIRSTCHANNNEL'-input

val: [0 - 999999]

 

Examples:

+ + + + + + + + + + + + + + + + + +
Scheduler example strings
StringDescription
0 * * * * * 0 1Sets on every hour, on minute 0 channel 0 to value 1
30 7 * * * * 1 50Sets every day on 07:30 channel 1 to value 50
0 17 1 1,2 * * 2 80Sets on first january and first february on 17:00 the channel 2 to value 80
15,45 * * * 1,3 * 3 0Sets on monday and wednesday every hour on minute 15 and 45 channel 3 to value 0

 

 

 

 

 

 

 

 

The definition of the point of time can only be the exact minute. Somewhere in this defined minute the event will happen.

 

'QO'-output:

shows status of the block

TRUE is ready

FALSE is deinitialized or error

 

'STATUS'-output:

Blank if no error

Shows error message when an error occures. (i.e.: Syntax error in schedule definition at position 21)

If a SET is triggered but the FB is deinitialized a specific error message will appear not until the FB is initialized properly.

 

'CHANNELn'-output:

Outputs value(s) defined at 'SCHEDULE'

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml new file mode 100644 index 000000000..4d9985ffb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements an event-driven up-counter with a reset input which changes the state of output 'Q' when a predefined value has been reached.

+

+
+

+ Temporal Behavior

Each 'CU'-Event counts up 'CV' by one and fires a 'CUO'-Event. If the 'PV'-input value is equal or greater than the 'CV' value output value 'Q' shows TRUE. For a restart, the counter needs a reset via the 'R'-Event input.

 

Timing diagram (example with PV=2):

 

'CU'-Event input:

- Increments the value of the 'CV'-output by one

- Captures the value of the 'PV'-input

- Fires the 'CUO'-Event

 

'R'-Event input:

- Sets 'CV'-output to the value zero

- Sets 'Q'-output to FALSE

- Fires the 'RO'-Event

 

Functional Behavior

The 'CV'-output value contains the number of triggered 'CU'-Events since startup resp. since the last 'R'-Event. The maximum value at 'PV' must be smaller than 65535.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml new file mode 100644 index 000000000..7fdd93970 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block provides a cyclic event generator with a configurable period which can be started and stopped.

For cyclic events which require a high-resolution timing or a phase parameter it is recommend to use the E_HRCYCLE function block.

+

+
+

+ Temporal Behavior

'START'-event input: When a 'START'-Event is detected, the value of the 'DT'-input is captured and a cyclic timer starts. The 'EO'-Event is fired every time when the period, defined by 'DT', expires. Then the timer is restarted. It remains active until a 'STOP'-Event will be applied.

In the case when a timer is already active and a new 'START'-Event is applied then the event will be ignored.

'STOP'-event input: A 'STOP'-Event cancels a current active timer. It will be ignored when no timer is active.

 

Functional Behavior

The 'DT'-input value is interpreted as the IEC-TIME duration format.

If the 'DT'-input is set to zero then the minimum cycle time is internally set to a default value. Note: A very small value generates a high frequency of output events which will significantly increase the processor load.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml new file mode 100644 index 000000000..7fb0f84fb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml @@ -0,0 +1,24 @@ + +
+ + + + + + + + +

This function block passes an event to the output after a configurable delay. The delay generation can be started and stopped.

+
+

+ Temporal Behavior

+

When a 'START'-Event is detected, the value of the 'DT'-input is captured and a delay-timer is started. When the timer expires then the 'EO'-Event is fired. The timer is NOT restarted. Only a new 'START'-Event activates the timer again with an ev. new 'DT'-input value.

+

In the case when a delay-timer is already active and a new 'START'-Event is applied then the event will be ignored.

+

The timer remains active until a 'STOP'-Event is detected. A 'STOP'-Event will be ignored when no timer is active.

+

 

+

Functional Behavior

+

The 'DT'-input value is interpreted as the IEC-TIME duration format.

+

If the 'DT'-input is set to zero then the 'START'-Event is immediately passed through to the 'EO'-Event output within a minimum internal delay.

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml new file mode 100644 index 000000000..a542ce6e2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml @@ -0,0 +1,28 @@ + +
+ + + + + + + + +

This function block passes an event to the output after a configurable delay. The delay generation can be started/restarted and stopped.

+
+

+ Temporal Behavior

+

When 'START' is triggered just one delayed Event at 'EO' will be actuated. The delay-time can be defined at input 'DT'.

+

If a 'RESTART' signal comes in, before the last started Event at 'EO' could be fired, the delay time for the Event starts new. A second 'START' signal that comes in before the 'EO' is fired will be ignored.

+

 

+

Temporal Behavior

+

When a 'START'-Event is detected, the value of the 'DT'-input is captured and a delay-timer is started. When the timer expires then the 'EO'-Event is fired. The timer is NOT restarted automatically. The timer may be restarted by a 'RESTART'-Event or by applying a new 'START'-Event. In both cases the 'DT'-input value will be captured and applied for the new delay time.

+

In the case when a delay-timer is already active and a new 'START'-Event is applied then the event will be ignored. But a 'RESTART'-Event cancels the current delay-timer and restarts it with the initial value captured at the 'DT'-input.

+

The timer remains active until a 'STOP'-Event is detected. A 'STOP'-Event will be ignored when no timer is active.

+

 

+

Functional Behavior

+

The 'DT'-input value is interpreted as the IEC-TIME duration format.

+

If the 'DT'-input is set to zero then the 'START'-Event is immediately passed through to the 'EO'-Event output within a minimum internal delay.

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml new file mode 100644 index 000000000..0db9b37da --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml @@ -0,0 +1,24 @@ + +
+ + + + + + + + +

This function block implements an event demultiplexer. An input event is passed to different selectable outputs.

+

+

+

+
+

+ Temporal Behavior

'EI'-Event input: At every 'EI'-Event the 'K'-input value selects the 'EOn'-Event output line where the input event is passed.

'EO0'-, 'EO1'-, 'EO2'-, ...Event outputs: Depending on the value of the 'K'-input only one of this event outputs will pass the event through.

 

Timing diagram:

+

 

Functional Behavior

The 'K'-input value selects which 'EOn'-Event output is selected. The 'K' input value is limited to the maximum number of 'EO'-Event outputs. If the value exceeds the limit then no output event is fired.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml new file mode 100644 index 000000000..86c9dab16 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml @@ -0,0 +1,21 @@ + +
+ + + + + + + + +

This function block implements a latch which captures the data input at the clock event and when the input data has been changed, the data output is updated and an output event is fired.

+

+
+

+ Temporal Behavior +

At every 'CLK'-Event the 'D' input status is captured and compared with the value of 'Q' output. When they are not equal then 'Q' is set to 'D' and the 'EO'-Event is fired.

 

Timing diagram:

+

 

'CLK'-Event input:

- If the 'D'-input value is not equal with 'Q' then

    - 'Q'-output is set to 'D'

    - The 'EO'-Event is fired

- Else

    - 'Q' output is not changed

    - No 'EO'-Event is fired

 

Functional Behavior

The 'Q'-output value is only set to 'D'-input when special conditions are met.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml new file mode 100644 index 000000000..018da7bb4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a falling edge detection of the input which is synchronised to the input event.

+

+
+

+ Temporal Behavior

Each 'EI'-Event performs a check of input 'QI', 'EO' will be fired once when a transition of 'QI' from TRUE to FALSE has been detected.

 

'EI'-Event input:

- The current status of the 'QI' input is compared with the one captured at the previous 'EI'-Event:

    - If the 'QI'-input status did not change OR had a transition from FALSE to TRUE then no 'EO'-Event is fired

    - If the 'QI'-input status had a transition from TRUE to FALSE then the 'EO'-Event is fired

- The current status of the 'QI'-input is captured

 

Functional Behavior

'QI'-input is captured at every 'EI'-Event.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml new file mode 100644 index 000000000..ad0fd2d4e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml @@ -0,0 +1,26 @@ + +
+ + + + + + + + +

This function block provides a high-resolution cyclic event generator with a configurable period and phase which can be started and stopped.

+
+

+ Temporal Behavior

+

When a 'START'-Event is detected, the values of the 'PERIOD'- and 'PHASE'-inputs are captured and a cyclic timer is started. The 'EO'-Event is fired every time when the timeout calculated by ('PERIOD' + 'PHASE') microseconds expire. Then the timer is restarted. It remains active until a 'STOP'-Event will be applied.

+

In the case when a timer is already active and a new 'START'-Event is applied then the timer is restarted with the 'PERIOD' and 'PHASE' settings taken at the new event.

+

A 'STOP'-Event cancels a current active timer. It will be ignored when no timer is active.

+

 

+

Functional Behavior

+

The 'PERIOD'- and 'PHASE'-input values are interpreted as microseconds.  

+

If the 'PERIOD'-input is set to zero then the minimum cycle time is internally limited to a default minimum value. Note: A very small value generates a high frequency of output events which will significantly increase the processor load.

+

The 'PHASE'-input can also be set to a zero value. On the other hand, if the value is equal or greater than 'PERIOD' then 'PHASE' is internally truncated to zero.

+

 

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml new file mode 100644 index 000000000..a24dec5ee --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block passes incoming events of different inputs to one common event output.

+

+

+
+

+ Temporal Behavior

Incoming events on 'EI1'-Event input or 'EI2'-Event input are immediately passed to the 'EO'-Event output.

 

Timing diagram:

+

+

Functional Behavior

The order of events at 'EI1'- and 'EI2'-Event input is not relevant. The sum of input events is equal to the number of output events.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml new file mode 100644 index 000000000..543dfadd8 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block generates single events at each of the event outputs where the number of events and the interval between each event is configurable.

 

+

+

+

+
+ +
Temporal Behavior

'START'-Event input: When a 'START'-Event arrives, the values of the 'N'-input and the 'DT'-input are read, then one output event at 'EO[0]' is produced after period TIME[0]. The next event is fired at EO[1] after TIME[1] period. And so on, until 'N' event outputs have been fired. 

Please note: If a new 'START'-Event arrives before the set of events has been fired entirely, the function block will start up again from the beginning. Events that have not been fired within the last period (because the time between the two 'Start'-Events was to short) will be discarded.

Please note: The maximum number of event outputs is implementation dependent.

'STOP'-Event input: The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

Then a subsequent 'START'-Event can trigger a new set of output events. 

 

Functional Behavior

'DT'-input: The 'DT'-input value is interpreted as an array of the IEC-TIME duration format, for example: "[t#1s,t#20ms,t#4s]". The maximum number of entries is equal to the number of Event outputs of the function block.

'N'-input: Defines the number of events to generate. If the value of the 'N'-input is larger than the number of Event outputs of the function block 'N' will be truncated, if it is smaller than the number of entries in the list of 'DT', only the first entries (as much as N) will work. The remaining entries are ignored.

Please note: 'N' must not be larger than the 'DT'-array is. The time for generating events that are not parameterized at 'DT' is not defined, but the events will be fired anyway.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml new file mode 100644 index 000000000..8efabce23 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block passes an incoming event to the output event when a condition is TRUE.

+

+
+

+ Temporal Behavior

An event at 'EI'-Event input is passed to the 'EO'-Event output when the status of the 'PERMIT-input is TRUE. If 'PERMIT' is FALSE then the input event is purged.

 

Timing diagram:

 

Functional Behavior

-

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml new file mode 100644 index 000000000..3f133c094 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block implements a rendezvous between two events.

It ensures that the output event will only be triggered after both input events have arrived and no reset event has occurred in the meantime.

+

+
+

+ Temporal Behavior

'EO' is fired if there has an 'EI1'-Event and an 'EI2'-Event occurred.

'R': If 'R'-Event input is triggered before the second event has arrived, the FB starts from beginning.

 

Timing diagram:

+

 

 

'EI1'-Event input:

- If there is an 'EI2'-Event stored then

    - Clear the 'EI2'-Event

    - Fire the 'EO'-Event

- Else

    - Store the 'EI1'-Event internally 

 

'EI2'-Event input:

- If there is an 'EI1'-Event stored then

    - Clear the 'EI1'-Event

    - Fire the 'EO'-Event

- Else

    - Store the 'EI2'-Event internally 

 

'R'-Event input:

- Clear a stored 'EI1'-Event

- Clear a stored 'EI2'-Event

 

Functional Behavior

-

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml new file mode 100644 index 000000000..cf55df688 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block generates several events which indicate different resource start conditions or when the resource will be stopped.

+

+
+

+ Temporal Behavior

'COLD'-Event: Generates one event after a coldstart (power-on boot) of the resource.

'WARM'-Event: Generates one event after a soft-reset (restart) of the resource.

'STOP'-Event: Generates one event before the resource is stopped.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml new file mode 100644 index 000000000..000d82aac --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block implements an event-driven bistable Flip-Flop with a dominant Reset input. An output event is only generated when the output changes its state.

+

+

+
+

+ Temporal Behavior +

The 'EO'-Event output is fired when the 'Q'-output changes its state. Multiple events on the same input, regardless of 'R' or 'Q' would not generate any ouput event(s) on 'EO'.

 

Timing diagram:

+

 

example:

1) Q is FALSE, event at input 'S', result: Q is TRUE, 'EO' fires an event

2) Event at input 'S', result: Q is TRUE (does not change its state), 'EO' fires no event

3) Event at input 'R', result: Q is FALSE, 'EO' fires an event

4) n-Events at input 'R', result: Q is FALSE (does not change its state), 'EO' fires no event

 

Functional Behavior

If an event at 'S'-Event input is detected then the 'Q'-output is set to TRUE. If an event at the 'R'-Event input is detected then 'Q'-output is set to FALSE.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml new file mode 100644 index 000000000..a61481b15 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a rising edge detection of the input which is synchronised to the input event.

+

+
+

+ Temporal Behavior

Each 'EI'-Event performs a check of input 'QI', 'EO' will be fired once when a transition of 'QI' from FALSE to TRUE has been detected.

 

'EI'-Event input:

- The current status of the 'QI' input is compared with the one captured at the previous 'EI'-Event:

    - If the 'QI'-input status did not change OR had a transition from TRUE to FALSE then no 'EO'-Event is fired

    - If the 'QI'-input status had a transition from FALSE to TRUE then the 'EO'-Event is fired

- The current status of the 'QI'-input is captured

 

Functional Behavior

'QI'-input is captured at every 'EI'-Event.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml new file mode 100644 index 000000000..0f1717be6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block passes events of two selectable inputs to one common event output.

 

+

+
+

+ Temporal Behavior

If the 'G'-input is FALSE then all events from 'EI0' are passed to the 'EO'-Event output else all events from 'EI1' are passed to the 'EO'-Event output.

E_SELECT timing diagram:

 

Timing diagram:

+

 

Functional Behavior

The status of the 'G'-input selects which event is passed to the output.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml new file mode 100644 index 000000000..cae186af5 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml @@ -0,0 +1,22 @@ + +
+ + + + + + + + +

This function block implements an event splitter. One input event generates two output events.

+

+

+
+

+ Temporal Behavior

An event at the 'EI'-Event input generates two events while the first is passed to the 'EO1'-Event output and the second to the 'EO2'-Event output.

 

Timing diagram:

+

Because it is technically not possible that two events emerge completely simultaneously, they will emerge barely consecutively.


Functional Behavior

-

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml new file mode 100644 index 000000000..8398af3d1 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block implements an event-driven bistable Flip-Flop with a dominant Set input. An output event is only generated when the output changes its state.

+

+

+
+

+ Temporal Behavior +

The 'EO'-Event output is fired when the 'Q'-output changes its state. Multiple events on the same input, regardless of 'R' or 'Q' would not generate any ouput event(s) on 'EO'.

 

Timing diagram:

+

 

example:

1) Q is FALSE, event at input 'S', result: Q is TRUE, 'EO' fires an event

2) Event at input 'S', result: Q is TRUE (does not change its state), 'EO' fires no event

3) Event at input 'R', result: Q is FALSE, 'EO' fires an event

4) n-Events at input 'R', result: Q is FALSE (does not change its state), 'EO' fires no event


Functional Behavior

If an event at 'S'-Event input is detected then the 'Q'-output is set to TRUE. If an event at the 'R'-Event input is detected then 'Q'-output is set to FALSE.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml new file mode 100644 index 000000000..1376c1f03 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml @@ -0,0 +1,22 @@ + +
+ + + + + + + + +

This function block passes events of one input to one of two selectable event outputs.

+

+

+
+

+ Temporal Behavior

If the 'G'-input is FALSE then all events from 'EI' are passed to the 'EO0'-Event output, else all events are passed to the 'EO1'-Event output.

 

Timing diagram:

+

 

Functional Behavior

The status of the 'G'-input selects to which event output the incoming event is passed.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml new file mode 100644 index 000000000..8b1a9f906 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block generates events whereby the number of events and the interval between each event is configurable.

 

+

+
+

+ Temporal Behavior

The number of events is defined by the 'N'-input and the time interval between the output events is given by the time array set on 'DT'-input.

When a 'START'-Event is detected, the values of the 'N'-input and the 'DT'-input are read, then an output event at 'EO' is produced after a period TIME[0]. The 'CV'-output is set to '0' which is the current event index. The next event is produced after a period TIME[1]. 'CV' is set to '1'. And so on, until the number of events fired at 'EO' matches the value of 'N'. 

The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

Then a subsequent 'START'-Event can trigger a new set of output events. 

Please note: If a new 'START'-Event arrives before the set of events has been fired entirely, the function block will start up again from the beginning. Events that have not been fired within the last period (because the time between the two 'Start'-Events was to short) will be discarded.

 

Functional Behavior

'DT'-input: The 'DT'-input value is interpreted as an array of the IEC-TIME duration format, for example: "[t#5s,t#120ms,t#4s]". The maximum number of entries is emplementation dependent (standard is 16).

If the value of the 'N'-input is larger then the number of entries in the list of 'DT' then 'N' will be truncated.

'N'-input: Defines the number of events to generate. If the value of the 'N'-input is larger than the number of Events allowed (implementation dependent) 'N' will be truncated, if it is smaller than the number of entries in the list of 'DT', only the first entries (as much as N) will work. The remaining entries are ignored.

Please note: 'N' must not be larger than the 'DT'-array is. The time for generating events that are not parameterized at 'DT' is not defined, but the events will be fired anyway.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml new file mode 100644 index 000000000..ed976d313 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block generates a train of events at one output. The number of events and the interval between the events is configurable. This act of generating events can be started and stopped.

+

+
+

+ Temporal Behavior

The number of events is defined by the 'N'-input and the time interval between the output events is given by the 'DT'-input.

When a 'START'-Event is detected, the values of the 'N'-input and the 'DT'-input are read, then 'N' output events at 'EO' are generated with an interval defined by the 'DT'-input. The 'CV'-output is updated at every event with the event index which starts at the value '0'.

The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

A subsequent 'START'-Event can then trigger a new train of output events. 

 

Functional Behavior

'DT'-input: format is IEC-TIME duration, for example: "t#100ms".

'N'-input: defines the number of events to be created.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml new file mode 100644 index 000000000..c37c444a5 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + StanislavFirstname + Meduna + + stanislav.meduna@nxtcontrol.com + +

The FB_DLL implements an interface between a FB and arbitrary functions residing in a dynamically loaded library.

It is a generic function block. The count of event ports and data ports can be defined.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

An instance of this FB dynamically loads a DLL with its implementation at INIT. The DLL is then informed of a new FB instance using it.

A request calls into the DLL, giving the instance and input parameters as arguments. The implementation in the DLL can choose between processing the request synchronously, asynchronously at some later time or wake and do something entirely on its own. In any case it calls back into the FB instance, setting the output data and firing output events.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml new file mode 100644 index 000000000..27c917962 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml @@ -0,0 +1,32 @@ + +
+ + + + + + + + +

The FORCE_IND function block type should be used in applications, especially hardware CATs, to inform the IEC 61499 runtime about any active force mechanism. This is necessary to warn users or operators before leaving some application with activated value forces, which might lead to unexpected behaviour.

+

+

+
+

+ Temporal Behavior

+

'REQ'-Event input:

 The 'active' input variable is copied to the output 'forceActive'. Furthermore the IEC 61499 runtime evaluates the force state of all instances of the FORCE_IND function block in the resource to report a common application force state.

 A 'CNF'-Event is fired

 

+

+

+

+

+

+ Functional Behavior +

'active'-input:

 set the force state of the FORCE_IND function block

 

+

+

'forceActive'-output:

 copy of the 'active' input variable

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml new file mode 100644 index 000000000..9b2832baf --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block calculates a hash value for all combined input strings.

This is a generic function block, the number of input strings INP can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'REQ'-Event input:

 The hash value for all given input string 'INP' is calculated according to selected algorithm 'ALGO' and written to output string 'OUT' using the selected format 'FORMAT'

 A 'CNF'-Event is fired

 

Functional Behavior

'ALGO'-input:

 defines the algorithm to be used to calculate the hash value for all combined input strings

 

'FORMAT'-input:

 defines the output format of the calculated hash value

 

'INPn'-input:

 input strings 1..n which to calculate the hash value from

 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml new file mode 100644 index 000000000..ac38cd5b6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is interanlly used to support HMI functions.

+

+
+

This function block is interanlly used to support HMI functions.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml new file mode 100644 index 000000000..370cb5827 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for EIB hardware access

+

+
+

This function block is internally used for EIB hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml new file mode 100644 index 000000000..370cb5827 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for EIB hardware access

+

+
+

This function block is internally used for EIB hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml new file mode 100644 index 000000000..d20da5138 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml @@ -0,0 +1,25 @@ + +
+ + + + + + + + +

This function block provides a logging service which stores the input parameter(s) into a log-file. Different levels for each entry (DEBUG, INFO, WARNING and ERROR) can be selected.

Note: The logging level to be allowed for the device can be set in the properties individually for each device. The default setting is 'Info', that means only info, warning and error would be available, but no debug messages. This setting avoids an overstressing of smaller devices. In order to write debug messages to the log, open the device list, select the device and open Configuration → Debug → Log → Level. Set 'Level' to 'Debug' (or e.g. 'Warning' → no Info and no Debug messages would be available). After a change of the device configuration the new configuration has to be loaded to the device by a right-click on the device in the device list and a click on Deploy → Deploy Configuration. After that the device has to be rebootet. (See also in Studio help → 'Test and Troubleshooting' at item 'Log Files'.)

It is a generic block. The number of 'PARAM'-inputs can be chosen from 1 to 16. The data type of all ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Resets the internal settings

- Captures the 'QI'-input

- If 'QI' is FALSE then

    - The 'QO'-output is set to FALSE

    - 'STATUS'-output is set to "OK"

- Else

    - Captures the string at the 'MESSAGE'-input

    - Parses the string.

    - If an error is detected then

        - 'QO'-output is set to FALSE

        - 'STATUS'-output is set to an error message

    - Else

        - Applies the new settings

        - 'QO'-output is set to TRUE

        - 'STATUS'-output is set to "OK"

- The 'INITO'-Event is fired

 

'REQ'-Event input:

- If 'QO'-output is FALSE (which means that no successful initialization has been performed) then

    - 'STATUS'-output is set to "Not initialized"

    - Performs no processing of 'PARAMn'-inputs.

- Else

    - Captures the 'PARAMn'-inputs

    - Inserts the string of the 'PARAMn'-inputs into the 'MESSAGE' string

    - If the result exceeds the maximum length then

        - 'STATUS'-output is set to "Message too long"

    - Else

        - 'STATUS'-output is set to "OK"

    - Stores the result into the log-file

- The 'CNF'-Event output is fired

 

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

Functional Behavior

'QI'-input:

If the value is TRUE then an initialization is performed, else all existing settings are cleared (deinitialization).

 

'MESSAGE'-input:

Contains the string to be written to the log-file. The 'PARAM'-inputs are insert at the position(s) defined by the ${N} identifier. ${1} corresponds to 'PARAM1', ${2} to 'PARAM2' and so on. The maximum length of the string result ('MESSAGE' string including also the 'PARAMn' strings) must not exceed 255 characters.

 

'LEVEL'-input:

The following values are supported: '0': DEBUG, '1': INFO, '2': WARNING, '3': ERROR. If a value greater than '3' is applied, the 'STATUS'-output is set to "Invalid level".

 

'DEST'-input:

The following settings are available: Cyclic, Sporadic.

Cyclic (default) means, the message is written into the cyclic Log and therefore it will be written just once; if REQ is triggered several times, only the time of last occurrence and the quantity of occurrences will be noted.

Sporadic means the message is written in the usual Log, where every occurrence is logged as an extra message.

 

'PARAM1' ... 'PARAM16'-inputs:

Input string(s) which is(are) inserted into the message string according their position defined in the 'MESSAGE' string at the 'INIT'-Event.

 

'QO'-output:

Shows the initialization status. TRUE is initialized, FALSE is not initialized.

 

'STATUS'-output:

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, the output is set to "OK". If an error has occurred then it contains the specific error message.

 

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml new file mode 100644 index 000000000..f979ab7ad --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for MBUS hardware access

+

+
+

This function block is internally used for MBUS hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml new file mode 100644 index 000000000..f979ab7ad --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for MBUS hardware access

+

+
+

This function block is internally used for MBUS hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml new file mode 100644 index 000000000..c7b9e8f55 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml @@ -0,0 +1,41 @@ + +
+ + + + + + + + +

This function block is internally used for diagnostic information. (MIB: Management Information Base)

It serves to get information by SNMP (Single Network Management Protocol) from the PLC's.

+

This is a generic function block, the number of information-'PATH's can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

 -If input 'QI' is TRUE the initialization of the block can happen

  'QO' is set to TRUE

  'INITO' is fired

 -If input 'QI' is FALSE the block will be deinitialized

  'QO' is set to FALSE

  'INITO' is fired

 

'REQ'-Event input:

 -If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

   A 'CNF'-Event is fired

 -If 'QI' is FALSE only a 'CNF'-Event is fired, no further action

 

 

+

+

Functional Behavior

'QI'-input:

 -If TRUE, function block can be initialized.

 -If set FALSE the block will be deinitialized.

 

'PATHn'-input:

 defines the path from which the information has to be get. (i.e. Device.Name or System.CurrentTime etc.)

 

'INDEXn'-input:

 Default value is 0, this works with all information except tables. Use data type STRING with no entry to have the whole information provided at output VALUEn in a comma separated form. To read some specific part of information out of an array, 'INDEXn' has to be set as required. When using data type UDINT and value 0 at INDEXn the output VALUEn provides the whole information in a comma separated form with data type STRING at VALUEn. (see example below)

 Whether to use data type UDINT or STRING for the INDEXn-input for the specific case has to be taken out of the description of the specific value (i.e. network interfaces are indicated with UDINT, Resources with STRING - i.e. RES1 → see the link to the list of all supported SNMP OIDs below).

 

+

'QO'-output:

 Shows status of the block (TRUE is ready, FALSE is deinitialized)

 

'STATUSn'-output:

 Provides status information, such as OK or specific error messages (i.e. 'not initialized' if 'QI' is FALSE and 'REQ' is fired, 'No MIB entry' if no or a wrong 'PATH' is used, or 'No instance' if a wrong 'INDEXn' is used). When 'QI' is FALSE and 'INIT' was triggered, 'STATUSn' shows OK to state that the deinitializing has been done properly.

 

'VALUEn'-output:

+

 Provides the requested information.

When using data type STRING at output VALUEn and the respective input INDEXn is empty (input data type STRING) or 0 (input data type UDINT) the whole information is shown in a comma separated form. In some cases some other data types are valid too (e.g. for INDEX Project.ApplicationForcesActive : DINT). See the link for the list of all supported SNMP OIDs below.

When using data type DINT at output VALUEn and the respective input INDEXn is STRING (use this form for the STRING: <Source_Resource>.<Destination_Device>.<Destination_Resource> (e.g. RES0.DEV1.RES1)) VALUEn outputs the value for the specified channel. (There is an example for this case below at Example for the usage of data type DINT at output VALUEn.)

 

+

 

 

+ + + + + + +
[tip]List of all supported SNMP OIDs
+

Click here to view a list of all available OIDs: List

+

Please note: INDEX Network.Peers.* require the use of runtime version r16836 (or higher) on all devices.

+

 

Some additional information about the INDEX 'Network.Peers.*':

Basically, the communication of the MIBGET works unidirectionally. The diversification of the function block with the index Network.Peers.*  was implemented to check also the reachability of another runtime.

The index Network.Peers.RemoteResource provides the information which resources basically should have a communication to the resource the MIBGET FB belongs to. It doesn't check whether the communication works, but only whether there is a connection implemented in the project.

The index Network.Peers.Up, on the other hand, shows whether the communication currently works (down = 0 or up = 1).

Example for a MIBGET, shown with watch points:

 

Example for the usage of data type DINT at output VALUEn:

This example refers to the usage of Network.Peers.Up at input INDEXn.

Procedure for correct usage:

- Open the Generic Interface Editor via context menu, after a right-click on the small icon in the bottom right corner of the FB, and set the respective input INDEXn to data type STRING.

- Set the respective output VALUEn to data type DINT.

- Add a constant at INDEXn that defines the communication peer to be checked (in this example the communication from resource RES0 to RES1 of DEV1 → RES0.DEV1.RES1).

- The respective output VALUEn provides the value of the required information.

+

 

 

Status and value information is updated after each triggered REQ event. A wrong definition at input INDEXn would lead to an error message (No instance) at output STATUSn:

+

 

 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml new file mode 100644 index 000000000..d5572b50f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml @@ -0,0 +1,35 @@ + +
+ + + + + + + + +

This function block implements internally a Modbus server.

The function block is internally used for MODBUS direct IO access, it provides data for the clients.

+

This is a generic function block, the number of Channels can be defined from 1 to 64, independently for the input (data to be written to the MODBUS process image) and the output side (data to be read from the MODBUS process image).

Input 'SD' and output 'RD' data type can be selected independently. Input 'default' data type depends on output 'RD'.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Captures the 'QI'-input

- If 'QI' is FALSE then

  - The FB will be deinitialized

  - The 'QO'-output is set to TRUE, when deinitializing was successful

  - 'STATUS'-output is blank, when deinitializing was successful

  - The 'INITO'-Event is fired

- If 'QI' is TRUE then

  - The FB is initialized

  - The 'QO'-output is set to TRUE, when initializing was successful

  - 'STATUS'-output is blank, when initializing was successful

  - Applies the new settings

  - The 'INITO'-Event is fired

- If an error is detected while initializing or deinitializing then

  - 'QO'-output is set to FALSE

  - 'STATUS'-output is set to an error message

  - The 'INITO'-Event is fired

 

'LOAD_RETAIN'-Event input:

  - This event causes the FB to load the values from persistent memory, respectively, if they do not exist, the default values from 'default1-n', to make them available for a 'REQ'.

  - Should follow after 'INIT' to fetch initial data to work with.

 

+

'REQ'-Event input:

- If 'QI'-input is TRUE and 'INIT' has worked properly:

  - A triggered 'REQ' performs the sending of data from input 'SD' to client.

  - default values are not read by a 'REQ', only by a 'LOAD_RETAIN' event.

  - The 'CNF'-Event output is fired.

- If 'QI'-input is FALSE and the FB is deinitialized:

  - 'QO' is TRUE

  - 'STATUS'-output shows an error message not until an anew triggered 'INIT' (i.e.: Not initialized: REQ not allowed).

  - No data will be sent

  - The 'CNF'-Event is fired

+

 

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

+

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired to signalize that data has arrived and is contained at output RD1-n. Any error will be indicated at QO and STATUS.

 

'INDCHG'-Event Output:

This event is fired to signalize that at least one value at output RD1-n has changed with the last arriving data.

 

+

Functional Behavior

'QI'-input:

If the value is TRUE an initialization is performed, else all existing settings are cleared (deinitialization).

 

+

'SDn'-input:

Contains the data ready to be written to Client. Each REQ performs the transfer of this data to the client.

 

'default'-input:

A 'LOAD_RETAIN' event causes the FB to use this default values, if no data from persistent memory is available (after "Delete Persistent Data" or the very first start of the solution).

 

+

+

'QO'-output:

Shows the success of initialization or deinitialization. TRUE is successfully initialized or deinitialized, FALSE shows that an error with 'INIT' has occured.

 

+

'STATUS'-output:

It contains the specific error message if an error has occurred. If a 'REQ' is triggered but the FB is deinitialized, the error message 'Not initialized: REQ not allowed' appears after a new 'INIT' event.

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, there is no message.

 

+

+

'RDn'-output:

Containes the data that has arrived from client ready to be used. An 'IND'-Event will be fired each time when new data is available at this output.

An 'INDCHG' is fired only if at least one value has changed.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml new file mode 100644 index 000000000..7fb466640 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a mathematical multiply operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Multiplies the value of all inputs 'IN1' ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type. 

'OUT' := 'IN1' * 'IN2' * ... * 'INn'

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml new file mode 100644 index 000000000..6afb7a19b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml @@ -0,0 +1,59 @@ + +
+ + + + + + + + +

This function block is used to access a TCP or UDP connection

+

+

+

+

+

+

It is equipped with a 16k buffer to cache data (i.e. if the receiving client is not as fast as the sender). If data cannot be received fast enough, so that the buffer gets overcharged, some parts of the datastream will get lost. There is no warning if that happens, but the discarding of received datablocks is minuted in the cyclic log.

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Captures the QI-input

 - If QI is TRUE: Performs the initialization and applies the PORT and START- and ENDCHARACTER settings. If the TCPIO-Server-functionblock is already running, it will be stopped first. Default communication is TCP, to use UDP the prefix UDP has to be set at input PORT (see below).

    +
  • TCP - only one client can be active at a time, if a second client signs in, the connection to the first client will be closed before the second one can communicate.
  • +

The success of the operation is shown: 'QO' is set TRUE, 'STATUS' is blank, 'INITO' is fired.

 - If QI is FALSE: Performs the deinitialization of the server functionblock. A potentially opened connection will be closed and a sign-in of a client is no longer possible. 'QO' is set TRUE, when the deinitialization has worked properly, and 'STATUS' is blank.

 - If initialization or deinitialization has not worked properly 'QO' is set to FALSE and STATUS will show an error message.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic which means that data at input DATAOUT will be transferred to client and a 'CNF'-Event is fired when the operation was successful.

    +
  • TCP - a client must have signed in, otherwise this event does not work
  • +
  • UDP - basically, data will be sent to the client from which the last package has been received, if there was no receiving at all, this event does not work; if it is necessary to send packages to a specific address use the parameter DestIP:DestPort, as described below at item 'PORT'
  • +

General: address of the client to be sent to is contained at output PEERADDR. The success of the operation is shown at CNF, QO and STATUS.

 

'ACK'-Event input:

This event has to be triggered to signalize the end of processing data from an 'IND'-Event. If some further data is available the function block will place it at 'DATAIN' and then fire an 'IND'-Event.

A triggered 'ACK' with no available data causes the event to remain active and work with the next data.

As soon as data is available at 'DATAIN'-output an IND-Event is fired to signalize it and this action is finished. If some further data is present, it will be provided at DATAIN and a new IND-Event is fired. This process will be repeated until no further data is available.

 

'INITO'-Event output:

This event is fired when an 'INIT'-Event has happened (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired when data has arrived from a client. The data is contained at output DATAIN, the address from the client at PEERADR and any error will be indicated at QO and STATUS.

+
+

'ERRIND'-Event output:

This event is fired when an error is indicated. The error reason can be read at data output 'STATUS'.

 

+ Functional Behavior

'QI'-data input:

Input Event Qualifier TRUE: initialize will work with an INIT-Event. FALSE: an INIT-Event will deinitialize the functionblock.

 

'ENDPOINT'-data input:

This parameter sets the communication port  for the server functionblock to wait for the clients, or for the client to address the server. The portnumber must be in a range from 1 to 65535, depending on operating system (in some case 1024-65535).

To use TCP set the prefix "TCP:" (or no prefix would use also TCP), to use UDP set the prefix "UDP:" and then the portnumber (i.e.: UDP:1024).

If there is given only a portnumber (and optionally an IP address first) the FB will work in server mode.

If there are given [IP address]:portnumber, semicolon, then IP address:port the FB will work in client mode.

Optionally a local IP and Port can be set. If these parameters are set the FB will operate in client mode, that means the packages (triggered by REQ) will be sent to the given IP/Port address. Receiving Messages will be restricted to the given IP and the Source Port.

+ Syntax: PORT = [UDP:|TCP:][[dotAddr:]portNo][;dotAddr:portNo]

that means in detail: 

for server: [TCP:|UDP:]<localPort>    / in this case the local port can be given as: [<dottedIP>:]<portNumber>  /where port number is the port the FB is listening on and the IP address can be specified to bind the port to a specific interface card indicating that only messages from that interface are accepted (default is any interface).

+
+for client: [TCP:|UDP:][<localPort>];<remotePort>    / In case of a client FB (same syntax as for servers), the local port is optional, indicating that the system may choose any available port number for communication. If specified, the FB will use the given port and optionally the given interface for communication. The remote port has to be given as: <dottedIP>:<portNumber>

+ Examples:

    +
  • PORT = 10001   /   FB operates in TCP server mode, it waits for connection on Port 10001,
  • +
  • PORT = ;127.0.0.1:12345  /  TCP client mode, use various local port, connect with server FB on IP address 127.0.0.1 port 12345 (this could only be used internally) - (the server FB should have here PORT = 127.0.0.1:12345)
  • +
  • PORT = 4711;127.0.0.1:12345  /  TCP client mode, use local port 4711, connect with server FB on IP address 127.0.0.1 port 12345
  • +
  • PORT = UDP:10001   /   FB operates in UDP Server Mode, that means it listens for incoming packages on Port 10001 and sends packages to the source port of the last received UDP message. But in this case a message must have been received first before the FB can send a message.
  • +
  • PORT = UDP:10001;10.0.0.1:9001   /   FB operates in UDP Client Mode, that means it listens for incoming packages on Port 10001 from IP 10.0.0.1 - packages from other IPs/ports are dropped, sending will adress packages to 10.0.0.1:9001 (With the use of DestPort 10001, in our example, this mode would allow the sending of UDP messages without having received a package before)
  • +
  • PORT = TCP:10.0.0.1:10001;10.0.0.1:9001  /  FB operates in TCP Client Mode, it listens for incoming packages on 10.0.0.1 port 10001 - packages from other IPs/ports are dropped, sending will address packages to 10.0.0.1:90001
  • +

+

+

+

 

'STARTCHAR', 'ENDCHAR'-data input:

This parameters are optional. They can be used for structuring a data stream (like TCP) into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and then the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

A line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, can be made by setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>), because the functionblock only permits a single marker byte. This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be an <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'SD'-data input:

Containes data that will be transferred to the client when REQ-Event happens.

+
+

'SD_LEN'-data input:

Contains the number of data bytes to be sent at data input 'SD' with 'REQ'-event.

+
+

'QO'-data output:

Shows the initialization status.

TRUE means initializing or deinitializing has worked properly

FALSE means initializing or deinitializing did not work properly, an error has occurred. Error message is set at 'STATUS'.

 

'STATUS'-data output:

When an input event ('INIT', 'REQ' or 'ACK') has been successfully processed, the output is blank. Only if an error has occurred it contains the specific error message.

 

'PEERADDR'-data output:

Containes the address of the client receiving data or which has last sent some.

 

'RD'-data output:

Containes the data received from a client and now ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

+
+

'RD_LEN'-data output:

Contains the number of data bytes which are read at data output 'RD' with 'IND'-event.

+

+

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml new file mode 100644 index 000000000..983d576a4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml @@ -0,0 +1,32 @@ + +
+ + + + + + + + +

This function block implements a logical NOT.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: Not is a logical operator, which turns the value of the input 'IN1' ... 'INn' into its opposite and leads the result to the related output 'OUT1' ... 'OUTn'. There is in each case only one input and one output connected together. It leads to output TRUE if the input is FALSE, or to FALSE if the input is TRUE.

 

+

+ + + + + + + + + + + +
Logic table
InOut
01
10

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. The input is bitwise inverted and the result is stored into the corresponding output. Within a FB different input types may be defined. But an input and its corresponding output have always the same type.

 

For example:

BYTE:  'IN1': 16#F7 (11110111)  'OUT1': 16#08 (00001000)

WORD: 'IN2': 16#F0AF (1111000010101111)  'OUT2': 16#0F50 (0000111101010000)

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml new file mode 100644 index 000000000..f8fe1ce67 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml @@ -0,0 +1,22 @@ + +
+ + + + + + + + +

This function block converts an input value into the time format using a scale-factor.

+
+

+ Temporal Behavior

+

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

+

 

+

Functional Behavior

+

Multiplies the value from 'IN'-input with the 'FACTOR'-input and converts the result into the time format which is passed to the 'OUT'-output. When 'FACTOR'-input is not set then a value of 1 is used.

+

 

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml new file mode 100644 index 000000000..d54db8902 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml @@ -0,0 +1,30 @@ + +
+ + + + + + + + +

This function block is internally used for OPC UA access.

It represents the server for the OPC UA connection.

+ Attention: The OPCUASERVER functionality has to be enabled within the configuration, because it is disabled per default to save memory when OPCUASERVER is not in use. There is a 'main switch' to enable the functionality of OPCUASERVER. If OPCUASERVER is used in a project but disabled, a log message will be written.

+ Procedure to enable OPCUASERVER: Open the device list and select the relevant device. Now set the following nodes within the properties of the device in the right part of the list to OVERWRITE and open them: Configuration → FB → OPCUASERVER. Then set Enable to True. (More information can be found in studio help: main menu Help → Help at item Device List (click in the device list on an empty row, to be sure nothing is selected, and press F1 / or if you want to open the page manually: Solution→Distributed PAC Project→Editors→System Editor→Device List))

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

 -If input 'QI' is TRUE the initialization of the block can happen

  'QO' is set to TRUE

  'INITO' is fired

 -If input 'QI' is FALSE the block will be deinitialized

  'QO' is set to FALSE

  'INITO' is fired

 

'COMM'-Event Input:

 -Internally used, leave unconnected

 

'INITO'-Event Output:

 -is fired after each triggered 'INIT'

 

+ Functional Behavior +

'QI'-input:

 -If TRUE, function block can be initialized.

 -If set FALSE the block will be deinitialized.

 

'MGR_ID'-input:

 -The OPC UA-port and IP address, default: 0.0.0.0:4840, adapt it if necessary

 

'SRVCERT'-input:

-Communication between UA-server (this function block) and UA-client can be secured optionally by the use of certificates. A certificate for the OPC UA connection can be specified here. The default setting is uaserver.der. Until now only this certificate is provided. The certificate key has to be copied to the same path of the CF-card where the boot project is stored. (linux: ./var/lib/nxtRT61499F/boot or RT Target: ./boot)

-If this constant has not been set or the file of the specified certificate is not readable, the built-in nxtControl certificate will be used when the OPC UA client connects and a warning like this will be generated in the log:

Cannot open certificate file: C:\Users\nxtUser.NXTCONTROL\AppData\Local\nxtControl\nxtONE-2.0\nxtRT61499F\boot\uaserver.der, using builtin one

 

 

'QO'-output:

-Shows True if initialized and communication works

-Sows False if deinitialized or an error has occurred

 

'STATUS'-output:

-Shows status information (OK,TERMINATED, etc.)

 

+

+

+

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml new file mode 100644 index 000000000..629cd9607 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml @@ -0,0 +1,77 @@ + +
+ + + + + + + + +

This function block implements a logical OR.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: OR leads to output 'OUT' TRUE (1) if one or all of the enabled inputs 'IN1' ... 'INn' are TRUE. Only if all inputs are FALSE (0), 'OUT' is FALSE.

 

+

+ + + + + + + + + + + + + + + + + + + + + + +
+

Logic table

In2In1Out
000
101
011
111

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise logical OR of the INPUTs. The result is stored into OUT.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

examples for logic table

in2in1out
000000000000
000000010001
001000000010
000100010001
001100010011
111010011111

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml new file mode 100644 index 000000000..3ad0094bb --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml @@ -0,0 +1,20 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access

PD_ANY_IN implements a function block that reads data out of the associated fieldbus process memory.

It is a generic block. The number of inputs (RD1...RD16) can be chosen from 1 to 16. Datatype BOOL, BYTE, WORD, DWORD and REAL can be selected independently for each input.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'INIT' has to be triggered after every alteration of InitSize or MaxSize and leads to an 'INITO'-Event.

An incoming 'REQ'-event causes the block to read from fieldbus and leads to an 'CNF'-event, but an 'IND'-event is fired anyway after each bus-cycle or bit value change depending on what definition at 'IND_ON_CHG' and 'IND_FACTOR' has been set. For that reason the 'IND'-port may be sufficient in many cases and the 'REQ'- and 'CNF'-port can be left unconnected.

 

Functional Behavior

'QI': has to be TRUE so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

'QO': shows status of the block (TRUE is ready, FALSE is error or deinitialized).

'BUS_ID': has to be connected with the incoming KBUS -busId- (or the like), to identify the bus the current device is attached to.

'SLOT_NO': has to be connected with the KBUS -nextSlotNo- or the like, to get the definition which device values are read from.

'OFFSET': defines the bit offset of the accessor within the device.

 

'PD_USES_MSBF':

- if this port is set TRUE, process data will be encoded as most significant byte first.

- if this port is set FALSE, process data will be encoded as least significant byte first.

 

'IND_ON_CHG':

- when set TRUE, 'IND' will be fired only if bit value has changed,

- when set FALSE, 'IND' is fired on every IND_FACTOR buscycle.

 

'IND_FACTOR': value 1...n, defines the factor for the buscycle to fire 'IND'.

'IND_OFFSET': value 1...n, defines the starting value of 'IND'-count; default is based on SLOT_NO.

'STATUS': shows the current accessor status.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml new file mode 100644 index 000000000..2b172a077 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access

PD_ANY_OUT implements a function block that writes data into the associated fieldbus process memory.

It is a generic block. The number of outputs (WR1...WR16) can be chosen from 1 to 16. Datatype BOOL, BYTE, WORD, DWORD and REAL can be selected independently for each output.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

+ Temporal Behavior

'INIT' has to be triggered after every alteration of InitSize or MaxSize and leads to an 'INITO'-Event.

An incoming 'REQ'-event causes the block to write to fieldbus and leads to an 'CNF'-event.

+

 

Functional Behavior

'QI': has to be TRUE so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

'QO': shows status of the block (TRUE is ready, FALSE is error or deinitialized).

'BUS_ID': has to be connected with the incoming KBUS -busId- (or the like), to identify the bus the current device is attached to.

'SLOT_NO': has to be connected with the incoming KBUS -nextSlotNo- (or the like), to get the definition which device values are written to.

'OFFSET': defines the bit offset of the accessor within the device.

'PD_USES_MSBF': if this port is set true, process data will be encoded as most significant byte first.

'STATUS': shows the current accessor status.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml new file mode 100644 index 000000000..15b67ae71 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access

+

+
+

This function block is internally used for hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml new file mode 100644 index 000000000..15b67ae71 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for hardware access

+

+
+

This function block is internally used for hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml new file mode 100644 index 000000000..e70c0c1ed --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml @@ -0,0 +1,25 @@ + +
+ + + + + + + + +

This function block is internally used to store data over reboots

+

It is a generic block. The number of inputs can be chosen from 1 to 32. The number of outputs and default-inputs increase equally.

The type for each input has to be defined, default and output type will change automatically.

+

Be careful to use this function block considering the write cycles of the CF card.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Captures the 'QI'-input

- Fires the 'INITO'-Event

- If 'QI' is FALSE then

  - The 'QO'-output is set to FALSE

  - Any READ or WRITE input event will cause no effect, means nothing will be written or read and also the 'READCNF' and 'WRITECNF' will not be fired

 

- If 'QI' is TRUE then

  - The 'QO'-output is set to TRUE

  - READ or WRITE input Event executes the internal logic 

 

 

'READ'-Event input:

 - Causes the reading of stored data (from data file on disk)

 - 'output(s)' is (are) set

 - Fires 'READCNF'-output Event

   - If no 'WRITE'-Event has happened before

     - the default values are stored in a data file on disk

     - 'defaultsUsed' is set TRUE

   - Else

     - stored data from data file on disk is read

     - 'defaultsUsed is set FALSE

 

'WRITE'-Event input:

- performs writing data from input(s) to disk

- 'output(s)' are set

- 'defaultsUsed' is set FALSE

- fires 'WRITECNF'-output Event

 

'INITO'-Event output:

 - is fired after every triggered 'INIT'-Event, no matter if the FB is initialized or not

 

'READCNF'-Event output:

 - is fired after every successfully executed 'READ'-Event

 

'WRITECNF'-Event output:

 - is fired after every successfully executed 'WRITE'-Event

 

Functional Behavior

 'QI'-input:

- If the value is TRUE a triggered 'INIT' performs an initialization, the FB will be ready to work

- If the value is FALSE a triggered 'INIT' performs a deinitialization, the FB will not react to a READ or WRITE Event

 

'input(n)':

- This data will be written to data file when 'WRITE'-Event is triggered

 

'default(n)'-input:

- This data will be used if no other data is available on disk for this FB (by the very first READ when no WRITE has happened and therefor no persistent data exist)

 

'QO'-output:

- Shows the initialization status. TRUE is initialized, FALSE is not initialized.

 

'STATUS'-output:

- Containes the specific error message, if an error occurs

 

'defaultsUsed'-output:

- TRUE when defaults are used

- FALSE when stored data from disk is used

 

'output':

- Contains defaults or stored data from disk

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml new file mode 100644 index 000000000..36bb3e339 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml @@ -0,0 +1,37 @@ + +
+ + + + + + + + +

This function block is used to store data over reboots on fast FRAM.

It is a generic block. The number of inputs can be chosen from 1 to 32. The number of outputs and default-inputs increase equally.

The type for each input has to be defined, the type of default and output will change automatically.

The functionality is the same as with the persistence FB, but it can be used only if the platform is equipped with a FRAM medium, that can be written any number of times (no Write-Cycle limit).

Note: On a soft-PLC a PERSISTENCE will be mapped additionally to a PERSISTENCE_FRAM, when an existing project is deployed.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Captures the 'QI'-input

- Fires the 'INITO'-Event

- If 'QI' is FALSE then

  - The 'QO'-output is set to FALSE

  - Any READ or WRITE input event will cause no effect, means nothing will be written or read and also the 'READCNF' and 'WRITECNF' will not be fired

+

- If 'QI' is TRUE then

  - The 'QO'-output is set to TRUE

  - READ or WRITE input Event executes the internal logic

 

+

+

'READ'-Event input:

- Causes the reading of stored data (from data file on FRAM memory)

- 'output(s)' is (are) set

- Fires 'READCNF'-output Event

 - If no 'WRITE'-Event has happened before

   - the default values are stored in a data file on FRAM memory

   - 'defaultsUsed' is set TRUE

 - Else

   - stored data from data file on FRAM memory is read

   - 'defaultsUsed is set FALSE

 

+

'WRITE'-Event input:

- performs writing data from input(s) to FRAM memory

- 'output(s)' are set

- 'defaultsUsed' is set FALSE

- fires 'WRITECNF'-output Event

 

+

'INITO'-Event output:

- is fired after every triggered 'INIT'-Event, no matter if the FB is initialized or not

 

+

'READCNF'-Event output:

- is fired after every successfully executed 'READ'-Event

 

+

'WRITECNF'-Event output:

- is fired after every successfully executed 'WRITE'-Event

 

+

Functional Behavior

'QI'-input:

- If the value is TRUE a triggered 'INIT' performs an initialization, the FB will be ready to work

- If the value is FALSE a triggered 'INIT' performs a deinitialization, the FB will not react to a READ or WRITE Event

+

 

'input(n)':

- This data will be written to data file when 'WRITE'-Event is triggered

+

 

'default(n)'-input:

- This data will be used if no other data for this FB is available on FRAM memory (by the very first READ when no WRITE has happened)

+

 

'QO'-output:

- Shows the initialization status. TRUE is initialized, FALSE is not initialized.

+

 

'STATUS'-output:

- Containes the specific error message, if an error has occurred

+

 

'defaultsUsed'-output:

- TRUE when default data is used

- FALSE when stored data from FRAM memory is used

+

 

'output':

- Contains defaults or stored data from FRAM memory

+

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml new file mode 100644 index 000000000..b95968795 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml @@ -0,0 +1,40 @@ + +
+ + + + + + + + +

This function block is used for time scheduler sequences

This is a generic function block, the number of Channels can be defined from 1 to 64.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

If input 'QI' is TRUE the initialization of the block can happen

 'QO' is set to TRUE

 'INITO' is fired

If input 'QI' is FALSE the block will be deinitialized

 'QO' is set to FALSE

 'INITO' is fired

 

+

'SET'-Event input:

If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

 A 'SETO'-Event is fired

If 'QI' is FALSE no further action (FB deinitialized)

 

'INITO'-Event output:

is fired after each INIT

 

'SETO'-Event output:

is fired after a triggered SET, if the FB is initialized properly

 

'IND'-Event output:

is fired when defined point of time out of SCHEDULE occurs, in conjunction with that the respective CHANNEL containes the defined value.

After an INIT when the FB looks back in time for the last event to set, it will provide a value at one or more channels but in this case no IND-event is fired.

 

Functional Behavior

'QI'-input:

if TRUE, function block can be initialized.

If set FALSE the block will be deinitialized.

 

'FIRSTCHANNEL'-input:

Defines the channel number of CHANNEL1. CHANNEL1 is equal to FIRSTCHANNEL. CHANNEL2 gets the number of CHANNEL1 plus one.

If FIRSTCHANNEL=0 CHANNEL1=0

With this feature it is possible to use several EVENTSCHEDULER blocks with various channel definitions but only one list to provide 'SCHEDULE'.

 

'MAXINITTIME'-input:

Maximum time the FB looks back in time after INIT to trigger an event that has to happen. This is to fetch the event that has happened before the INIT event has arrived. Only the last event out of the list, that had happened before INIT and within the MAXINITTIME, will be considered. The FB will look no further back in time, even if MAXINITTIME is set to 24 hours or more.

 

'SCHEDULE'-input:

Use the cron format for the SCHEDULE string. If using a list of sequences, seperate them with a semicolon.

Format:

(min hr day mon wday year ch val; min hr...)

each value can be a single number or a list of numbers divided by a comma (min,min hr,hr,hr day mon wday year ch val,val; min hr...)

Possible values:

general: * means always, it is used if no specific value is set

min: [*] [0-59] hr: [*] [0-23] day: [*] [1-31] mon: [*] [1-12]

wday: [*] [0-7] 0 and 7 = sunday, 1 = monday, 2 = tuesday, etc.

year: [*] [####]

ch: [0 - 999999] this value has to be the result of the 'CHANNELn' output number of the FB + the defined value of 'FIRSTCHANNNEL'-input

val: [0 - 999999]

 

Examples:

+

+ + + + + + + + + + + + + + + + + +
Scheduler example strings
StringDescription
0 * * * * * 0 1Sets on every hour, on minute 0 channel 0 to value 1
30 7 * * * * 1 50Sets every day on 07:30 channel 1 to value 50
0 17 1 1,2 * * 2 80Sets on first january and first february on 17:00 the channel 2 to value 80
15,45 * * * 1,3 * 3 0Sets on monday and wednesday every hour on minute 15 and 45 channel 3 to value 0

 

 

 

 

 

 

 

 

The definition of the point of time can only be the exact minute. Somewhere in this defined minute the event will happen.

 

'QO'-output:

shows status of the block

TRUE is ready

FALSE is deinitialized or error

 

'STATUS'-output:

Blank if no error

Shows error message when an error occures. (i.e.: Syntax error in schedule definition at position 21)

If a SET is triggered but the FB is deinitialized a specific error message will appear not until the FB is initialized properly.

 

'CHANNELn'-output:

Outputs value(s) defined at 'SCHEDULE'

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml b/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml new file mode 100644 index 000000000..6d2c3b529 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml @@ -0,0 +1,23 @@ + +
+ + + + + + + + +

This function block is internally used to query connection states.

It verifies the presence of a connection.

+

+

+

+
+

+ Temporal Behavior

'REQ'-Event input:

Every REQ captures 'INST_PATHNAME', 'INST_VAR' and QUERY_TYPE and executes the internal logic.

Outputs NOT_FOUND and CONNECTED are set.

A CNF-Event is fired.

 

'CNF'-Event output:

CNF is fired after each REQ.

 

Functional Behavior

'INST_PATHNAME'-input parameter:

Pathname of that function block instance the connection state is to be checked. The pathname is composed of "${PATH}" and the instance name divided by a dot (i.e.: ${PATH}.FB1, ${PATH}.FB2, etc. or merely ${PATH} if the pathname is generic [for example the QUERY_CONNECTION is used inside of a composite or a CAT and it has to check the connection state of this composite or CAT containing it]).

 

'INST_VAR'-input parameter:

Input- or outputname of the instance (FB) to be checked. (i.e. OUT, ...)

Note: checking the connection state of a variable of a function block (query_type 3): only input variable check is supported. QUERY_CONNECTION does not work with output variable (in that case output 'CONNECTED' shows FALSE anyway, no matter if connected or not).

 

'QUERY_TYPE'-input parameter:

This parameter defines what connection type has to be checked. 0,1 and 2 is for Adapter types, 3 has to be chosen if the connection state of an input variable is to be checked.

0=Adapter Remote, 1=Adapter Locally, 2=Adapter Both, 3 Variable

 

'NOT_FOUND'-output:

Output is set to TRUE if the function block to be checked can not be found, Block does not exist respectively the parameter at 'INST_PATHNAME' is not correct.

Output is set to FALSE if the function block to be checked has been found.

 

'CONNECTED'-output:

Output is set to FALSE if no connection at the specified in- or output could be detected. But it's also FALSE if a output variable is defined at 'INST_VAR' with an existing connection, because output variables can not be checked. Further it is set to FALSE if the parameter at 'INST_VAR' or 'QUERY_TYPE' is not correct. There is no other warning if that happens.

Output is set to TRUE if a connection at the specified in- or output could be detected.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml new file mode 100644 index 000000000..a82b9713d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Reports the state of the application back to the IEC 61499 Runtime

+

+
+

The function block allows the application to report the application status back to the IEC 61499 runtime.

The main usage is to tell the runtime that the application has performed its initialization stages and is ready to proceed with the normal operation. The runtime then enables processes such as updating the data stored in the non-volatile storage, that can be inconsistent during the initialization. This is achieved using STATE = App Initialized.

The FB can either start automatically as soon as the resource it is located in starts, or explicitely using the START event. Note that the STARTMODE is a parameter (it is not associated with any event) and as such it has to be defined as a constant. If the STARTMODE is implicit, also the TIMEOUT has to be specified as a constant.

If there is any REPORT_APP_STATE FB in any resource, there has to be exactly one with STARTMODE App Init in the device.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml new file mode 100644 index 000000000..755d2b8ff --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used access the watchdog functions

+

+
+

This function block is internally used access the watchdog functions

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml new file mode 100644 index 000000000..0479b16de --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a bitwise rotation to the left.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Rotates the value in 'IN1' by 'N' positions to the left. Bits falling out on the left side, will be inserted on the right side in the same order. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

The maximum value of 'N' depends on the type.  For each IN/OUT type the number of bit rotations performed is calculated according the following formulas:

BYTE: Bits_to_rotate := (N AND 7)

WORD: Bits_to_rotate := (N AND 15)

DWORD: Bits_to_rotate := (N AND 31)

LWORD: Bits_to_rotate := (N AND 63)

 

For example:

N := 2

BYTE:  'IN1': 16#C8 (11001000)  'OUT1': 16#23 (00100011)

WORD: 'IN2': 16#8003 (1000000000000011)  'OUT2': 16#000E (0000000000001110)

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml new file mode 100644 index 000000000..deb5f13c7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a bitwise rotation to the right.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Rotates the value in 'IN1' by 'N' positions to the right. Bits falling out on the right side, will be inserted on the left side in the same order. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

The maximum value of 'N' depends on the type.  For each IN/OUT type the number of bit rotations performed is calculated according the following formulas:

BYTE: Bits_to_rotate := (N AND 7)

WORD: Bits_to_rotate := (N AND 15)

DWORD: Bits_to_rotate := (N AND 31)

LWORD: Bits_to_rotate := (N AND 63)

 

For example:

N := 2

BYTE:  'IN1': 16#C8 (11001000)  'OUT1': 16#32 (00110010)

WORD: 'IN2': 16#8003 (1000000000000011)  'OUT2': 16#E000 (1110000000000000)

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml b/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml new file mode 100644 index 000000000..1907afa77 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block is used to access the built-in runtime watchdog functions

A RESET-Event has to be fired before the adjusted expire time runs out.

+

+
+

+ Temporal Behavior

'INIT'-Event input: 

- has to be triggered first to initialize, catches 'QI' and leads to an 'INITO'-Event.

 

'START'-Event input:

- has to be triggered immediately after the initialization chain is ready; leads the time setting to output 'EXPIRETIME' and starts the FB.

 

'RESET'-Event input:

- This input has to be connected to a FB sending events  triggered before the expiretime runs out. If not the selected action at input 'ACTION' starts.

 

'STOP'-Event input:

- stops the RTWatchdog, no further watchdog action, Fires a 'STOPO' event.

 

'TRIGGER'-Event input:

- A triggered 'TRIGGER'-Event fires the 'EXPIRED'-Event immediately, independently from expire time.

 

'INITO'-Event output:

- This event is fired after each triggered 'INIT'.

 

'STARTO'-Event output:

- This event is fired after a triggered 'START'.

 

'RESETO'-Event output:

- This event is fired after each triggered 'RESET'.

 

'STOPO'-Event output:

- This event is fired after each triggered 'STOP'.

 

'EXPIRED'-Event output:

- This event is fired if expire time runs out and 'ACTION' is set on event (=2)

 

Functional Behavior

'QI'-input:

- has to be TRUE, so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

 

'ACTION'-input:

- defines the action to be done if expire time runs out.

0 Default - same as Log

1 No action - no further action

2 Event - an event at 'EXPIRED'

3 Log - only message into log file/no event

4 Exit - stops runtime/no event

5 Reboot - reboots runtime

 

'QO'-output:

- shows status of the block (TRUE is ready, FALSE is error or deinitialized).

 

'EXPIRETIME'-output:

- shows the real expire time. It is advised to RESET the watchdog at least 3-5 times so fast to cover possible execution delays, Default setting is 30s; to set it to another time it is configurable in the *.config file: Configuration.FB.RTWatchdog.ExpireInterval = <Milliseconds>

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml new file mode 100644 index 000000000..c9ba2c809 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block selects one of the input values and passes it to the output when the request event is received.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each 'REQ'-Event passes the value of one of the 'INn'-inputs selected by the 'SELECT'-input to the 'OUT' and fires an 'CNF'-Event.

 

Functional Behavior

The number of inputs 'IN1' ... 'INn' can be defined from 2 ... 16. The numerical value of the 'SELECT'-input is an 'index' starting at the value 0 for selection of 'IN1' to 15 for 'IN16'. A value at the 'SELECT'-input which is greater than the number of (inputs - 1) will be ignored, the value of 'OUT' remains unchanged.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml new file mode 100644 index 000000000..7dc7a0921 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml @@ -0,0 +1,34 @@ + +
+ + + + + + + + +

This function block is used to access a serial IO interface.

+

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Captures the 'QI'-input

- If 'QI' is FALSE then

  - The FB will be deinitialized

  - The 'QO'-output is set to TRUE, when deinitializing was successful

  - 'STATUS'-output is blank, when deinitializing was successful

  - The 'INITO'-Event is fired

- If 'QI' is TRUE then

  - The FB is initialized

  - Captures the STARTCHAR and ENDCHAR parameters

  - The 'QO'-output is set to TRUE, when initializing was successful

  - 'STATUS'-output is blank, when initializing was successful

  - Applies the new settings

  - The 'INITO'-Event is fired

- If an error is detected while initializing or deinitializing then

  - 'QO'-output is set to FALSE

  - 'STATUS'-output is set to an error message

  - The 'INITO'-Event is fired

 

+

'REQ'-Event input:

- If 'QI'-input is TRUE and 'INIT' has worked properly:

   - A triggered 'REQ' performs the sending of data contained at the 'DATAOUT'-input.

   - The 'CNF'-Event output is fired

- If 'QI'-input is FALSE and the FB is deinitialized:

   - 'QO' is set to FALSE

   - 'STATUS'-output shows an error message (i.e.: REQ invalid in state START)

   - No data will be sent

   - The 'CNF'-Event is fired

 

'ACK'-Event input:

Has to be triggered to signalize that data from an 'IND'-Event has been processed. If some further data is available, the Function block is ready to accept the next data,  provide it at 'DATAIN'-output and fire 'IND' once more. The very first ACK-Event after INIT is triggered automatically.

If an 'ACK' is triggered before data is available, the event remains active and works with the next data.

If an 'ACK' is triggered but the FB is deinitialized, the function block does not react and no 'IND' will be fired. A 'STATUS'-message will be shown when the Function block gets initialized.

 

+

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

+

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired to signalize that data has arrived and is contained at output DATAIN. Any error will be indicated at QO and STATUS.

An ACK-Event must have been triggered first, to make the FB ready to accept new data.

 

+

Functional Behavior

'QI'-input:

If the value is TRUE an initialization is performed, else all existing settings are cleared (deinitialization).

 

+

'COM'-input:

Contains the parameters of the serial connection properties. The properties have to be separated by a single space character.

They have to be edited in the following order: {dev=name baudrate=bps bits=width stopbits=[1|2] parity=[none|even|odd]}

(i.e.: dev=COM2 baudrate=9600 bits=8 stopbits=1 parity=none)

The notation COMx is to be recommended because, by using it in this way, the device name will be converted platform-specific. (i.e. on Beckhoff CX10x0 → COM1: is converted to /dev/ttyS0 with Linux, 0 with RTOS, ...)

 

+

'STARTCHAR', 'ENDCHAR':

+

This parameters are optional. They can be used for structuring a data stream into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and with this the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

The functionblock only permits a single marker byte. If it is necessary to get a line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, the following constraints have to be considered: setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>). This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be a <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'DATAOUT'-input:

Containes data to be transferred to the connected serial interface when an REQ-Event happens.

 

+

'QO'-output:

Shows the success of initialization or deinitialization. TRUE is successfully initialized or deinitialized, FALSE shows that an error with INIT has occured.

 

+

'STATUS'-output:

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, this output is set blank.

It contains the specific error message if an error has occurred.

+

+

 

'DATAIN'-output:

Containes the datablock ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml new file mode 100644 index 000000000..ea3b3e470 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a left bit shift operation of the input value.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Shifts the value in 'IN1' by 'N' positions to the left. Bits falling out on the left side are lost. 'N' number of zero(s) bits will be inserted on the right side. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

For example:

N := 3

BYTE:  'IN1': 16#C9 (11001001)  'OUT1': 16#48 (01001000)

WORD: 'IN2': 16#8F03 (1000111100000011)  'OUT2': 16#7818 (0111100000011000)

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml new file mode 100644 index 000000000..d89a576fc --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a right bit shift operation of the input value.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Shifts the value in 'IN1' by 'N' positions to the right. Bits falling out on the right side are lost. 'N' number of zero(s) bits will be inserted on the left side. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

For example:

N := 3

BYTE:  'IN1': 16#C9 (11001001)  'OUT1': 16#19 (00011001)

WORD: 'IN2': 16#8F03 (1000111100000011)  'OUT2': 16#11E0 (0001000111100000)

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml new file mode 100644 index 000000000..448e7c469 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + Stanislav + Meduna + + stanislav.meduna@nxtcontrol.com + +

Summary

+

+
+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml new file mode 100644 index 000000000..c76b6e4a2 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used for Enocean hardware access

+

+
+

This function block is internally used for Enocean hardware access

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml new file mode 100644 index 000000000..ffb76b354 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml @@ -0,0 +1,22 @@ + +
+ + + + + + + + +

This function block is used to smooth input data and with this the transmitted events.

It is a generic block. The datatypes of inputs (and accordingly outputs) can be chosen. One function block can be defined with 1 to 16 in- and outputs.

+

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the values from 'TYPE', 'VALCONDITION','TIMEDIFF', 'CYCLE', VALDIFFn'.

 

 'REQ'-Event input:

- This event starts the internal logic and produces a 'CNF'-event only if the requirements of the adjusted parameters are fulfilled.

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed.

 

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the requirements of the adjusted parameters are fulfilled.

- This event will be fired as well if 'CYCLE' is in use and causes the function block to work before a new 'REQ'-event arrives.

 

Functional Behavior

 'TYPE'-input:

- types to select conditions for smoothing data:

- 0: no smoohing - each 'REQ' will cause a 'CNF'-event and data passes from input to output, values at 'VALCONDITION', 'TIMEDIFF' or 'VALDIFFn' will be ignored. A constant at 'CYCLE' will cause events in the defined intervall, no matter if any input value has changed. (i.e. t#1s causes events at 'CNF' every second and with that data is passed to output(s).)

- 1: old/new - new data at input must differ from old data to be passed to output(s) (and cause a 'CNF'-event). If 'VALCONDITION' = 1 all values must have changed. 'VALDIFFn' is ignored.

- 2: value - value based smoothing, a minimum value difference (definable at 'VALDIFFn' for each input) is neccessary to pass the new value to output (and cause a 'CNF'-event); constants at 'VALCONDITION' and 'VALDIFFn' are active. 'TIMEDIFF' is ignored.

- 3: time - time based smoothing, a minimum time span has to elapse, before the new value(s) can pass to output(s) (and cause a 'CNF'-event); a constant at 'TIMEDIFF' is active. 'VALCONDITION' and 'VALDIFFn' are ignored.

- 4: time or value - adjusted parameters for time based smoothing or value based smoothing have to be fulfilled to pass value(s) to output(s) (and cause a 'CNF'-event).

- 5: time and value - all adjusted parameters for time based smoothing and value based smoothing have to be fulfilled to pass value(s) to output(s) (and cause a 'CNF'-event).

- 6 and greater: undefined condition, do not use

 

 'VALCONDITION'-input:

- Value-based smoothing,

- 0: values are sent if one of the input values differ enough from the last value

- 1: values are sent only if the values of all inputs differ enough from their last value

 

 'TIMEDIFF'-input:

- For time based smoothing: This value defines the time difference or deflutter time that has to pass before new data will be sent.

 

 'CYCLE'-input:

- This value defines how often the value(s) and the 'CNF'-event will be sent at least. (It will overrule all other parameters if it's in use.)

- If it should not be used, set it on 0s.

 

 'VALDIFFn'-input:

- This value defines the minimum difference to occur between the last value written to output and the new input value, to proceed a new writing execution (and with this an event at 'CNF').

- Datatype depending on 'IN'-input datatype.

 

 'INn'-input:

- Data input. Datatype selectable with the interface editor.

 

 'OUTn'-output:

- Data output. Datatype depending on 'IN'-input datatype.

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml new file mode 100644 index 000000000..2a40ee4d7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Write periodically log information into the device log file.

+

+
+

This functionblock writes periodically log information into the device log file.

The log informations are written into the log file of the device.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml new file mode 100644 index 000000000..544b9a03b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Write periodically log information into the device log file.

+

+
+

Write periodically log information into the device log file.

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml new file mode 100644 index 000000000..fe081ea19 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Write periodically log information into the device log file.

+

+
+

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the device component.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml new file mode 100644 index 000000000..110d5d539 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Write periodically log information into the device log file.

+

+
+

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml new file mode 100644 index 000000000..110d5d539 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

Write periodically log information into the device log file.

+

+
+

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml new file mode 100644 index 000000000..d88482cae --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block implements a mathematical subtract operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Subtracts from 'IN1' the values of 'IN2', ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type.

'OUT' := 'IN1' - 'IN2' - ... - 'INn'

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml new file mode 100644 index 000000000..739b805c8 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

The receiver function block SYMLINKMULTIQUEDST has to fetch the data from the data queue of the corresponding source (SYMLINKMULTIQUESRC) on its own request.

All value output channels of the FB are assigned with the path name of this block.

Only one SYMLINKMULTIQUESRC and one SYMLINKMULTIQUEDST have to work together. If there were several ...SRC or ...DST blocks there is no way to define which block fetches which value out of the data queue.

Please note: The maximum capacity of the queue can be defined (see 'REQ'-Event input of SYMLINKMULTIQUESRC !). If the specified limit has to be adjusted, it should be regarded, that the limit should keep an application from using up all memory of the device. Consequently, the sum of all entries in all queue FBs at any time must not exceed the limit of your device memory.

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is FALSE.

- Each 'INIT' causes an 'INITO'-event.

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized and data is available. If the data queue is empty the 'CNF'-event will not be fired, it is fired immediately when data is available from the data queue, without another 'REQ'.

- After proper initialization a 'REQ'-event should be triggered once. If there is no data in the data queue available the FB is ready-to-receive.

- Data of the queue counts as fully processed when 'REQ' has been triggered at least once and no data is stored in the queue, that means no 'CNF'-event has followed.

- When the SYMLINKMULTIQUEDST is ready (a 'REQ' has been triggered without data is provided) and then the corresponding SYMLINKMULTIQUESRC writes ('REQ' of the ...SRC is triggered) the data will be written directly to output(s) 'VALUEn' of the ...SRC and a 'CNF' will be triggered at both, the ...SRC and the ...DST.

- 'REQ'-events, which are triggered after the data queue is empty and the one ready-to-receive 'REQ' has already been triggered, will cause no effect. This one 'REQ', that brings the FB in ready-to-receive state, will cause fetching the first set of data from the queue as soon as it is available. Further data fetching needs new 'REQ'-events.

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

- For correct operation the 'INITO'-Event should be looped back to the 'REQ' of the SYMLINKMULTIQUEDST, after all subsequent FBs have been initialized. This will trigger the first 'REQ' after initializing, that brings the FB in ready-to-receive state as described above at 'REQ'.

 

 'CNF'-Event output:

- This event is fired after each 'REQ'-event, only if the function block is initialized properly and when data for processing is available in the data queue.

- 'REQ'-Events while the data queue is empty does not produce a 'CNF'-Event. In this case the first available value will be fetched immediately from the SYMLINKMULTIQUESRC and the 'CNF'-Event is fired without another 'REQ'-Event. Further data fetching, respectively 'CNF'-Events, need further 'REQ'-Events.

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIQUESRC 'NAME'-input. (i.e.: ${PATH}HW_pump1)

- To connect HW IOs with process values it is necessary to use the prefix '${PATH}' in the path name.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

      ERR_QUEMPTY < queue currently empty >

      ERR_QUFULL    < the queue is full >

      ERR_NORECV   < the queue is full and there is nobody to read >

      ERR_VARCNT   < incorrect number of variables >

 

 'VALUEn'-output:

- Value that has been fetched from data queue from the corresponding SYMLINKMULTIQUESRC. Datatype can be defined within the interface editor.

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml new file mode 100644 index 000000000..1c4bca64d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml @@ -0,0 +1,19 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It provides a data queue, to appropriate data (up to the defined maximum capacity) whithout having to wait for proper initialization of the corresponding SYMLINKQUEDST. The receiver function block SYMLINKMULTIQUEDST has to fetch the transmitted data on its own request.

All value input channels of the FB are assigned with the path name of this block.

Only one SYMLINKMULTIQUESRC and one SYMLINKMULTIQUEDST have to work together. If there were several ...SRC or ...DST blocks there is no way to define which block fetches which value out of the data queue.

Please note: The maximum capacity of the queue can be defined (see 'REQ'-Event input). If the specified limit has to be adjusted, it should be regarded, that the limit should keep an application from using up all memory of the device. Consequently, the sum of all entries in all queue FBs at any time must not exceed the limit of your device memory.

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized (even if the data queue is already full).

- After proper initialization each 'REQ'-event causes the block to store the current data of the 'VALUEn'-channnels into the data queue, without having to wait for proper initialization of the corresponding SYMLINKQUEDST until the defined maximum capacity limit of the queue has been reached. Data that arrives while the queue is already full will be dropped until the corresponding SYMLINKMULTIQUEDST requests data and the queue gets empty space again.

- The maximum capacity range can be defined from 5 to 2000, default setting is 128. (The procedure how to set the value is described in the studio help at Solution→Distributed PAC Project→Symbolic Links.)

- Data that is arriving at the 'VALUEn'-inputs of the SYMLINKQUESRC, after the data queue is already full, will get lost. So be careful to ensure, that the data queue is emptied fast enough and does not overflow, but consider, that the max. capacity has to be small enough to prevent the application from using up all memory (particularly with the use of several SYMLINKMULTIQUESRC function blocks in the same device).

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

 'CNF'-Event output:

- This event is fired after each 'REQ'-event, only if the function block is initialized properly. It is also fired after each 'REQ'-event while the queue is filled up already.

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAME'-input. (i.e.: ${PATH}HW_pump1)

- To connect HW IOs with process values it is necessary to use the prefix '${PATH}' in the path name.

 

 'VALUEn'-input:

- Value to be sent to data queue from where the corresponding SYMLINKMULTIQUEDST will fetch it. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:
      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

      ERR_QUEMPTY < queue currently empty >

      ERR_QUFULL    < the queue is full >

      ERR_NORECV   < the queue is full and there is nobody to read >

      ERR_VARCNT   < incorrect number of variables >

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml new file mode 100644 index 000000000..6a03fe824 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml @@ -0,0 +1,30 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

+

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

Several pairs of SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST can be used in unison with the same path name to transmit value arrays of arbitrary size.

It serves as the symlinkdestination and needs a SYMLINKMULTIVALSRC with the same parameterizing to fetch the transmitted data from.

+

All value input channels of the FB are assigned with the path name of this block.

+

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event. The 'INIT' should be triggered before triggering the 'INIT' of the SYMLINKMULTIVALSRC to prevent the loss of data (see SYMLINKMULTIVALSRC, 'REQ'-Event).

+

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

+

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

+

 

 'CNF'-Event output:

- This event is fired after each successfully 'REQ'-event of the corresponding SYMLINKMULTIVALSRC, if the function block is initialized properly.

- This event is fired after an 'INIT'-event of the SYMLINKMULTIVALSRC, if both function blocks (the SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST) are initialized properly.

- This event is fired after a 'REQ'-event, if the function block is initialized properly.

+

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

+

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARSRC 'NAME'-input. (i.e.: HW_pump1.isOn)

 

 'INDEX'-input:

- This value defines which SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST do correspond, because it is possible to apply series of pairs with the same path name, for the transmitting of arrays.

Example: See SYMLINKMULTIVALSRC, at 'INDEX'-input.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

 'VALUEn'-output:

- Value that has arrived from corresponding SYMLINKMULTIVALSRC. Datatype can be defined within the interface editor (and has to be equal to the corresponding SYMLINKMULTIVALSRC).

+

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml new file mode 100644 index 000000000..5b0ac5ed9 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml @@ -0,0 +1,27 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

Several pairs of SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST can be used in unison with the same path name to transmit value arrays of arbitrary size.

It serves as the symlinksource and needs a SYMLINKMULTIVALDST with the same parameterizing to fetch the transmitted data.

+

All value input channels of the FB are assigned with the path name of this block.

+

+

+
+

+

Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is TRUE the 'INIT' event causes also the first data transmitting without a 'REQ'-event.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

+

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

- If the corresponding SYMLINKMULTIVALDST is initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVALDST function block too.

- If the corresponding SYMLINKMULTIVALDST is not yet initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVALDST function block after the initialization of this block is done. In this case data is written to the SYMLINKMULTIVALDST when the initialization of this block happens, without a further REQ. Only the last value of each channel that has been sent will be received at the SYMLINKMULTIVALDST. Be sure to have the SYMLINKMULTIVALDST initialized before initializing the SYMLINKMULTIVALSRC, or at least before the second REQ-Event of the SYMLINKMULTIVALSRC is triggered, to prevent the loss of data.

 

+

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

+

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the function block is initialized properly.

 

+

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAMEn'-input. (i.e.: HW_pump1.isOn)

- One Path name is

 

 'INDEX'-input:

- This value defines which SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST do correspond, because it is possible to apply series of pairs with the same path name, for the transmitting of arrays.

Example:

 

 'VALUEn'-input:

- Value to be sent to corresponding SYMLINKMULTIVARDST. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml new file mode 100644 index 000000000..222b18aa7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml @@ -0,0 +1,28 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It serves as the symlinkdestination and needs a SYMLINKMULTIVARSRC with the same parameterizing from which it can fetch the transmitted data.

Each value input is assigned with it's own path name.

+

+

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event. The 'INIT' should be triggered before triggering the 'INIT' of the SYMLINKMULTIVARSRC to prevent the loss of data (see SYMLINKMULTIVARSRC, 'REQ'-Event).

 

+

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

 

+

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

+

 'CNF'-Event output:

- This event is fired after each successfully 'REQ'-event of the corresponding SYMLINKMULTIVARSRC, if the function block is initialized properly.

- This event is fired after an 'INIT'-event of the SYMLINKMULTIVARSRC, if both function blocks (the SYMLINKMULTIVARSRC and SYMLINKMULTIVARDST) are initialized properly.

- This event is fired after a 'REQ'-event, if the function block is initialized properly.

 

+

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

+

 'NAMEn'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARSRC 'NAMEn'-input. (i.e.: HW_pump1.isOn)

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

'VALUEn'-output:

- Value that has arrived from corresponding SYMLINKMULTIVARSRC. Datatype can be defined within the interface editor (and has to be equal to the corresponding SYMLINKMULTIVARSRC).

 

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml new file mode 100644 index 000000000..685e3216b --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml @@ -0,0 +1,27 @@ + +
+ + + + + + + + +

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It serves as the symlinksource and needs a SYMLINKMULTIVARDST with the same parameterizing to fetch the transmitted data.

Each value input is assigned with it's own path name.

+

+

+

+
+

+ Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is TRUE the 'INIT' event causes also the first data transmitting without a 'REQ'-event.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

+

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

- If the corresponding SYMLINKMULTIVARDST is initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVARDST function block too.

- If the corresponding SYMLINKMULTIVARDST is not yet initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVARDST function block when the initialization of this block is done. In this case data is written to the SYMLINKMULTIVARDST when the initialization of this block happens, without a further REQ. Only the last value of each channel that has been sent will be received at the SYMLINKMULTIVARDST. Be sure to have the SYMLINKMULTIVARDST initialized before initializing the SYMLINKMULTIVARSRC, or at least before the second REQ-Event of the SYMLINKMULTIVARSRC is triggered, to prevent the loss of data.

 

 

+

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

+

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the function block is initialized properly.

 

+

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAMEn'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAMEn'-input. (i.e.: HW_pump1.isOn)

 

 'VALUEn'-input:

- Value to be sent to corresponding SYMLINKMULTIVARDST. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

+

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml new file mode 100644 index 000000000..369804b82 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used to get symlink status informations

+

+
+

This function block is internally used to get symlink status informations

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml new file mode 100644 index 000000000..e66be0d50 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used to send logging information to a syslog server

+

+
+

This function block is internally used to send logging information to a syslog server

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml new file mode 100644 index 000000000..59fe8086f --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is internally used to read system information

+

+
+

This function block is internally used to read system information

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml new file mode 100644 index 000000000..85be19eb4 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml @@ -0,0 +1,55 @@ + +
+ + + + + + + + +

This function block is used to access a TCP/UDP connection

+

+

+

+

+

+

It is equipped with a 16k buffer to cache data (i.e. if the receiving client is not as fast as the sender). If data cannot be received fast enough, so that the buffer gets overcharged, some parts of the datastream will get lost. There is no warning if that happens, but the discarding of received datablocks is minuted in the cyclic log.

+

+

+

+

+

+

+

+

+

+

+
+

+ Temporal Behavior

'INIT'-Event input:

- Captures the QI-input

 - If QI is TRUE: Performs the initialization and applies the PORT and START- and ENDCHARACTER settings. If the TCPIO-Server-functionblock is already running, it will be stopped first. Default communication is TCP, to use UDP the prefix UDP has to be set at input PORT (see below).

    +
  • TCP - only one client can be active at a time, if a second client signs in, the connection to the first client will be closed before the second one can communicate.

The success of the operation is shown: 'QO' is set TRUE, 'STATUS' is blank, 'INITO' is fired.

 - If QI is FALSE: Performs the deinitialization of the server functionblock. A potentially opened connection will be closed and a sign-in of a client is no longer possible. 'QO' is set TRUE, when the deinitialization has worked properly, and 'STATUS' is blank.

 - If initialization or deinitialization has not worked properly 'QO' is set to FALSE and STATUS will show an error message.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic which means that data at input DATAOUT will be transferred to client and a 'CNF'-Event is fired when the operation was successful.

    +
  • TCP - a client must have signed in, otherwise this event does not work
  • +
  • UDP - basically, data will be sent to the client from which the last package has been received, if there was no receiving at all, this event does not work; if it is necessary to send packages to a specific address use the parameter DestIP:DestPort, as described below at item 'PORT'

General: address of the client to be sent to is contained at output PEERADDR. The success of the operation is shown at CNF, QO and STATUS.

 

'ACK'-Event input:

This event has to be triggered to signalize the end of processing data from an 'IND'-Event. If some further data is available the function block will place it at 'DATAIN' and then fire an 'IND'-Event.

A triggered 'ACK' with no available data causes the event to remain active and work with the next data.

As soon as data is available at 'DATAIN'-output an IND-Event is fired to signalize it and this action is finished. If some further data is present, it will be provided at DATAIN and a new IND-Event is fired. This process will be repeated until no further data is available.

 

'INITO'-Event output:

This event is fired when an 'INIT'-Event has happened (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired when data has arrived from a client. The data is contained at output DATAIN, the address from the client at PEERADR and any error will be indicated at QO and STATUS.

 

+ Functional Behavior +

'QI':

Input Event Qualifier TRUE: initialize will work with an INIT-Event. FALSE: an INIT-Event will deinitialize the functionblock.

 

'PORT':

This parameter sets the communication port  for the server functionblock to wait for the clients, or for the client to address the server. The portnumber must be in a range from 1 to 65535, depending on operating system (in some case 1024-65535).

To use TCP set the prefix "TCP:" (or no prefix would use also TCP), to use UDP set the prefix "UDP:" and then the portnumber (i.e.: UDP:1024).

If there is given only a portnumber (and optionally an IP address first) the FB will work in server mode.

If there are given [IP address]:portnumber, semicolon, then IP address:port the FB will work in client mode.

Optionally a local IP and Port can be set. If these parameters are set the FB will operate in client mode, that means the packages (triggered by REQ) will be sent to the given IP/Port address. Receiving Messages will be restricted to the given IP and the Source Port.

+ Syntax: PORT = [UDP:|TCP:][[dotAddr:]portNo][;dotAddr:portNo]

that means in detail: 

for server: [TCP:|UDP:]<localPort>    / in this case the local port can be given as: [<dottedIP>:]<portNumber>  /where port number is the port the FB is listening on and the IP address can be specified to bind the port to a specific interface card indicating that only messages from that interface are accepted (default is any interface).

+
for client: [TCP:|UDP:][<localPort>];<remotePort>    / In case of a client FB (same syntax as for servers), the local port is optional, indicating that the system may choose any available port number for communication. If specified, the FB will use the given port and optionally the given interface for communication. The remote port has to be given as: <dottedIP>:<portNumber>

+ Examples: +

    +
  • PORT = 10001   /   FB operates in TCP server mode, it waits for connection on Port 10001,
  • PORT = ;127.0.0.1:12345  /  TCP client mode, use various local port, connect with server FB on IP address 127.0.0.1 port 12345 (this could only be used internally) - (the server FB should have here PORT = 127.0.0.1:12345)
  • PORT = 4711;127.0.0.1:12345  /  TCP client mode, use local port 4711, connect with server FB on IP address 127.0.0.1 port 12345
  • +
  • PORT = UDP:10001   /   FB operates in UDP Server Mode, that means it listens for incoming packages on Port 10001 and sends packages to the source port of the last received UDP message. But in this case a message must have been received first before the FB can send a message.
  • +
  • PORT = UDP:10001;10.0.0.1:9001   /   FB operates in UDP Client Mode, that means it listens for incoming packages on Port 10001 from IP 10.0.0.1 - packages from other IPs/ports are dropped, sending will adress packages to 10.0.0.1:9001 (With the use of DestPort 10001, in our example, this mode would allow the sending of UDP messages without having received a package before)
  • PORT = TCP:10.0.0.1:10001;10.0.0.1:9001  /  FB operates in TCP Client Mode, it listens for incoming packages on 10.0.0.1 port 10001 - packages from other IPs/ports are dropped, sending will address packages to 10.0.0.1:90001

+

+

+

 

'STARTCHAR', 'ENDCHAR':

This parameters are optional. They can be used for structuring a data stream (like TCP) into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and then the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

A line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, can be made by setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>), because the functionblock only permits a single marker byte. This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be an <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'DATOUT'-data input:

Containes data that will be transferred to the client when REQ-Event happens.

 

'QO'-output:

Shows the initialization status.

TRUE means initializing or deinitializing has worked properly

FALSE means initializing or deinitializing did not work properly, an error has occurred. Error message is set at 'STATUS'.

 

'STATUS'-output:

When an input event ('INIT', 'REQ' or 'ACK') has been successfully processed, the output is blank. Only if an error has occurred it contains the specific error message.

 

'PEERADDR'-output:

Containes the address of the client receiving data or which has last sent some.

 

'DATAIN'-data output:

Containes the data received from a client and now ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

+

+

+

+

+

+

+ + \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml new file mode 100644 index 000000000..f8caa7f1d --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml @@ -0,0 +1,180 @@ + +
+ + + + + + + + +

This generic function block reads values from the u::Lux switch.

The ULUX_IN satellite function block has to be used in combination with the ULUX_SWITCH function block.

The number of in- and outputs can be increased up to 16.

+

+

+
+

+ Behaviour

This is a satellite function block bound to the ULUX_SWITCH function block via the SwitchId input.

The values accessed are addressed via ActorId (zero for switch-global data, non-zero for actor data) and an addressing string specifying a value and optionally sub and sub-sub identification. The exact meaning is out of scope of this description, so this is only a quick overwiew of possible values.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueIdGlobal/ActorSubIdSubSubIdDescription
MotionSensorglobal--Motion sensor detected motion
ProximitySensorglobal--Proximity sensor detected an object
LightSensorgobal--Light intensity over threshold
PageCountgobal--Count of display pages in the switch
PageIndexgobal--Currently active page
EditValueactor--Edit value of the actor
RealValueactor0..3-Up to 4 values provided to the actor
LEDColoractor0..3-LED color
LEDBlinkModeactor0..3-LED blink mode (see u::Lux docs)
LEDOverrideactor0..3-LED is controlled by PLC (not the switch)
Textactor0..9ColorText color
+ + +VisibleText is visible
+ + +UseColorColor is controlled by PLC
+ + +TextUp to 10 texts per actor
Buttonboth0..3-Button pressed
Luxglobal--Light intensity
LuxValidglobal--Light intensity sensor present
Temperatureglobal--Temperature
TemperatureValidglobal--Temperature sensor present
Humidityglobal--Humidity
HumidityValidglobal--Humidity sensor present
CO2global--CO2
CO2Validglobal--CO2 sensor present
IN2global-0..1Additional two digital inputs
IN2Validglobal-0..1Additional inputs present

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml new file mode 100644 index 000000000..09e20e2a6 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml @@ -0,0 +1,95 @@ + +
+ + + + + + + + +

This generic function block writes values to the u::Lux switch.

The ULUX_OUT satellite function block has to be used in combination with the ULUX_SWITCH function block.

The number of in- and outputs can be increased up to 16.

+

+
+

+ Behaviour

This is a satellite function block bound to the ULUX_SWITCH function block via the SwitchId input.

The values accessed are addressed via ActorId (zero for switch-global data, non-zero for actor data) and an addressing string specifying a value and optionally sub and sub-sub identification. The exact meaning is out of scope of this description, so this is only a quick overwiew of possible values.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueIdGlobal/ActorSubIdSubSubIdDescription
PageIndexgobal--Set the currently active page
EditValueactor--Edit value of the actor
RealValueactor0..3-Up to 4 values provided to the actor
LEDColoractor0..3-LED color
LEDBlinkModeactor0..3-LED blink mode (see u::Lux docs)
LEDOverrideactor0..3-LED is controlled by PLC (not the switch)
Textactor0..9ColorText color
+ + +VisibleText is visible
+ + +UseColorColor is controlled by PLC
+ + +TextUp to 10 texts per actor
+ + +RemoveCompletely remove the text

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml new file mode 100644 index 000000000..66a79e45e --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml @@ -0,0 +1,89 @@ + +
+ + + + + + + + +

This function block represents an instance of u::Lux switch

It handles both the configuration (assigning an IP address, flashing the firmware) and operation. For accessing the data of the switch the ULUX_IN and ULUX_OUT satellite function blocks are used.

+

+
+

+ Initializing +

Each switch is addressed via its IP address. The IPAddress, IPNetmaskWidth and IPGateway have to be set at the 'INIT' time. If the switch has to broadcast the data to other PLCs (not used at the moment), DestinationIP has to be set as well.

Commissioning

After an installation of the new switch it has to be commissioned, i.e. the MAC address has to be determined and IP address assigned to it. To efficiently do this the u::Lux switch provides a way to send a message allowing to identify itself. The process is then as follows

    +
  • set 00:00:00:00:00:00 as MACAddress
  • +
  • fire the 'COMMISSION' event. The StateStr changes to 'Commissioning'. Now you have 1 minute to perform the next step
  • +
  • on the switch itself perform an action to send the commissioning message (the exact way is to be defined, the new switches will be delivered with this possibility)
  • +
  • the MACAddressOut gives the switch's MAC address and the 'COMMISSIONED_IND' fires
  • +
  • persistently save the MAC address and loop it back to the MACAddress input

Assigning / changing the IP address

If the MAC address of the switch is known, the next step is to assign an IP address to it.

    +
  • if the switch already had an address and the State is Running, fire a 'STOP' event first and wait for 'STOP_CNF'
  • +
  • fire 'SET_IP' to set and 'ERASE_IP' to remove the IP address. The operation will be confirmed by corresponding output events
  • +
  • depending on the IP addresses and state of the operating system's ARP tables the operation can seem to time out but in fact complete successfully. When changing an already allocated IP address it is recommended to erase it first, wait several seconds and then to set it

Operation

If at the time of 'INIT' a switch with matching MAC and IP is found, the state changes to 'HasIP' and the 'CONFIGURED_IND' event fires. This event can be routed back to the 'START' event, which triggers the following

    +
  • the firmware running in the switch is checked
  • +
  • if it differs from the one present in the project, it is flashed
  • +
  • the switch is configured and provided with the current date/time
  • +
  • the current data are read
  • +
  • the 'RUNNING_IND' event fires

Now the switch can be interacted with using the ULUX_IN/ULUX_OUT function blocks.

The 'STOP' event stops the switch. This is necessary to change its IP address.

The 'RESTART' event stops the switch and then runs the sequence described for 'START'.

States

The State output presents a numerical state that can be together with 'STATE_IND' be used to perform some checks/indications in the CAT. The StateStr gives this information in a text form and the Error output contains additional information in the case of an error.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
State and StateStr
StateStateStrMeaning
0Not initializedNo event yet
1InitializedInitialized, but switch not found (yet)
2Setting IPIn the process of setting an IP address
3Has IPMAC/IP match and found
4Checking FirmwareChecking if the firmware has to be updated
5FlashingUpdating the firmware
6Waiting for init requesttemporary stati while starting
7Waiting for init done
8Waiting for initial values
9RunningSwitch operating normally
10CommissioningWaiting for the physical action on the switch
11ErrorThe last operation ended with error

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml new file mode 100644 index 000000000..c73457f14 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml @@ -0,0 +1,32 @@ + +
+ + + + + + + + +

This function block converts input values which can be numerical values or strings into a string, where the format is defined by a string at an extra input. The resulting string is written to the output and an output event is generated.

It is a generic block. The number of inputs can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'REQ'-Event input:

Each 'REQ'-Event reads the string form the 'FORMAT'-input and processes it. The string is parsed (which could also result in an error) and the numerical values supplied at the 'VALUEn' inputs are converted into a string according to the format-string. The result is written to the 'RESULT'-output and a 'CNF'-Event is fired.

'CNF'-Event output:

This event output is fired after every 'REQ'.

 

Functional Behavior

'FORMAT' input:

The format string definition is compatible to the one of the 'C'-language library function 'printf(format, ... )'.

The string 'FORMAT' consists of two types of items - characters that will be printed to the 'RESULT' string, and format commands that define how the other arguments ('VALUE1' ... 'VALUEn') are converted. Basically, a format string is specified which has text in it, as well as "special" characters that map to the other arguments 'VALUE1' ... 'VALUEn'.

The %s means, "insert the first argument, a string, right here." The %d indicates that the second argument (an integer) should be placed there. There are different %-codes for different variable types, as well as options to limit the length of the variables. The arguments have to be in the same order as the 'VALUE1-n' inputs are, beginning with 'VALUE1'.

    +
  • %d         type: int, output format: signed decimal integer
  • +
  • %i          type: int, output format: signed decimal integer
  • +
  • %o         type: int, output format: unsigned octal integer
  • +
  • %u         type: int, output format: unsigned decimal integer
  • +
  • %x         type: int, output format: unsigned hexadecimal integer, using "abcdef"
  • +
  • %X         type: int, output format: unsigned hexadecimal integer, using "ABCDEF"
  • +
  • %e         type: double, output format: scientific notation, with a lowercase "e"
  • +
  • %E         type: double, output format: scientific notation, with an uppercase "E"
  • +
  • %f          type: double, output format: floating point (eg: %.2f type: double, 2 digits after decimal point)
  • +
  • %s         type: string, output format: string
  • +
  • %c         type: char, output format: char
  • +
  • %%        type: char, output "%" sign

An integer placed between a % sign and the format command acts as a minimum field specifier, and pads the output with spaces or zeros to make it long enough. If zeros shall be padded, a zero should be placed before the minimum field width specifier.

example:  FORMAT := "%04X", VALUE1 :=  220 generates the following output at RESULT := "00DC"  

A precision modifier can be placed, which has different meanings depending on the format code being used. With %e, %E and %f, the precision modifier lets specify the number of decimal places desired. (eg: %10.5f will generate a floating number at least 10 digits wide, with 5 decimal places).

 

'VALUE1-n' input:

Data inputs, format selectable. The values of this inputs are passed to the 'RESULT' output accordingly with the characters and definition at input 'FORMAT'.

'RESULT' output:

Prints the string to the 'RESULT'-output according to the 'FORMAT'-input string and the values passed in 'VALUE1' ... 'VALUEn'. 

+

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml new file mode 100644 index 000000000..73aae6be8 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml @@ -0,0 +1,30 @@ + +
+ + + + + + + + +

This function block reads values which can be numerical values or strings out of a given input string INSTR according to the specified string format FORMAT. The ´read values are provided as outputs VALUEn and an output event is generated.

It is a generic block. The number of outputs can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

'REQ'-Event input:

Each 'REQ'-Event reads the input strings 'FORMAT' and 'INSTR' and processes them. The format string is parsed (which could also result in an error) and the values defined by the 'VALUEn' outputs are converted from the input string according to the format string. The resulting values are written to the 'output variables and a 'CNF'-Event is fired.

 

Functional Behavior

Reads the designated output values VALUEn from the 'INSTR' input according to the 'FORMAT' input string. The format string definition is compatible to the one of the 'C'-language library function 'scanf(format, ... )'. 

The string 'FORMAT' consists of two types of items - fill characters that may define some separators between dedicated values coded into the input string and format commands that define how the other values 'VALUE1' ... 'VALUEn') have been coded into the input string. Basically, a format string is specified which has text in it, as well as "special" characters that map to the other arguments 'VALUE1' ... 'VALUEn'.

The %s means, "read the first argument, a string, right here." The %d indicates that the second argument (an integer) should be decoded as second value. There are different %-codes for different variable types, as well as options to limit the length of the variables.

 

    +
  • %d         type: int, input format: signed decimal integer
  • +
  • %i          type: int, input format: signed decimal integer
  • +
  • %o         type: int, input format: unsigned octal integer
  • +
  • %u         type: int, input format: unsigned decimal integer
  • +
  • %x         type: int, input format: unsigned hexadecimal integer, using "abcdef"
  • +
  • %X         type: int, input format: unsigned hexadecimal integer, using "ABCDEF"
  • +
  • %e         type: double, input format: scientific notation, with a lowercase "e"
  • +
  • %E         type: double, input format: scientific notation, with an uppercase "E"
  • +
  • %f          type: double, input format: floating point (eg: %4f type: double, 4 digits altogether including the decimal point)
  • +
  • %s         type: string, input format: string
  • +
  • %c         type: char, input format: char

An integer placed between a % sign and the format command acts as a minimum field specifier.

 

example:  FORMAT := '%3d', INSTR :=  '4210' decodes the following output at VALUE1 (INT) := 421

 

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml new file mode 100644 index 000000000..9cc3da4f0 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml @@ -0,0 +1,18 @@ + +
+ + + + + + + + +

This function block is used internally for accessing the watch service

+

+
+

This function block is used internally for accessing the watch service

+

+ diff --git a/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml new file mode 100644 index 000000000..70c6086a7 --- /dev/null +++ b/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml @@ -0,0 +1,109 @@ + +
+ + + + + + + + +

This function block implements a logical eXclusive OR.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

+

+
+

+ Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL for two inputs: XOR leads to output 'OUT' TRUE (1) only if one of the two inputs 'IN1' and 'IN2' is TRUE, when 'IN1' and 'IN2' have the same value (either TRUE or FALSE) the output is 'FALSE'. 

 

+

+ + + + + + + + + + + + + + + + + + + + + + +
logic table
In2In1Out
000
101
011
110

 

Datatype BOOL for 'n' inputs: XOR leads to output 'OUT' TRUE (1) if an odd number of inputs 'IN1' ... 'INn' has the same state (either TRUE or FALSE). When an even number of input has the same state, the output is set to FALSE. 

 

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
In4In3In2In1Out
01001
01111
10010
11110

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise-exclusive-OR of the INPUTs. The result is stored into OUT.

 

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

examples for logic table

In2In1Out
000000000000
000000010001
001000000010
000100010000
001100010010
111010010111

+

+ From 22b344fee04f5e8af64c068a45e4043959a5cda6 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 27 Feb 2024 13:05:10 +0300 Subject: [PATCH 14/50] Removed docs --- .../models/NewLibrary/ADD.doc.xml | 21 -- .../models/NewLibrary/ANAMATH.doc.xml | 21 -- .../models/NewLibrary/AND.doc.xml | 76 -------- .../models/NewLibrary/ANY2ANY.doc.xml | 20 -- .../models/NewLibrary/BC_MODBUS.doc.xml | 20 -- .../models/NewLibrary/BITMAN.doc.xml | 34 ---- .../models/NewLibrary/BM_DLL.doc.xml | 26 --- .../models/NewLibrary/BM_SIMBUS.doc.xml | 18 -- .../models/NewLibrary/BUSCOUPLER.doc.xml | 20 -- .../models/NewLibrary/BUSDEVICE.doc.xml | 18 -- .../models/NewLibrary/BUSDEVICECONFIG.doc.xml | 18 -- .../models/NewLibrary/CABDEVICE.doc.xml | 18 -- .../models/NewLibrary/CALC_FORMULAR.doc.xml | 29 --- .../models/NewLibrary/CFG_ANY_GET.doc.xml | 18 -- .../models/NewLibrary/CFG_ANY_SET.doc.xml | 18 -- .../models/NewLibrary/CFG_DIRECT_GET.doc.xml | 18 -- .../models/NewLibrary/CFG_DIRECT_SET.doc.xml | 18 -- .../models/NewLibrary/CFG_EVENT.doc.xml | 18 -- .../NewLibrary/COMMCHANNELUDPRECV.doc.xml | 18 -- .../models/NewLibrary/COMPARE.doc.xml | 58 ------ .../models/NewLibrary/CPUTICK.doc.xml | 27 --- .../models/NewLibrary/DALI_CAB.doc.xml | 18 -- .../models/NewLibrary/DALI_IO.doc.xml | 18 -- .../models/NewLibrary/DIV.doc.xml | 19 -- .../models/NewLibrary/DS_SELECT.doc.xml | 18 -- .../models/NewLibrary/DS_SELECTX.doc.xml | 18 -- .../models/NewLibrary/EIB_CONTROL.doc.xml | 18 -- .../models/NewLibrary/EIB_IN.doc.xml | 18 -- .../models/NewLibrary/EIB_OUT.doc.xml | 18 -- .../models/NewLibrary/ENOCEANIF_CAB.doc.xml | 18 -- .../NewLibrary/ENOCEANIF_SERIAL.doc.xml | 18 -- .../models/NewLibrary/ENOCEAN_CAB.doc.xml | 19 -- .../models/NewLibrary/ENOCEAN_IN.doc.xml | 20 -- .../models/NewLibrary/ENOCEAN_IO.doc.xml | 18 -- .../models/NewLibrary/ENOCEAN_OUT.doc.xml | 19 -- .../NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml | 20 -- .../models/NewLibrary/ETHERCAT_COE.doc.xml | 18 -- .../models/NewLibrary/ETHERCAT_FOE.doc.xml | 18 -- .../models/NewLibrary/ETHERCAT_SLAVE.doc.xml | 18 -- .../models/NewLibrary/ETHERCAT_SOE.doc.xml | 18 -- .../models/NewLibrary/EVENTCHAIN.doc.xml | 21 -- .../models/NewLibrary/EVENTCHAINHEAD.doc.xml | 22 --- .../models/NewLibrary/EVENTSCHEDULER.doc.xml | 50 ----- .../models/NewLibrary/E_CTU.doc.xml | 19 -- .../models/NewLibrary/E_CYCLE.doc.xml | 19 -- .../models/NewLibrary/E_DELAY.doc.xml | 24 --- .../models/NewLibrary/E_DELAYR.doc.xml | 28 --- .../models/NewLibrary/E_DEMUX.doc.xml | 24 --- .../models/NewLibrary/E_D_FF.doc.xml | 21 -- .../models/NewLibrary/E_F_TRIG.doc.xml | 19 -- .../models/NewLibrary/E_HRCYCLE.doc.xml | 26 --- .../models/NewLibrary/E_MERGE.doc.xml | 23 --- .../models/NewLibrary/E_N_TABLE.doc.xml | 23 --- .../models/NewLibrary/E_PERMIT.doc.xml | 19 -- .../models/NewLibrary/E_REND.doc.xml | 20 -- .../models/NewLibrary/E_RESTART.doc.xml | 19 -- .../models/NewLibrary/E_RS.doc.xml | 23 --- .../models/NewLibrary/E_R_TRIG.doc.xml | 19 -- .../models/NewLibrary/E_SELECT.doc.xml | 20 -- .../models/NewLibrary/E_SPLIT.doc.xml | 22 --- .../models/NewLibrary/E_SR.doc.xml | 23 --- .../models/NewLibrary/E_SWITCH.doc.xml | 22 --- .../models/NewLibrary/E_TABLE.doc.xml | 19 -- .../models/NewLibrary/E_TRAIN.doc.xml | 19 -- .../NewLibrary/EnoceanCommDevice.doc.xml | 18 -- .../NewLibrary/EnoceanCommInterface.doc.xml | 18 -- .../models/NewLibrary/FB_DLL.doc.xml | 20 -- .../models/NewLibrary/FORCE_IND.doc.xml | 32 ---- .../models/NewLibrary/HASH.doc.xml | 20 -- .../models/NewLibrary/HMISERVER.doc.xml | 18 -- .../models/NewLibrary/KNX_IN.doc.xml | 18 -- .../models/NewLibrary/KNX_OUT.doc.xml | 18 -- .../models/NewLibrary/LOGGER.doc.xml | 25 --- .../models/NewLibrary/MBUSDEVCTRL.doc.xml | 18 -- .../models/NewLibrary/MBUSDEVICE.doc.xml | 18 -- .../models/NewLibrary/MIBGET.doc.xml | 41 ---- .../models/NewLibrary/MODBUSIO.doc.xml | 35 ---- .../models/NewLibrary/MUL.doc.xml | 19 -- .../models/NewLibrary/NETIO.doc.xml | 59 ------ .../models/NewLibrary/NOT.doc.xml | 32 ---- .../models/NewLibrary/NUMBER2TIME.doc.xml | 22 --- .../models/NewLibrary/OPCUASERVER.doc.xml | 30 --- .../Runtime.Base/models/NewLibrary/OR.doc.xml | 77 -------- .../models/NewLibrary/PD_ANY_IN.doc.xml | 20 -- .../models/NewLibrary/PD_ANY_OUT.doc.xml | 23 --- .../models/NewLibrary/PD_DIRECT_IN.doc.xml | 18 -- .../models/NewLibrary/PD_DIRECT_OUT.doc.xml | 18 -- .../models/NewLibrary/PERSISTENCE.doc.xml | 25 --- .../NewLibrary/PERSISTENCE_FRAM.doc.xml | 37 ---- .../models/NewLibrary/PRIOSCHEDULER.doc.xml | 40 ---- .../NewLibrary/QUERY_CONNECTION.doc.xml | 23 --- .../NewLibrary/REPORT_APP_STATE.doc.xml | 18 -- .../models/NewLibrary/RES_WATCHDOG.doc.xml | 18 -- .../models/NewLibrary/ROL.doc.xml | 19 -- .../models/NewLibrary/ROR.doc.xml | 19 -- .../models/NewLibrary/RTWatchdog.doc.xml | 19 -- .../models/NewLibrary/SELECT.doc.xml | 19 -- .../models/NewLibrary/SERIALIO.doc.xml | 34 ---- .../models/NewLibrary/SHL.doc.xml | 19 -- .../models/NewLibrary/SHR.doc.xml | 19 -- .../models/NewLibrary/SIMULATION_RES.doc.xml | 19 -- .../models/NewLibrary/SMI_DEVICE.doc.xml | 18 -- .../models/NewLibrary/SMI_INTERFACE.doc.xml | 18 -- .../models/NewLibrary/SMOOTH.doc.xml | 22 --- .../models/NewLibrary/STATS_LOGGER.doc.xml | 18 -- .../NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml | 18 -- .../NewLibrary/STATS_LOGGER_DEV.doc.xml | 18 -- .../NewLibrary/STATS_LOGGER_NET.doc.xml | 18 -- .../NewLibrary/STATS_LOGGER_RSRC.doc.xml | 18 -- .../models/NewLibrary/SUB.doc.xml | 19 -- .../NewLibrary/SYMLINKMULTIQUEDST.doc.xml | 19 -- .../NewLibrary/SYMLINKMULTIQUESRC.doc.xml | 19 -- .../NewLibrary/SYMLINKMULTIVALDST.doc.xml | 30 --- .../NewLibrary/SYMLINKMULTIVALSRC.doc.xml | 27 --- .../NewLibrary/SYMLINKMULTIVARDST.doc.xml | 28 --- .../NewLibrary/SYMLINKMULTIVARSRC.doc.xml | 27 --- .../models/NewLibrary/SYMLINKSTATUS.doc.xml | 18 -- .../models/NewLibrary/SYSLOGLOGGER.doc.xml | 18 -- .../models/NewLibrary/SYSMONITOR.doc.xml | 18 -- .../models/NewLibrary/TCPIO.doc.xml | 55 ------ .../models/NewLibrary/ULUX_IN.doc.xml | 180 ------------------ .../models/NewLibrary/ULUX_OUT.doc.xml | 95 --------- .../models/NewLibrary/ULUX_SWITCH.doc.xml | 89 --------- .../models/NewLibrary/VALFORMAT.doc.xml | 32 ---- .../models/NewLibrary/VALSCAN.doc.xml | 30 --- .../models/NewLibrary/WATCHSERVER.doc.xml | 18 -- .../models/NewLibrary/XOR.doc.xml | 109 ----------- 127 files changed, 3349 deletions(-) delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/AND.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/OR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml delete mode 100644 solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml diff --git a/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml deleted file mode 100644 index dae371eb1..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ADD.doc.xml +++ /dev/null @@ -1,21 +0,0 @@ - -
- - - - - - - - -

This function block implements a mathematical add operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

 

-

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Calculates the sum of all inputs 'IN1' ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type.

'OUT' := 'IN1' + 'IN2' + ... + 'INn'

 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml deleted file mode 100644 index cf5a7f08f..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ANAMATH.doc.xml +++ /dev/null @@ -1,21 +0,0 @@ - -
- - - - - - - - -

This function block calculates the minimum/maximum and average values of [len] numerical input values.

It is a generic block. Input and output datatypes (except input 'len') can be defined. The number of inputs and outputs is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

- Temporal Behavior

'RESET'-Event input:

- Clears the internal list

- Set outputs to zero: 'tAvg${i}', 'tMax${i}', 'tMin${i}' and 'tDeadT${i}'

- Fires an 'RESET0'-Event

 

'REQ'-Event input:

- Reads the 'len'-input, updates the internal list size

- Reads the 'pv${i}'-input

- If the list is empty then

    - Copy the input value of 'pv$' to all 'len' elements in the list

- Adds the input value to the list

- If the number of values in the list is equal to 'len'

    - Remove the oldest value and pass it to 'tDeadT${i}'-output

    - Add new value to the list

- Else

    - Add new value to the list

- Perform calculation of the minimum/maximum and average value

- Pass results to the corresponding outputs: 'tAvg${i}', 'tMax${i}', 'tMin${i}'

- Fire a 'CNF'-Event

 

Functional Behavior

The value of the 'len'-input defines the number of the elements the list can hold and also used for all calculations. The first 'REQ'-Event copies the value of the 'pv$'-input to every element in the list of 'len' entries. So the first average value calculated will be equal to the first input value.

At every 'REQ' event the calculation of the average 'tAvg1', maximum value 'tMax' and minimum value 'tMin' are performed. The output 'tDeadT$' will be updated when the list is full and a new value is added. 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml deleted file mode 100644 index ce76d10fa..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/AND.doc.xml +++ /dev/null @@ -1,76 +0,0 @@ - -
- - - - - - - - -

This function block implements a logical AND.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: AND leads to output 'OUT' TRUE(1), if all enabled inputs ('IN1' ... 'INn') are TRUE. Otherwise the output is FALSE (0).

 

-

- - - - - - - - - - - - - - - - - - - - - - -
logic table
In2In1Out
000
010
100
111

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise logical AND of the INPUTs. The result is stored into OUT.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

examples for logic table

In2In1Out
000000000000
000000010000
001000000000
000100010001
001100010001
111010111010

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml deleted file mode 100644 index a4689f688..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ANY2ANY.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block converts one datatype to another.

It is a generic block. The number of inputs (and accordingly outputs) can be chosen from 1 to 16.

The data type of each in- and output can be defined independently.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

ANY2ANY accepts all sorts of datatypes at the input ('IN1' ... 'INn') and converts them into the selected output datatype if possible. Every input has one corresponding output ('IN1' -> 'OUT1', 'IN2' -> 'OUT2', ... 'INTn' -> 'OUTn'). The input value will be ignored, if the conversion cannot be performed (e.g. STRING to INT will be ignored, except there are only numbers.) Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the conversion cannot be represented in the 'OUT' type. (e.g. DINT to INT or SINT may result in loss of data, etc.)

Note: conversions in the form of TIME to REAL, TIME to LREAL, etc. are not supported by ANY2ANY. Use a basic FB for that purpose (conversions like REAL_TO_TIME or TIME_TO_REAL can be executed in structured test - but be careful not to lose data, because REAL generally is to small to hold TIME values).

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml deleted file mode 100644 index 7faeab85e..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BC_MODBUS.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for MODBUS Couplers

-

-

-
-

-

This function block is internally used for MODBUS Couplers

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml deleted file mode 100644 index 19f08c079..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BITMAN.doc.xml +++ /dev/null @@ -1,34 +0,0 @@ - -
- - - - - - - - -

This function block is an extremely powerful tool. It enables various sorts of bit-manipulation in all directions.

It is a generic block. The number of inputs and outputs can be chosen independently from 1 to 32.

Pulling the symbol in the bottom right corner of the block up or down changes the number of either inputs or outputs. To change from input-alteration to output-alteration or conversely, just click the symbol in the bottom right corner of the block by a right-click and then choose INCNT or OUTCNT. Afterwards you can alter the selected ports by pulling with left-click again.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'INIT' initiates a check of input 'OP'. Only if the definition corresponds with the number of inputs this event leads to output 'STATUS' ok, otherwise it leads to an error report and the normal 'REQ' doesn't work.

If 'INIT' leads to 'STATUS' ok, each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

After each change of input 'OP' it is necessary to trigger 'INIT' before executing 'REQ'.

-
- - - - - - -
[tip]If Output STATUS always leads to an error report:
-

Check your input definitions of OP. The number of output information has to be less or equal to the number of input information.

 

Functional Behavior

Input 'OP' defines the functionality of all outputs ('OUT1' ... 'OUTn'). Possible are 32 inputs and 32 outputs as maximum. They can be BOOL, BYTE, WORD, DWORD, LWORD-type.

All inputs together are to be looked upon as one whole bit-image, whereas bit 0 is lsb (least significant bit) of the first input. Highest bit is msb (most significant bit) of the last input. The same order is true for output. [i.e. input1 is BYTE, input2 is BOOL, input3 is BYTE then first output address 0 (LSB of 1.BYTE) -7 (MSB of 1.Byte), then 8 (BOOL), and 9 (LSB of 2.BYTE) - 16 (MSB of 2.Byte)].

There is the possibility to set the starting position for the output bit (e.g. 3=1 means: output bit 3 = input bit 1), but it's optional. If not, starting position is 0, respectively the position where the last operation has finished. Further actions join on the next output bit position.

    -
  • n, or n-m, or m-n, takes the bit number n from input to the next output position, whereby m-n will reverse the order.
  • -
  • n:i, n-m:i, m-n:i, same as above, but with invert value.
  • -
  • n:0 number of n 0-bits from the next output position.
  • -
  • n:1 number of n 1-bits from the next output position.
  • -
  • Not defined output bits are 0.
  • -
  • OP completely blank has the same meaning than 0-n.

Examples:

Endianness-alteration of a DWORD:

24-31,16-23,8-15,0-7

Third bit to output position 0 (=lsb of output1), second to position 8 invert, the third and fourth bit in reversed order on output position 9 and 10, and beginning with position 16 eight times 1:

2,8=1:i,4-3,16=8:1

To split a BYTE from one input in reversed order to 8 BOOL-outputs:

7-0

-

-

diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml deleted file mode 100644 index 07b4576ab..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BM_DLL.doc.xml +++ /dev/null @@ -1,26 +0,0 @@ - -
- - - - - - - - -

This function block is the bus master using a standardized DLL as the underlying driver.

-

-
-

This function block provides the bus master using a standardized DLL as the underlying driver. The DLL contains all operations needed to initialize, start, run, stop and uninitialize the driver. The CONFIGURATION input is used to pass all the information necessary to configure the driver instance - for simple drivers this can be a configuration string, for more complicated ones it can be name of the configuration file.

The DLL_NAME parameter contains a name of the DLL to load. The DLL is searched according to the dlopen() semantics.

The OPS_NAME contains a name of the symbol inside the DLL providing the operations structure. Consult the manual for the particular driver to find its value.

Usually there can be only one instance of BM_DLL for every DLL_NAME / OPS_NAME combination. This is not enforced by the FB.

 

- - - - - - -
[caution]Caution
-

By using a dynamically loaded code you are operating in the memory space of the runtime. Any bugs, memory leaks, multithreading problems, non-deterministic or inappropriately high delays have direct effect on the runtime and can cause its crash or incorrect operation.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml deleted file mode 100644 index 6046bf863..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BM_SIMBUS.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This busmaster is internally used for simulation

-

-
-

This busmaster is internally used for simulation

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml deleted file mode 100644 index 919f82ab7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BUSCOUPLER.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Couplers solely in Hardware CATs.

-

-

-
-

This function block is internally used for Couplers solely in Hardware CATs.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/BUSDEVICECONFIG.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CABDEVICE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml deleted file mode 100644 index 9965d1308..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CALC_FORMULAR.doc.xml +++ /dev/null @@ -1,29 +0,0 @@ - -
- - - - - - - - -

This function block evaluates formulas containing mathematical/logical expressions and conditions.

It is a generic block. The number of inputs 'Xn' can be chosen from 2 to 16 of any numerical type. The number of inputs 'FORMULAm' which are strings containing a formula can be in a range from 2 to 8 which is also the number of outputs 'Ym'. The outputs can be of any numerical types. Input and output types do not depend from each other.

Pulling the symbol in the bottom right corner of the block up or down changes the number of either inputs or outputs. To change from input-alteration to output-alteration or conversely, just click the symbol in the bottom right corner of the block by a right-click and then choose INCNT or OUTCNT. Afterwards you can alter the selected ports by pulling with left-click again.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

Performs the initialization and compiles the formulas contained in the 'FORMULA1' ... 'FORMULA8' input strings. A syntax check of all formulas is performed starting at 'FORMULA1' ... 'FORMULA8'. On success the 'COMPILESTATUS' ouput is set to OK. In the case when an error is detected, the check stops immediately at the current 'FORMULA' input and the 'COMPILERSTATUS' outputs an error message. The error shall be fixed and the 'INIT-Event fired again to restart the syntax check until all formulas have been compiled successfully.

On every update of a formula the 'INIT-Event shall be fired. A formula may also be changed during runtime.

Only when the 'COMPILESTATUS' is OK the 'REQ'-Event will work.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic, which means that the input values 'X1' ... 'Xn' are captured and all formulas are evaluated. The results of 'FORMULA1' ... 'FORMULAm' are written to the corresponding outputs 'Y1' ... 'Ym'.

 

'INITO'-Event output:

This event is fired when the initialization and compilation of formulas (successfully or not) have been completed.

 

'CNF'-Event output:

This event is fired when the evaluation of 'FORMULA1' ... 'FORMULAm' has successfully completed and the outputs 'Y1' ... 'Ym' have been written. The output of 'RUNTIMESTATUS' is set to OK.

 

'ERR'-Event output:

This event is fired when the evaluation of 'FORMULA1' ... 'FORMULAm' has not successfully completed because a runtime error (division by zero, etc.) occurred. The output of 'RUNTIMESTATUS' is set to an error message.

On error no 'CNF'-Event is fired.

 

 

Functional Behavior

The following arithmetic expressions are allowed:

+, -, *, /, Xn%Xm , Xn**Xm, asin(Xn), acos(Xn), atan(Xn), sin(Xn), cos(Xn), tan(Xn), sqrt(Xn), ln(Xn), and brackets() as well as all combinations.

All trigonometric functions are calculated in radians. The mathematical constants PI, E are also supported.

Examples for correct syntax:

    -
  • (X1-2)*5-(X2*(X1+3))+X3/2
  • -
  • sqrt(X2*X3)
  • -
  • asin(X1)
  • -
  • X1**X3  or X1**4   ...syntax for exponential function (x^y)
  • -
  • X1%3  or X1%X2    ...syntax for modulo operation, it finds the remainder of a division of one number by another (for example: X1=5 divided by 3: the result = remainder would be 2). For this function the datatype has to be INT (UINT, SINT, USINT, DINT, UDINT, LINT, ULINT)!

 

The following logical expressions are allowed:

AND, OR, XOR, NOT

Examples:

    -
  • X4 AND X5 OR NOT X6

In this case the output value is either 1 or 0 (TRUE or FALSE if output datatype is BOOL).

 

The following conditions are allowed:

> (greater than), >= (greater or equal), = (equal), <> (not equal), <= (less or equal), < (less than)

Examples:

    -
  • X1<=X3
  • -
  • X2>X4 AND X3

In this case the output value is either 1 or 0 (TRUE or FALSE if output datatype is BOOL).

 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_GET.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CFG_ANY_SET.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_GET.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CFG_DIRECT_SET.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml deleted file mode 100644 index f47586218..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CFG_EVENT.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access solely in Hardware CATs.

-

-
-

This function block is internally used for hardware access solely in Hardware CATs.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml deleted file mode 100644 index 78a4bd39f..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/COMMCHANNELUDPRECV.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internal used for communication with other devices

-

-
-

This function block is internal used for communication with other devices

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml deleted file mode 100644 index 0789559be..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/COMPARE.doc.xml +++ /dev/null @@ -1,58 +0,0 @@ - -
- - - - - - - - -

This function block performs an arithmetic comparison of values.

It is a generic block. The input-datatype can be chosen. The number of ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Compares the value of input1 'IN1' with the value of input2 'IN2'. The outputs ('LT', 'LE', 'EQ', 'NE', 'GE' and 'GT') reflect the result of the comparisons which is always of type BOOL and can be either TRUE or FALSE.

 

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

table of operations

type of comparison         description         output name
-

IN1 < IN2

less thanLT
-

IN1 <= IN2

less than or equalLE
-

IN1 = IN2

equalEQ
-

IN1 <> IN2

not equalNE
-

IN1 >= IN2

greater than or equalGE
-

IN1 > IN2

greater thanGT

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml b/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml deleted file mode 100644 index 3fb8aff98..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/CPUTICK.doc.xml +++ /dev/null @@ -1,27 +0,0 @@ - -
- - - - - - - - -

This function block measures the time span between two input events.

-
-

- Temporal Behavior

-

Each 'REQ'-Event captures the internal time and calculates the difference to the prev. input event. The result is passed to the 'timeDiff'-output and the 'timeDiffUnits'-output. Then a 'CNF'-Event is fired.

-

The first 'REQ'-Event is a special case: The time span from start of the runtime until the arrival of the 'REQ'-Event is calculated.

-

Another option is to use the START event. In that case the 'START' event captures the time and the 'REQ' event calculates the difference and fires the 'CNF' event.

-

 

-

Functional Behavior

-

The 'timeDiff'-output has the the IEC-TIME duration format.

-

The format of the 'timeDiffUnits'-output is selected by the 'unit'-input which is the value 0 for seconds, 1 for milliseconds, 2 for microseconds and 3 for nanoseconds. For values above 3, the default to 3 (nanoseconds) is taken.

-

Depending on the unit selected, the maximum time span which can be measured is 4s294ms967us295ns if nanoseconds are selected, 1h11m34s967ms295ms if microseconds are selected and approximately 49d17h2m47s. Exceeding these limits causes truncation and seemingly irregular results.

-

The resolution of the time difference returned is generally defined by the number of clock ticks per second a particular runtime system is configured at. E.g. given a clock frequency of 1000 ticks per second actually limits the smallest measurable time difference greater than zero to one millisecond no matter what unit is selected.

-

If the platform supports high resolution timers the 'timeDiff' is calculated using the resolution provided by them.

- diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/DALI_CAB.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/DALI_IO.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml deleted file mode 100644 index 9a5decbe7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/DIV.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a mathematical divide operation.

It is a generic block. The number of inputs can be chosen from 2 to 16. The number of outputs are 1 to 8 which depend on the number of input pairs.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

The maximum number of inputs is 16. The inputs are organised as pairs. Each pair has one corresponding 'OUT' to hold the result and an 'ERR' for indication of an error. The first input represents operand1, the second operand2. The result is stored in 'OUT'. If the second operand is zero, then 'OUT' is set to zero and 'ERR' is TRUE.

 

For example:

4 inputs:

'IN11': 10#40, 'IN12': 10#5, result: 'OUT1': 10#8, 'ERR1': FALSE 

'IN21': 10#25, 'IN22': 10#0, result: 'OUT2': 10#0, 'ERR2': TRUE 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml deleted file mode 100644 index a5081c82e..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/DS_SELECT.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

The DS_SELECT function block type allows the selection of dedicated subsets of a given data table due to numbered input events.

It is a generic function block.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

The DS_SELECT function block type is a generic FBT and therefore takes an arbitrary number CNTX of subsets as input. Every subset consists of CNTY variables of arbitrary data type. By receiving one of the CNTX input events REQ the function block selects the according subset with the same index and copies its values to the output variables forming the output subset.

 

Furthermore the output events IND and CNF with the same index as REQ are raised.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml b/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml deleted file mode 100644 index 9f4e4b2f1..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/DS_SELECTX.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

The DS_SELECTX function block type allows the selection of dedicated subsets of a given data table due to numbered input events.

It is a generic function block.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

The DS_SELECTX function block type is a generic FBT and therefore takes an arbitrary number CNTX of subsets as input. Every subset consists of CNTY variables of arbitrary data type. By receiving one of the CNTX input events REQ the function block selects the according subset with the same index and copies its values to the output variables forming the output subset.

 

Furthermore the output events IND and CNF with the same index as REQ are raised.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml deleted file mode 100644 index 370cb5827..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EIB_CONTROL.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for EIB hardware access

-

-
-

This function block is internally used for EIB hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml deleted file mode 100644 index 370cb5827..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EIB_IN.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for EIB hardware access

-

-
-

This function block is internally used for EIB hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml deleted file mode 100644 index 370cb5827..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EIB_OUT.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for EIB hardware access

-

-
-

This function block is internally used for EIB hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_CAB.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEANIF_SERIAL.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml deleted file mode 100644 index 91f4be9ee..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_CAB.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - Firstname - Surname - - name@company.com - -

Thermokon STC RS485 EVC EnOcean Gateway on MIO, bi-directional

-

-
-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml deleted file mode 100644 index 901210e13..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IN.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - Hubert - Winkler - - hubert.winkler@nxtcontrol.com - -

EnOcean RX interface

-

-

-
-
-
 

'INIT' with

   QI=TRUE: connects to busmaster ENOCEAN_STCEVC_DEV 'InterfaceID'. Triggers 'INITO' with QO=TRUE, or QO=FALSE when the connection fails - Note: the master has to be INIT

first.

   QI=FALSE: deconnect from Master.

'SETID' with QI=TRUE changes SensorID and MatchBaseID on the fly, avoiding the full INIT overhead.

'IND' is triggered when the ENOCEAN_STC_EVC (gateway) receives a EnOcean telegram with a RecSensorID matching to SensorID. Match is equal, SensorID=0, or optionally with 'matchBaseID=TRUE' set comparing only the SensorID-basemask bits.

The received data is

'PkType' a BYTE EnOcean TYPE/ORG/RORG/CHOICE, with the defined values

   16#05 RPS, Enocean v2, rocker

   16#06 1BS, Enocean v2, contacts

   16#07 4BS, Enocean v2 actuators

The gateway firmware already maps PkType F6 to 05, D5 to 06 and A5 to 07.

'DataByte0..3' BYTE, the 1-Byte RPS and 1BS data is at DataByte3, the coding is defined in EnOcean Equipment Profiles, e.g. Heating valve actuator HVAC using EEP 07-20-01 (see A5-20-01).

'RecSensorID' the EnOCean sender ID of the received telegram 

'StatusByte'  the status-byte of the received telegram 

Note: EnOcean defines transmission order as 3,2,1,0. DataByte3 is transmitted first.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_IO.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml deleted file mode 100644 index a93604c5a..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_OUT.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - Hubert - Winkler - - hubert.winkler@nxtcontrol.com - -

EnOcean TX interface

-

-
-

- 'INIT' with

   QI=TRUE: connects to busmaster ENOCEAN_STCEVC_DEV 'InterfaceID'. Triggers 'INITO' with QO=TRUE, or QO=FALSE when the connection fails - Note: the master has to be INIT

first.

   QI=FALSE: deconnect from Master.

'REQ' sends a EnOcean telegram with

'PkType' a BYTE: EnOcean TYPE/ORG/RORG/CHOICE

  16#05 for a EnOcean RPS telegram - rocker

  16#06 for a EnOcean 1BS telegram - contacts

  16#07 for a EnOcean 4BS telegram - actuators, HVAC..

The EnOcean standard V2.1 defines additional telegram types, and an alternative numbering of PkType (often referred as ORG, RORG or CHOICE), which have equal data definition :

  16#F6 for RPS 

  16#D5 for 1BS  

  16#A5 for 4BS.

'DataByte0..3' BYTE, contains the 4 data bytes. The 1-Byte telegram types RPS and 1BS use DataByte3.

'StatusByte' is the received EnOcean-status byte, contains 4 status bits, and 2 bits transmission count, 2bit repeater count. Only RPS telegrams carry valuable information in the status bits, the counters should be 0.

The 32bit EnOcean-ID of the sent telegram is built from the Gateway_Enocean_ID + AepId [0..127]. Each gateway reserves a range of 128 unique EnOceanIds, the allocation and persistent storage is handled in the AEP_LIST Gateway function block ENOCEAN_STCEVC_DEV. A instantiated ENOCEAN_OUT gets its reserved number, a new one allocates the lowest free number.

Notification about successful transmission occurs in the ENOCEAN_STCEVC_DEV function block via 'IND' and STATUS="TX OK"

Notes:

 EnOcean defines transmission order as 3,2,1,0. DataByte3 is the first one. 1-Byte Packets (RPS,1BS) use only DataByte3.

 Gateway is the ENOCEAN_STCEVC_DEV function block with same 'InterfaceId'.

 The Gateway must be set to mode "send 3 times" to overcome the RX/TX collisions on the RS485 bus.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml deleted file mode 100644 index 4cd47d11e..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ENOCEAN_STCEVC_DEV.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

Interface to Thermokon STC65-RS485-EVC EnOcean-Serial-Gateway

support for send and receive of RPS/1BS/4BS telegrams

-

-

-
-

-

'INIT' with

 'QI'=TRUE initializes the bus InterfaceID with the serial interface parameters 'Com'.

 'QI'=FALSE closes the serial device.

triggers 'INITO' with

 'QO=TRUE : signals success, 'STATUS'="OK"

 'QO'=FALSE : signals failure with error message in 'STATUS'

Note: INIT of connected ENOCEAN_IN and ENOCEAN_OUT function blocks with same InterfaceID must be triggered after INIT, .

 

'REQ' with 'QI'=TRUE is used to send 'GatewayCommand' to the device when 'QI'=TRUE.

 notifications via 'IND' are made later upon TX-start, tX-timeout, TX-repetitions and OK-acknowledge.

'AEP_QUERY' with 'QI'=TRUE occurrence will refresh the 'AepList' 'AepList' and produce an 'AEP_IND' event.
AepList is a listing of all registered actuator end points in the form of <apath0>,<aid0>|<apath1>,<aid2>|<apathN>,<aidN>
<apath> is of type STRING and represents the path to the ENOCEAN_OUT FB ex. CAT1.CAT2.Composite1.Composite2.enOceanOut1
<aid> is of type UINT and represents the actuator adress ex. 123

'AEP_ADD' Occurrence will add an new actuator with 'AepPath' and 'AepId' to the 'AepList' and produce an 'AEP_IND' event
If the given AepId is already assigned to some other AepPath in the AepList the request fails with an error message

'AEP_DEL' will delete an actuator from the aepList and produce an AEP_IND event

'AepPath' with * as content will delete the whole list

'AepPath' with '' emtpy string as content will delete the entry that matches AepId 

'AepPath' with <some.path> as content (without braces) will delete the entry that matches AepPath, AepId will not be evaluated

Input Variables:

QI =TRUE enables the triggered action, QI=FALSE disables the action.

'InterfaceID' is a string defining the bus, and to describe the EnOcean gateway and all connected ENOCEAN_IN and ENOCEAN_OUT function blocks. e.g. "EnOcean1". Spaces are allowed.

'Com' is the serial device and parameters as used in SERIALIO. Default is "dev=COM1: baudrate=9600 bits=8 stopbits=1 parity=odd", in Linux/CUB use dev=/dev/ttyAPP0

'GatewayAddress' must match the DIP-switch setting 0..63 of the gateway [default 0].

'GatewayCommand' is used to send proprietary control commands to the gateway. It is a Hex-String with 2 characters per byte, the message is prepended with the necessary Sync bytes A5 5A, then the defined data is filled, afterwards padded with zeros, checksum calculation, GatewayAddress.

Some examples:

AB 58  : read the Gateway -Enocean Id

FF FF FF 00 FF  : set mode Gateway with 3x transmission

6B 05 0 0 0 0 12345678 0 :  prepend any regular enocean telegram with 6B

'AepPath' is used to identify an ENOCEAN_OUT function block in AEP_ADD and AEP_DEL. Besides the special setting "*" and "" (empty) id is the Function Block name. if AepList is "RES0.FB3,2|RES0.FB2,0", to address the 2nd entry enter "RES.FB2"  Note: the " are not part of the strings.

'AepId' is the sender id 0..127 used in AEP_ADD and optionally in AEP_DEL

 

Output Events

'INITO' is the response for 'INIT', errors

success with QO=TRUE, STATUS="OK" or "TX OK", or harmless information as "repeated", "1st/2nd/3rd TX#2", "TX#1/2 timeout", "

QO=FALSE, STATUS="TX#3 timeout", "chksum", "RX Error", "SYNC1 error", these indicate hardware problems.

 

'IND' : Events releated to RX and TX of EnOcean messages.

success with 'QO'=TRUE, 'STATUS'="OK" or "TX OK",

error with 'QO'=FALSE, 'STATUS'=error message

'Message' is the associated EnOcean message, received or transmitted.

Upon RX, "OK", "repeated", chksum fail

 

A normal receive sequence looks like

IND QO=TRUE STATUS="OK" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:20" : delivered to ENOCEAN_IN

IND QO=TRUE STATUS="repeated" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:24" : repetition, skipped

IND QO=TRUE STATUS="repeated" MESSAGE="GW:0 ORG:05 DB:00 00 00 00 ID:002A7362 st:28" : repetition 2, skipped, this strings stay visible during watch

 

Note: Transmission via ENOCEAN_OUT or 'REQ'-GatewayCommand fires 3 IND events in short time, Watching finally shows the latest result.

IND QO=TRUE STATUS="1st TX" MESSAGE="GW:0 ORG:58 DB:00 00 00 00 ID:00000000 st:00" : send a 'AB 58 ' GatewayCommand, the 'AB'  is not visible not shown here

IND QO=TRUE STATUS="OK" MESSAGE="GW:0 ORG:98 DB:FF ED 90 80 ID:00000000 st:00"  : received a GW-ID message from gateway with its ID as data

IND QO=TRUE STATUS="TX OK" MESSAGE="GW:0 ORG:58 DB:00 00 00 00 ID:00000000 st:00" :  this stays visible during watch

 

TX failure will end

 

'AEP_IND' : Response for each AEP_QUERY, AEP_ADD and AEP_DEL Input Event, fills current AepList,

 success with QO=TRUE, STATUS="OK"

 error with QO=FALSE, STATUS=error message : AepId already used|AepPath: no connected output found|GatewayAddress must be in range 0..63|AepId not used|AepPath not found

AepList is a ist of the entries , "<name0>,<id0>|<name1>,<id1>|...|<nameN>,<idN>". Ordered by internal hash value.

 

-

-

diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml deleted file mode 100644 index 05389995d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_COE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for ETHERCAT hardware access

-

-
-

This function block is internally used for ETHERCAT hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml deleted file mode 100644 index 05389995d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_FOE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for ETHERCAT hardware access

-

-
-

This function block is internally used for ETHERCAT hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml deleted file mode 100644 index 05389995d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SLAVE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for ETHERCAT hardware access

-

-
-

This function block is internally used for ETHERCAT hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml deleted file mode 100644 index 05389995d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ETHERCAT_SOE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for ETHERCAT hardware access

-

-
-

This function block is internally used for ETHERCAT hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml deleted file mode 100644 index 1cd7b347d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAIN.doc.xml +++ /dev/null @@ -1,21 +0,0 @@ - -
- - - - - - - - -

This function block is used for initialization sequences.

EVENTCHAIN belongs to EVENTCHAINHEAD. It implements a selectable number of chain links that belong to one EVENTCHAINHEAD and enables you to control the whole chronological order of this chain, because the priority of every EVENTCHAIN can be set (input 'PRIO').

All EVENTCHAIN-blocks belonging to one EVENTCHAINHEAD have to be named equally (at input 'NAME').

-

'NAME', 'PRIO' and 'INVERT' Do not change

-

-
-

- Temporal Behavior

'REGISTER'-Event input:

This input is used internally. It has to be left unconnected. It registers the funktionblock after starting the system.

 

'TRIGGER'-Event input:

This input has to be left unconnected, it is used internally when the 'TRIGGER'-eventinput of the EVENTCHAINHEAD is actuated. The 'TRIGGER'-Event of the first EVENTCHAIN-block gets its signal to start and fires its 'EO'-output. But the next EVENTCHAIN-block (with a lower priority) will be triggered not until the 'ACK'-event of the active EVENTCHAIN-block gets the signal that this part of the chain is ready.

 

'ACK'-Event input:

Acknowledge of this part of the chain is ready. The next EVENTCHAIN with lower priority is triggered after the delay time (if set).

 

'EO'-Event output:

This output is fired as a result of triggering the EVENTCHAIN. The signal triggers the REQ or INIT Event inputs of the corresponding functionblocks, then it is to be looped back to 'ACK'-Event input.

 

Functional Behavior

'TIMEOUT'-input:

Defines the maximum time to wait before an internal 'ACK'-signal is produced. Prevents the chain from unintended dead halt, if it never gets an 'ACK'-signal because of an unexpected fault. After the defined time the next EVENTCHAIN in row will be triggered anyway. (If 'TIMEOUT' value is t#0s it is disabled.) Datatype is TIME.

 

'DELAY'-input:

Defines the time to elapse between the incoming 'ACK'-signal and the 'TRIGGER'-signal for the start of the next EVENTCHAIN in row (respectively the 'TRIGGERNEXT'-event of the EVENTCHAINHEAD. Datatype is TIME.

 

'NAME'-input:

Datatype is STRING. The name of the chain is to be specified here. In all EVENTCHAIN functionblocks of this chain the same name has to be used.
The name can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'PRIO'-input:

This input is to set priorities. If it is not defined, the order of EVENTCHAIN-processing will be accidentally. Datatype is USINT.
This value can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'INVERT'-input:

Datatype is BOOL. If it is set TRUE, 0 is the lowest priority range, means the last to process.
If it is set FALSE, 0 has the highest priority range. If the functionblock has priority 0 it will process first.
Attention: All EVENTCHAINs belonging to one EVENTCHAINHEAD must have the same setting. If one of the EVENTCHAINs is set to TRUE while the EVENTCHAINHEAD and all the appropriate EVENTCHAINs are set to FALSE, this one EVENTCHAIN will not work, because this would be handled like it has another name than the EVENTCHAINHEAD.
'INVERT' can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml deleted file mode 100644 index 5e53b3484..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EVENTCHAINHEAD.doc.xml +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - - - - -

This function block is used for initialization sequences.

EVENTCHAINHEAD belongs to EVENTCHAIN. It implements the head of a selectable number of EVENTCHAIN-blocks that enables you to control the whole chronological order of this chain, because the priority of every EVENTCHAIN can be set (input 'PRIO').

All EVENTCHAIN-blocks belonging to one EVENTCHAINHEAD have to be named equally (at input 'NAME').

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Registers and sorts all EVENTCHAIN-blocks belonging to the same chain (same chain-name)

- Then 'INITO' is fired.

 

'TRIGGER'-Event input:

Starts the Eventchain funktionblocks of this chain. When 'TRIGGER' of the EVENTCHAINHEAD is actuated the 'TRIGGER'-Event at the first EVENTCHAIN-block gets its signal to start and fires its 'EO'-output. But the next EVENTCHAIN-block (with a lower priority) will be triggered not until the 'ACK'-event of the active EVENTCHAIN-block gets the signal that this part of the chain is ready.

 

'TRIGGERNEXT'-Event input:

Has to be left unconnected, because it is used internally and triggers the following EVENTCHAIN on its own, when the currently active EVENTCHAIN has finished.

 

'INITO'-Event output:

Is fired when the funktionblock is initialized. To start the chain immediately, connect this output with the 'TRIGGER'-Event input.

 

'FINISHED'-Event output:

Is fired when all EVENTCHAIN funktionblocks of this chain are finished.

 

'IND'-Event output:

This event indicates a change of state of 'RUNNING' and every 'INIT'-Event. It is fired directly after 'INIT' (while 'RUNNING' = FALSE) and after that, when 'RUNNING' changes. That means  after  a 'TRIGGER'-Event (TRUE) and after a fired 'FINISHED'-Event (FALSE).

 

Functional Behavior

'NAME'-input:

Datatype is STRING. The name of the chain is to be specified here. In all EVENTCHAIN functionblocks of this chain the same name has to be used. The name can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'INVERT'-input:

Datatype is BOOL. If it is set TRUE, 0 is the lowest priority range, means the last to process.
If it is set FALSE, 0 has the highest priority range. EVENTCHAIN functionblocks with priority 0 will process first.
Attention: All EVENTCHAINs belonging to one EVENTCHAINHEAD must have the same setting. If the EVENTCHAINHEAD is set to TRUE while all the appropriate EVENTCHAINs are set to FALSE, they all will not work, because this would be handled like they have another name than the EVENTCHAINHEAD.
'INVERT' can be set only once before the EVENTCHAINHEAD is initiated for the first time. Changings, that are made afterwards will not be recognized within the system.

 

'RUNNING'-output:

Datatype is BOOL. It shows the state of the chain. It is TRUE when the EVENTCHAINHEAD has started with starting its EVENTCHAIN FBs, and it turns to FALSE again after the last EVENTCHAIN is ready (means, the last EVENTCHAIN has got its 'ACK'-Event and the EVENTCHAINHEAD fires the 'FINISHED'-Event).
In case of no existing EVENTCHAIN FBs, or if 'NAME' of the EVENTCHAIN is not set correctly, this output state will never be TRUE.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml deleted file mode 100644 index 32d9ae375..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EVENTSCHEDULER.doc.xml +++ /dev/null @@ -1,50 +0,0 @@ - -
- - - - - - - - -

 

 

- - - - - - -
[caution]TITLE
-

This FB is obsolete and will be supported no longer.

-

Please use PRIOSCHEDULER instead.

This function block is used for time scheduler sequences.

This is a generic function block, the number of Channels can be defined from 1 to 64. The data type of all ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

If input 'QI' is TRUE the initialization of the block can happen

 'QO' is set to TRUE

 'INITO' is fired

If input 'QI' is FALSE the block will be deinitialized

 'QO' is set to FALSE

 'INITO' is fired

 

'SET'-Event input:

If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

 A 'SETO'-Event is fired

If 'QI' is FALSE no further action (FB deinitialized)

 

'INITO'-Event output:

is fired after each INIT

 

'SETO'-Event output:

is fired after a triggered SET, if the FB is initialized properly

 

'IND'-Event output:

is fired when defined point of time out of SCHEDULE occurs, in conjunction with that the respective CHANNEL containes the defined value.

After an INIT when the FB looks back in time for the last event to set, it will provide a value at one or more channels but in this case no IND-event is fired.

 

Functional Behavior

'QI'-input:

if TRUE, function block can be initialized.

If set FALSE the block will be deinitialized.

 

'FIRSTCHANNEL'-input:

Defines the channel number of CHANNEL1. CHANNEL1 is equal to FIRSTCHANNEL. CHANNEL2 gets the number of CHANNEL1 plus one.

If FIRSTCHANNEL=0 CHANNEL1=0

With this feature it is possible to use several EVENTSCHEDULER blocks with various channel definitions but only one list to provide 'SCHEDULE'.

 

'MAXINITTIME'-input:

Maximum time the FB looks back in time after INIT to trigger an event that has to happen. This is to fetch the event that has happened before the INIT event has arrived. Only the last event out of the list, that had happened before INIT and within the MAXINITTIME, will be considered. The FB will look no further back in time, even if MAXINITTIME is set to 24 hours or more.

 

'SCHEDULE'-input:

Use the cron format for the SCHEDULE string. If using a list of sequences, seperate them with a semicolon.

Format:

(min hr day mon wday year ch val; min hr...)

each value can be a single number or a list of numbers divided by a comma (min,min hr,hr,hr day mon wday year ch val,val; min hr...)

Possible values:

general: * means always, it is used if no specific value is set

min: [*] [0-59] hr: [*] [0-23] day: [*] [1-31] mon: [*] [1-12]

wday: [*] [0-7] 0 and 7 = sunday, 1 = monday, 2 = tuesday, etc.

year: [*] [####]

ch: [0 - 999999] this value has to be the result of the 'CHANNELn' output number of the FB + the defined value of 'FIRSTCHANNNEL'-input

val: [0 - 999999]

 

Examples:

- - - - - - - - - - - - - - - - - -
Scheduler example strings
StringDescription
0 * * * * * 0 1Sets on every hour, on minute 0 channel 0 to value 1
30 7 * * * * 1 50Sets every day on 07:30 channel 1 to value 50
0 17 1 1,2 * * 2 80Sets on first january and first february on 17:00 the channel 2 to value 80
15,45 * * * 1,3 * 3 0Sets on monday and wednesday every hour on minute 15 and 45 channel 3 to value 0

 

 

 

 

 

 

 

 

The definition of the point of time can only be the exact minute. Somewhere in this defined minute the event will happen.

 

'QO'-output:

shows status of the block

TRUE is ready

FALSE is deinitialized or error

 

'STATUS'-output:

Blank if no error

Shows error message when an error occures. (i.e.: Syntax error in schedule definition at position 21)

If a SET is triggered but the FB is deinitialized a specific error message will appear not until the FB is initialized properly.

 

'CHANNELn'-output:

Outputs value(s) defined at 'SCHEDULE'

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml deleted file mode 100644 index 4d9985ffb..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_CTU.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements an event-driven up-counter with a reset input which changes the state of output 'Q' when a predefined value has been reached.

-

-
-

- Temporal Behavior

Each 'CU'-Event counts up 'CV' by one and fires a 'CUO'-Event. If the 'PV'-input value is equal or greater than the 'CV' value output value 'Q' shows TRUE. For a restart, the counter needs a reset via the 'R'-Event input.

 

Timing diagram (example with PV=2):

 

'CU'-Event input:

- Increments the value of the 'CV'-output by one

- Captures the value of the 'PV'-input

- Fires the 'CUO'-Event

 

'R'-Event input:

- Sets 'CV'-output to the value zero

- Sets 'Q'-output to FALSE

- Fires the 'RO'-Event

 

Functional Behavior

The 'CV'-output value contains the number of triggered 'CU'-Events since startup resp. since the last 'R'-Event. The maximum value at 'PV' must be smaller than 65535.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml deleted file mode 100644 index 7fdd93970..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_CYCLE.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block provides a cyclic event generator with a configurable period which can be started and stopped.

For cyclic events which require a high-resolution timing or a phase parameter it is recommend to use the E_HRCYCLE function block.

-

-
-

- Temporal Behavior

'START'-event input: When a 'START'-Event is detected, the value of the 'DT'-input is captured and a cyclic timer starts. The 'EO'-Event is fired every time when the period, defined by 'DT', expires. Then the timer is restarted. It remains active until a 'STOP'-Event will be applied.

In the case when a timer is already active and a new 'START'-Event is applied then the event will be ignored.

'STOP'-event input: A 'STOP'-Event cancels a current active timer. It will be ignored when no timer is active.

 

Functional Behavior

The 'DT'-input value is interpreted as the IEC-TIME duration format.

If the 'DT'-input is set to zero then the minimum cycle time is internally set to a default value. Note: A very small value generates a high frequency of output events which will significantly increase the processor load.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml deleted file mode 100644 index 7fb0f84fb..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_DELAY.doc.xml +++ /dev/null @@ -1,24 +0,0 @@ - -
- - - - - - - - -

This function block passes an event to the output after a configurable delay. The delay generation can be started and stopped.

-
-

- Temporal Behavior

-

When a 'START'-Event is detected, the value of the 'DT'-input is captured and a delay-timer is started. When the timer expires then the 'EO'-Event is fired. The timer is NOT restarted. Only a new 'START'-Event activates the timer again with an ev. new 'DT'-input value.

-

In the case when a delay-timer is already active and a new 'START'-Event is applied then the event will be ignored.

-

The timer remains active until a 'STOP'-Event is detected. A 'STOP'-Event will be ignored when no timer is active.

-

 

-

Functional Behavior

-

The 'DT'-input value is interpreted as the IEC-TIME duration format.

-

If the 'DT'-input is set to zero then the 'START'-Event is immediately passed through to the 'EO'-Event output within a minimum internal delay.

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml deleted file mode 100644 index a542ce6e2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_DELAYR.doc.xml +++ /dev/null @@ -1,28 +0,0 @@ - -
- - - - - - - - -

This function block passes an event to the output after a configurable delay. The delay generation can be started/restarted and stopped.

-
-

- Temporal Behavior

-

When 'START' is triggered just one delayed Event at 'EO' will be actuated. The delay-time can be defined at input 'DT'.

-

If a 'RESTART' signal comes in, before the last started Event at 'EO' could be fired, the delay time for the Event starts new. A second 'START' signal that comes in before the 'EO' is fired will be ignored.

-

 

-

Temporal Behavior

-

When a 'START'-Event is detected, the value of the 'DT'-input is captured and a delay-timer is started. When the timer expires then the 'EO'-Event is fired. The timer is NOT restarted automatically. The timer may be restarted by a 'RESTART'-Event or by applying a new 'START'-Event. In both cases the 'DT'-input value will be captured and applied for the new delay time.

-

In the case when a delay-timer is already active and a new 'START'-Event is applied then the event will be ignored. But a 'RESTART'-Event cancels the current delay-timer and restarts it with the initial value captured at the 'DT'-input.

-

The timer remains active until a 'STOP'-Event is detected. A 'STOP'-Event will be ignored when no timer is active.

-

 

-

Functional Behavior

-

The 'DT'-input value is interpreted as the IEC-TIME duration format.

-

If the 'DT'-input is set to zero then the 'START'-Event is immediately passed through to the 'EO'-Event output within a minimum internal delay.

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml deleted file mode 100644 index 0db9b37da..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_DEMUX.doc.xml +++ /dev/null @@ -1,24 +0,0 @@ - -
- - - - - - - - -

This function block implements an event demultiplexer. An input event is passed to different selectable outputs.

-

-

-

-
-

- Temporal Behavior

'EI'-Event input: At every 'EI'-Event the 'K'-input value selects the 'EOn'-Event output line where the input event is passed.

'EO0'-, 'EO1'-, 'EO2'-, ...Event outputs: Depending on the value of the 'K'-input only one of this event outputs will pass the event through.

 

Timing diagram:

-

 

Functional Behavior

The 'K'-input value selects which 'EOn'-Event output is selected. The 'K' input value is limited to the maximum number of 'EO'-Event outputs. If the value exceeds the limit then no output event is fired.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml deleted file mode 100644 index 86c9dab16..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_D_FF.doc.xml +++ /dev/null @@ -1,21 +0,0 @@ - -
- - - - - - - - -

This function block implements a latch which captures the data input at the clock event and when the input data has been changed, the data output is updated and an output event is fired.

-

-
-

- Temporal Behavior -

At every 'CLK'-Event the 'D' input status is captured and compared with the value of 'Q' output. When they are not equal then 'Q' is set to 'D' and the 'EO'-Event is fired.

 

Timing diagram:

-

 

'CLK'-Event input:

- If the 'D'-input value is not equal with 'Q' then

    - 'Q'-output is set to 'D'

    - The 'EO'-Event is fired

- Else

    - 'Q' output is not changed

    - No 'EO'-Event is fired

 

Functional Behavior

The 'Q'-output value is only set to 'D'-input when special conditions are met.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml deleted file mode 100644 index 018da7bb4..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_F_TRIG.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a falling edge detection of the input which is synchronised to the input event.

-

-
-

- Temporal Behavior

Each 'EI'-Event performs a check of input 'QI', 'EO' will be fired once when a transition of 'QI' from TRUE to FALSE has been detected.

 

'EI'-Event input:

- The current status of the 'QI' input is compared with the one captured at the previous 'EI'-Event:

    - If the 'QI'-input status did not change OR had a transition from FALSE to TRUE then no 'EO'-Event is fired

    - If the 'QI'-input status had a transition from TRUE to FALSE then the 'EO'-Event is fired

- The current status of the 'QI'-input is captured

 

Functional Behavior

'QI'-input is captured at every 'EI'-Event.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml deleted file mode 100644 index ad0fd2d4e..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_HRCYCLE.doc.xml +++ /dev/null @@ -1,26 +0,0 @@ - -
- - - - - - - - -

This function block provides a high-resolution cyclic event generator with a configurable period and phase which can be started and stopped.

-
-

- Temporal Behavior

-

When a 'START'-Event is detected, the values of the 'PERIOD'- and 'PHASE'-inputs are captured and a cyclic timer is started. The 'EO'-Event is fired every time when the timeout calculated by ('PERIOD' + 'PHASE') microseconds expire. Then the timer is restarted. It remains active until a 'STOP'-Event will be applied.

-

In the case when a timer is already active and a new 'START'-Event is applied then the timer is restarted with the 'PERIOD' and 'PHASE' settings taken at the new event.

-

A 'STOP'-Event cancels a current active timer. It will be ignored when no timer is active.

-

 

-

Functional Behavior

-

The 'PERIOD'- and 'PHASE'-input values are interpreted as microseconds.  

-

If the 'PERIOD'-input is set to zero then the minimum cycle time is internally limited to a default minimum value. Note: A very small value generates a high frequency of output events which will significantly increase the processor load.

-

The 'PHASE'-input can also be set to a zero value. On the other hand, if the value is equal or greater than 'PERIOD' then 'PHASE' is internally truncated to zero.

-

 

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml deleted file mode 100644 index a24dec5ee..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_MERGE.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block passes incoming events of different inputs to one common event output.

-

-

-
-

- Temporal Behavior

Incoming events on 'EI1'-Event input or 'EI2'-Event input are immediately passed to the 'EO'-Event output.

 

Timing diagram:

-

-

Functional Behavior

The order of events at 'EI1'- and 'EI2'-Event input is not relevant. The sum of input events is equal to the number of output events.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml deleted file mode 100644 index 543dfadd8..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_N_TABLE.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block generates single events at each of the event outputs where the number of events and the interval between each event is configurable.

 

-

-

-

-
- -
Temporal Behavior

'START'-Event input: When a 'START'-Event arrives, the values of the 'N'-input and the 'DT'-input are read, then one output event at 'EO[0]' is produced after period TIME[0]. The next event is fired at EO[1] after TIME[1] period. And so on, until 'N' event outputs have been fired. 

Please note: If a new 'START'-Event arrives before the set of events has been fired entirely, the function block will start up again from the beginning. Events that have not been fired within the last period (because the time between the two 'Start'-Events was to short) will be discarded.

Please note: The maximum number of event outputs is implementation dependent.

'STOP'-Event input: The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

Then a subsequent 'START'-Event can trigger a new set of output events. 

 

Functional Behavior

'DT'-input: The 'DT'-input value is interpreted as an array of the IEC-TIME duration format, for example: "[t#1s,t#20ms,t#4s]". The maximum number of entries is equal to the number of Event outputs of the function block.

'N'-input: Defines the number of events to generate. If the value of the 'N'-input is larger than the number of Event outputs of the function block 'N' will be truncated, if it is smaller than the number of entries in the list of 'DT', only the first entries (as much as N) will work. The remaining entries are ignored.

Please note: 'N' must not be larger than the 'DT'-array is. The time for generating events that are not parameterized at 'DT' is not defined, but the events will be fired anyway.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml deleted file mode 100644 index 8efabce23..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_PERMIT.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block passes an incoming event to the output event when a condition is TRUE.

-

-
-

- Temporal Behavior

An event at 'EI'-Event input is passed to the 'EO'-Event output when the status of the 'PERMIT-input is TRUE. If 'PERMIT' is FALSE then the input event is purged.

 

Timing diagram:

 

Functional Behavior

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml deleted file mode 100644 index 3f133c094..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_REND.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block implements a rendezvous between two events.

It ensures that the output event will only be triggered after both input events have arrived and no reset event has occurred in the meantime.

-

-
-

- Temporal Behavior

'EO' is fired if there has an 'EI1'-Event and an 'EI2'-Event occurred.

'R': If 'R'-Event input is triggered before the second event has arrived, the FB starts from beginning.

 

Timing diagram:

-

 

 

'EI1'-Event input:

- If there is an 'EI2'-Event stored then

    - Clear the 'EI2'-Event

    - Fire the 'EO'-Event

- Else

    - Store the 'EI1'-Event internally 

 

'EI2'-Event input:

- If there is an 'EI1'-Event stored then

    - Clear the 'EI1'-Event

    - Fire the 'EO'-Event

- Else

    - Store the 'EI2'-Event internally 

 

'R'-Event input:

- Clear a stored 'EI1'-Event

- Clear a stored 'EI2'-Event

 

Functional Behavior

-

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml deleted file mode 100644 index cf55df688..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_RESTART.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block generates several events which indicate different resource start conditions or when the resource will be stopped.

-

-
-

- Temporal Behavior

'COLD'-Event: Generates one event after a coldstart (power-on boot) of the resource.

'WARM'-Event: Generates one event after a soft-reset (restart) of the resource.

'STOP'-Event: Generates one event before the resource is stopped.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml deleted file mode 100644 index 000d82aac..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_RS.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block implements an event-driven bistable Flip-Flop with a dominant Reset input. An output event is only generated when the output changes its state.

-

-

-
-

- Temporal Behavior -

The 'EO'-Event output is fired when the 'Q'-output changes its state. Multiple events on the same input, regardless of 'R' or 'Q' would not generate any ouput event(s) on 'EO'.

 

Timing diagram:

-

 

example:

1) Q is FALSE, event at input 'S', result: Q is TRUE, 'EO' fires an event

2) Event at input 'S', result: Q is TRUE (does not change its state), 'EO' fires no event

3) Event at input 'R', result: Q is FALSE, 'EO' fires an event

4) n-Events at input 'R', result: Q is FALSE (does not change its state), 'EO' fires no event

 

Functional Behavior

If an event at 'S'-Event input is detected then the 'Q'-output is set to TRUE. If an event at the 'R'-Event input is detected then 'Q'-output is set to FALSE.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml deleted file mode 100644 index a61481b15..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_R_TRIG.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a rising edge detection of the input which is synchronised to the input event.

-

-
-

- Temporal Behavior

Each 'EI'-Event performs a check of input 'QI', 'EO' will be fired once when a transition of 'QI' from FALSE to TRUE has been detected.

 

'EI'-Event input:

- The current status of the 'QI' input is compared with the one captured at the previous 'EI'-Event:

    - If the 'QI'-input status did not change OR had a transition from TRUE to FALSE then no 'EO'-Event is fired

    - If the 'QI'-input status had a transition from FALSE to TRUE then the 'EO'-Event is fired

- The current status of the 'QI'-input is captured

 

Functional Behavior

'QI'-input is captured at every 'EI'-Event.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml deleted file mode 100644 index 0f1717be6..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_SELECT.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block passes events of two selectable inputs to one common event output.

 

-

-
-

- Temporal Behavior

If the 'G'-input is FALSE then all events from 'EI0' are passed to the 'EO'-Event output else all events from 'EI1' are passed to the 'EO'-Event output.

E_SELECT timing diagram:

 

Timing diagram:

-

 

Functional Behavior

The status of the 'G'-input selects which event is passed to the output.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml deleted file mode 100644 index cae186af5..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_SPLIT.doc.xml +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - - - - -

This function block implements an event splitter. One input event generates two output events.

-

-

-
-

- Temporal Behavior

An event at the 'EI'-Event input generates two events while the first is passed to the 'EO1'-Event output and the second to the 'EO2'-Event output.

 

Timing diagram:

-

Because it is technically not possible that two events emerge completely simultaneously, they will emerge barely consecutively.


Functional Behavior

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml deleted file mode 100644 index 8398af3d1..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_SR.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block implements an event-driven bistable Flip-Flop with a dominant Set input. An output event is only generated when the output changes its state.

-

-

-
-

- Temporal Behavior -

The 'EO'-Event output is fired when the 'Q'-output changes its state. Multiple events on the same input, regardless of 'R' or 'Q' would not generate any ouput event(s) on 'EO'.

 

Timing diagram:

-

 

example:

1) Q is FALSE, event at input 'S', result: Q is TRUE, 'EO' fires an event

2) Event at input 'S', result: Q is TRUE (does not change its state), 'EO' fires no event

3) Event at input 'R', result: Q is FALSE, 'EO' fires an event

4) n-Events at input 'R', result: Q is FALSE (does not change its state), 'EO' fires no event


Functional Behavior

If an event at 'S'-Event input is detected then the 'Q'-output is set to TRUE. If an event at the 'R'-Event input is detected then 'Q'-output is set to FALSE.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml deleted file mode 100644 index 1376c1f03..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_SWITCH.doc.xml +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - - - - -

This function block passes events of one input to one of two selectable event outputs.

-

-

-
-

- Temporal Behavior

If the 'G'-input is FALSE then all events from 'EI' are passed to the 'EO0'-Event output, else all events are passed to the 'EO1'-Event output.

 

Timing diagram:

-

 

Functional Behavior

The status of the 'G'-input selects to which event output the incoming event is passed.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml deleted file mode 100644 index 8b1a9f906..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_TABLE.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block generates events whereby the number of events and the interval between each event is configurable.

 

-

-
-

- Temporal Behavior

The number of events is defined by the 'N'-input and the time interval between the output events is given by the time array set on 'DT'-input.

When a 'START'-Event is detected, the values of the 'N'-input and the 'DT'-input are read, then an output event at 'EO' is produced after a period TIME[0]. The 'CV'-output is set to '0' which is the current event index. The next event is produced after a period TIME[1]. 'CV' is set to '1'. And so on, until the number of events fired at 'EO' matches the value of 'N'. 

The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

Then a subsequent 'START'-Event can trigger a new set of output events. 

Please note: If a new 'START'-Event arrives before the set of events has been fired entirely, the function block will start up again from the beginning. Events that have not been fired within the last period (because the time between the two 'Start'-Events was to short) will be discarded.

 

Functional Behavior

'DT'-input: The 'DT'-input value is interpreted as an array of the IEC-TIME duration format, for example: "[t#5s,t#120ms,t#4s]". The maximum number of entries is emplementation dependent (standard is 16).

If the value of the 'N'-input is larger then the number of entries in the list of 'DT' then 'N' will be truncated.

'N'-input: Defines the number of events to generate. If the value of the 'N'-input is larger than the number of Events allowed (implementation dependent) 'N' will be truncated, if it is smaller than the number of entries in the list of 'DT', only the first entries (as much as N) will work. The remaining entries are ignored.

Please note: 'N' must not be larger than the 'DT'-array is. The time for generating events that are not parameterized at 'DT' is not defined, but the events will be fired anyway.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml deleted file mode 100644 index ed976d313..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/E_TRAIN.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block generates a train of events at one output. The number of events and the interval between the events is configurable. This act of generating events can be started and stopped.

-

-
-

- Temporal Behavior

The number of events is defined by the 'N'-input and the time interval between the output events is given by the 'DT'-input.

When a 'START'-Event is detected, the values of the 'N'-input and the 'DT'-input are read, then 'N' output events at 'EO' are generated with an interval defined by the 'DT'-input. The 'CV'-output is updated at every event with the event index which starts at the value '0'.

The event generation can be stopped by the 'STOP-Event input. A 'STOP'-Event is ignored when there was no 'START'-Event before.

A subsequent 'START'-Event can then trigger a new train of output events. 

 

Functional Behavior

'DT'-input: format is IEC-TIME duration, for example: "t#100ms".

'N'-input: defines the number of events to be created.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommDevice.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml b/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/EnoceanCommInterface.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml deleted file mode 100644 index c37c444a5..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/FB_DLL.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - StanislavFirstname - Meduna - - stanislav.meduna@nxtcontrol.com - -

The FB_DLL implements an interface between a FB and arbitrary functions residing in a dynamically loaded library.

It is a generic function block. The count of event ports and data ports can be defined.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

An instance of this FB dynamically loads a DLL with its implementation at INIT. The DLL is then informed of a new FB instance using it.

A request calls into the DLL, giving the instance and input parameters as arguments. The implementation in the DLL can choose between processing the request synchronously, asynchronously at some later time or wake and do something entirely on its own. In any case it calls back into the FB instance, setting the output data and firing output events.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml b/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml deleted file mode 100644 index 27c917962..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/FORCE_IND.doc.xml +++ /dev/null @@ -1,32 +0,0 @@ - -
- - - - - - - - -

The FORCE_IND function block type should be used in applications, especially hardware CATs, to inform the IEC 61499 runtime about any active force mechanism. This is necessary to warn users or operators before leaving some application with activated value forces, which might lead to unexpected behaviour.

-

-

-
-

- Temporal Behavior

-

'REQ'-Event input:

 The 'active' input variable is copied to the output 'forceActive'. Furthermore the IEC 61499 runtime evaluates the force state of all instances of the FORCE_IND function block in the resource to report a common application force state.

 A 'CNF'-Event is fired

 

-

-

-

-

-

- Functional Behavior -

'active'-input:

 set the force state of the FORCE_IND function block

 

-

-

'forceActive'-output:

 copy of the 'active' input variable

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml deleted file mode 100644 index 9b2832baf..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/HASH.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block calculates a hash value for all combined input strings.

This is a generic function block, the number of input strings INP can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'REQ'-Event input:

 The hash value for all given input string 'INP' is calculated according to selected algorithm 'ALGO' and written to output string 'OUT' using the selected format 'FORMAT'

 A 'CNF'-Event is fired

 

Functional Behavior

'ALGO'-input:

 defines the algorithm to be used to calculate the hash value for all combined input strings

 

'FORMAT'-input:

 defines the output format of the calculated hash value

 

'INPn'-input:

 input strings 1..n which to calculate the hash value from

 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml deleted file mode 100644 index ac38cd5b6..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/HMISERVER.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is interanlly used to support HMI functions.

-

-
-

This function block is interanlly used to support HMI functions.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml deleted file mode 100644 index 370cb5827..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/KNX_IN.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for EIB hardware access

-

-
-

This function block is internally used for EIB hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml deleted file mode 100644 index 370cb5827..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/KNX_OUT.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for EIB hardware access

-

-
-

This function block is internally used for EIB hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml deleted file mode 100644 index d20da5138..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/LOGGER.doc.xml +++ /dev/null @@ -1,25 +0,0 @@ - -
- - - - - - - - -

This function block provides a logging service which stores the input parameter(s) into a log-file. Different levels for each entry (DEBUG, INFO, WARNING and ERROR) can be selected.

Note: The logging level to be allowed for the device can be set in the properties individually for each device. The default setting is 'Info', that means only info, warning and error would be available, but no debug messages. This setting avoids an overstressing of smaller devices. In order to write debug messages to the log, open the device list, select the device and open Configuration → Debug → Log → Level. Set 'Level' to 'Debug' (or e.g. 'Warning' → no Info and no Debug messages would be available). After a change of the device configuration the new configuration has to be loaded to the device by a right-click on the device in the device list and a click on Deploy → Deploy Configuration. After that the device has to be rebootet. (See also in Studio help → 'Test and Troubleshooting' at item 'Log Files'.)

It is a generic block. The number of 'PARAM'-inputs can be chosen from 1 to 16. The data type of all ports is static.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Resets the internal settings

- Captures the 'QI'-input

- If 'QI' is FALSE then

    - The 'QO'-output is set to FALSE

    - 'STATUS'-output is set to "OK"

- Else

    - Captures the string at the 'MESSAGE'-input

    - Parses the string.

    - If an error is detected then

        - 'QO'-output is set to FALSE

        - 'STATUS'-output is set to an error message

    - Else

        - Applies the new settings

        - 'QO'-output is set to TRUE

        - 'STATUS'-output is set to "OK"

- The 'INITO'-Event is fired

 

'REQ'-Event input:

- If 'QO'-output is FALSE (which means that no successful initialization has been performed) then

    - 'STATUS'-output is set to "Not initialized"

    - Performs no processing of 'PARAMn'-inputs.

- Else

    - Captures the 'PARAMn'-inputs

    - Inserts the string of the 'PARAMn'-inputs into the 'MESSAGE' string

    - If the result exceeds the maximum length then

        - 'STATUS'-output is set to "Message too long"

    - Else

        - 'STATUS'-output is set to "OK"

    - Stores the result into the log-file

- The 'CNF'-Event output is fired

 

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

Functional Behavior

'QI'-input:

If the value is TRUE then an initialization is performed, else all existing settings are cleared (deinitialization).

 

'MESSAGE'-input:

Contains the string to be written to the log-file. The 'PARAM'-inputs are insert at the position(s) defined by the ${N} identifier. ${1} corresponds to 'PARAM1', ${2} to 'PARAM2' and so on. The maximum length of the string result ('MESSAGE' string including also the 'PARAMn' strings) must not exceed 255 characters.

 

'LEVEL'-input:

The following values are supported: '0': DEBUG, '1': INFO, '2': WARNING, '3': ERROR. If a value greater than '3' is applied, the 'STATUS'-output is set to "Invalid level".

 

'DEST'-input:

The following settings are available: Cyclic, Sporadic.

Cyclic (default) means, the message is written into the cyclic Log and therefore it will be written just once; if REQ is triggered several times, only the time of last occurrence and the quantity of occurrences will be noted.

Sporadic means the message is written in the usual Log, where every occurrence is logged as an extra message.

 

'PARAM1' ... 'PARAM16'-inputs:

Input string(s) which is(are) inserted into the message string according their position defined in the 'MESSAGE' string at the 'INIT'-Event.

 

'QO'-output:

Shows the initialization status. TRUE is initialized, FALSE is not initialized.

 

'STATUS'-output:

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, the output is set to "OK". If an error has occurred then it contains the specific error message.

 

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml deleted file mode 100644 index f979ab7ad..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVCTRL.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for MBUS hardware access

-

-
-

This function block is internally used for MBUS hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml deleted file mode 100644 index f979ab7ad..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/MBUSDEVICE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for MBUS hardware access

-

-
-

This function block is internally used for MBUS hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml deleted file mode 100644 index c7b9e8f55..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/MIBGET.doc.xml +++ /dev/null @@ -1,41 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for diagnostic information. (MIB: Management Information Base)

It serves to get information by SNMP (Single Network Management Protocol) from the PLC's.

-

This is a generic function block, the number of information-'PATH's can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

 -If input 'QI' is TRUE the initialization of the block can happen

  'QO' is set to TRUE

  'INITO' is fired

 -If input 'QI' is FALSE the block will be deinitialized

  'QO' is set to FALSE

  'INITO' is fired

 

'REQ'-Event input:

 -If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

   A 'CNF'-Event is fired

 -If 'QI' is FALSE only a 'CNF'-Event is fired, no further action

 

 

-

-

Functional Behavior

'QI'-input:

 -If TRUE, function block can be initialized.

 -If set FALSE the block will be deinitialized.

 

'PATHn'-input:

 defines the path from which the information has to be get. (i.e. Device.Name or System.CurrentTime etc.)

 

'INDEXn'-input:

 Default value is 0, this works with all information except tables. Use data type STRING with no entry to have the whole information provided at output VALUEn in a comma separated form. To read some specific part of information out of an array, 'INDEXn' has to be set as required. When using data type UDINT and value 0 at INDEXn the output VALUEn provides the whole information in a comma separated form with data type STRING at VALUEn. (see example below)

 Whether to use data type UDINT or STRING for the INDEXn-input for the specific case has to be taken out of the description of the specific value (i.e. network interfaces are indicated with UDINT, Resources with STRING - i.e. RES1 → see the link to the list of all supported SNMP OIDs below).

 

-

'QO'-output:

 Shows status of the block (TRUE is ready, FALSE is deinitialized)

 

'STATUSn'-output:

 Provides status information, such as OK or specific error messages (i.e. 'not initialized' if 'QI' is FALSE and 'REQ' is fired, 'No MIB entry' if no or a wrong 'PATH' is used, or 'No instance' if a wrong 'INDEXn' is used). When 'QI' is FALSE and 'INIT' was triggered, 'STATUSn' shows OK to state that the deinitializing has been done properly.

 

'VALUEn'-output:

-

 Provides the requested information.

When using data type STRING at output VALUEn and the respective input INDEXn is empty (input data type STRING) or 0 (input data type UDINT) the whole information is shown in a comma separated form. In some cases some other data types are valid too (e.g. for INDEX Project.ApplicationForcesActive : DINT). See the link for the list of all supported SNMP OIDs below.

When using data type DINT at output VALUEn and the respective input INDEXn is STRING (use this form for the STRING: <Source_Resource>.<Destination_Device>.<Destination_Resource> (e.g. RES0.DEV1.RES1)) VALUEn outputs the value for the specified channel. (There is an example for this case below at Example for the usage of data type DINT at output VALUEn.)

 

-

 

 

- - - - - - -
[tip]List of all supported SNMP OIDs
-

Click here to view a list of all available OIDs: List

-

Please note: INDEX Network.Peers.* require the use of runtime version r16836 (or higher) on all devices.

-

 

Some additional information about the INDEX 'Network.Peers.*':

Basically, the communication of the MIBGET works unidirectionally. The diversification of the function block with the index Network.Peers.*  was implemented to check also the reachability of another runtime.

The index Network.Peers.RemoteResource provides the information which resources basically should have a communication to the resource the MIBGET FB belongs to. It doesn't check whether the communication works, but only whether there is a connection implemented in the project.

The index Network.Peers.Up, on the other hand, shows whether the communication currently works (down = 0 or up = 1).

Example for a MIBGET, shown with watch points:

 

Example for the usage of data type DINT at output VALUEn:

This example refers to the usage of Network.Peers.Up at input INDEXn.

Procedure for correct usage:

- Open the Generic Interface Editor via context menu, after a right-click on the small icon in the bottom right corner of the FB, and set the respective input INDEXn to data type STRING.

- Set the respective output VALUEn to data type DINT.

- Add a constant at INDEXn that defines the communication peer to be checked (in this example the communication from resource RES0 to RES1 of DEV1 → RES0.DEV1.RES1).

- The respective output VALUEn provides the value of the required information.

-

 

 

Status and value information is updated after each triggered REQ event. A wrong definition at input INDEXn would lead to an error message (No instance) at output STATUSn:

-

 

 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml deleted file mode 100644 index d5572b50f..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/MODBUSIO.doc.xml +++ /dev/null @@ -1,35 +0,0 @@ - -
- - - - - - - - -

This function block implements internally a Modbus server.

The function block is internally used for MODBUS direct IO access, it provides data for the clients.

-

This is a generic function block, the number of Channels can be defined from 1 to 64, independently for the input (data to be written to the MODBUS process image) and the output side (data to be read from the MODBUS process image).

Input 'SD' and output 'RD' data type can be selected independently. Input 'default' data type depends on output 'RD'.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Captures the 'QI'-input

- If 'QI' is FALSE then

  - The FB will be deinitialized

  - The 'QO'-output is set to TRUE, when deinitializing was successful

  - 'STATUS'-output is blank, when deinitializing was successful

  - The 'INITO'-Event is fired

- If 'QI' is TRUE then

  - The FB is initialized

  - The 'QO'-output is set to TRUE, when initializing was successful

  - 'STATUS'-output is blank, when initializing was successful

  - Applies the new settings

  - The 'INITO'-Event is fired

- If an error is detected while initializing or deinitializing then

  - 'QO'-output is set to FALSE

  - 'STATUS'-output is set to an error message

  - The 'INITO'-Event is fired

 

'LOAD_RETAIN'-Event input:

  - This event causes the FB to load the values from persistent memory, respectively, if they do not exist, the default values from 'default1-n', to make them available for a 'REQ'.

  - Should follow after 'INIT' to fetch initial data to work with.

 

-

'REQ'-Event input:

- If 'QI'-input is TRUE and 'INIT' has worked properly:

  - A triggered 'REQ' performs the sending of data from input 'SD' to client.

  - default values are not read by a 'REQ', only by a 'LOAD_RETAIN' event.

  - The 'CNF'-Event output is fired.

- If 'QI'-input is FALSE and the FB is deinitialized:

  - 'QO' is TRUE

  - 'STATUS'-output shows an error message not until an anew triggered 'INIT' (i.e.: Not initialized: REQ not allowed).

  - No data will be sent

  - The 'CNF'-Event is fired

-

 

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

-

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired to signalize that data has arrived and is contained at output RD1-n. Any error will be indicated at QO and STATUS.

 

'INDCHG'-Event Output:

This event is fired to signalize that at least one value at output RD1-n has changed with the last arriving data.

 

-

Functional Behavior

'QI'-input:

If the value is TRUE an initialization is performed, else all existing settings are cleared (deinitialization).

 

-

'SDn'-input:

Contains the data ready to be written to Client. Each REQ performs the transfer of this data to the client.

 

'default'-input:

A 'LOAD_RETAIN' event causes the FB to use this default values, if no data from persistent memory is available (after "Delete Persistent Data" or the very first start of the solution).

 

-

-

'QO'-output:

Shows the success of initialization or deinitialization. TRUE is successfully initialized or deinitialized, FALSE shows that an error with 'INIT' has occured.

 

-

'STATUS'-output:

It contains the specific error message if an error has occurred. If a 'REQ' is triggered but the FB is deinitialized, the error message 'Not initialized: REQ not allowed' appears after a new 'INIT' event.

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, there is no message.

 

-

-

'RDn'-output:

Containes the data that has arrived from client ready to be used. An 'IND'-Event will be fired each time when new data is available at this output.

An 'INDCHG' is fired only if at least one value has changed.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml deleted file mode 100644 index 7fb466640..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/MUL.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a mathematical multiply operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Multiplies the value of all inputs 'IN1' ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type. 

'OUT' := 'IN1' * 'IN2' * ... * 'INn'

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml deleted file mode 100644 index 6afb7a19b..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/NETIO.doc.xml +++ /dev/null @@ -1,59 +0,0 @@ - -
- - - - - - - - -

This function block is used to access a TCP or UDP connection

-

-

-

-

-

-

It is equipped with a 16k buffer to cache data (i.e. if the receiving client is not as fast as the sender). If data cannot be received fast enough, so that the buffer gets overcharged, some parts of the datastream will get lost. There is no warning if that happens, but the discarding of received datablocks is minuted in the cyclic log.

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Captures the QI-input

 - If QI is TRUE: Performs the initialization and applies the PORT and START- and ENDCHARACTER settings. If the TCPIO-Server-functionblock is already running, it will be stopped first. Default communication is TCP, to use UDP the prefix UDP has to be set at input PORT (see below).

    -
  • TCP - only one client can be active at a time, if a second client signs in, the connection to the first client will be closed before the second one can communicate.
  • -

The success of the operation is shown: 'QO' is set TRUE, 'STATUS' is blank, 'INITO' is fired.

 - If QI is FALSE: Performs the deinitialization of the server functionblock. A potentially opened connection will be closed and a sign-in of a client is no longer possible. 'QO' is set TRUE, when the deinitialization has worked properly, and 'STATUS' is blank.

 - If initialization or deinitialization has not worked properly 'QO' is set to FALSE and STATUS will show an error message.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic which means that data at input DATAOUT will be transferred to client and a 'CNF'-Event is fired when the operation was successful.

    -
  • TCP - a client must have signed in, otherwise this event does not work
  • -
  • UDP - basically, data will be sent to the client from which the last package has been received, if there was no receiving at all, this event does not work; if it is necessary to send packages to a specific address use the parameter DestIP:DestPort, as described below at item 'PORT'
  • -

General: address of the client to be sent to is contained at output PEERADDR. The success of the operation is shown at CNF, QO and STATUS.

 

'ACK'-Event input:

This event has to be triggered to signalize the end of processing data from an 'IND'-Event. If some further data is available the function block will place it at 'DATAIN' and then fire an 'IND'-Event.

A triggered 'ACK' with no available data causes the event to remain active and work with the next data.

As soon as data is available at 'DATAIN'-output an IND-Event is fired to signalize it and this action is finished. If some further data is present, it will be provided at DATAIN and a new IND-Event is fired. This process will be repeated until no further data is available.

 

'INITO'-Event output:

This event is fired when an 'INIT'-Event has happened (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired when data has arrived from a client. The data is contained at output DATAIN, the address from the client at PEERADR and any error will be indicated at QO and STATUS.

-
-

'ERRIND'-Event output:

This event is fired when an error is indicated. The error reason can be read at data output 'STATUS'.

 

- Functional Behavior

'QI'-data input:

Input Event Qualifier TRUE: initialize will work with an INIT-Event. FALSE: an INIT-Event will deinitialize the functionblock.

 

'ENDPOINT'-data input:

This parameter sets the communication port  for the server functionblock to wait for the clients, or for the client to address the server. The portnumber must be in a range from 1 to 65535, depending on operating system (in some case 1024-65535).

To use TCP set the prefix "TCP:" (or no prefix would use also TCP), to use UDP set the prefix "UDP:" and then the portnumber (i.e.: UDP:1024).

If there is given only a portnumber (and optionally an IP address first) the FB will work in server mode.

If there are given [IP address]:portnumber, semicolon, then IP address:port the FB will work in client mode.

Optionally a local IP and Port can be set. If these parameters are set the FB will operate in client mode, that means the packages (triggered by REQ) will be sent to the given IP/Port address. Receiving Messages will be restricted to the given IP and the Source Port.

- Syntax: PORT = [UDP:|TCP:][[dotAddr:]portNo][;dotAddr:portNo]

that means in detail: 

for server: [TCP:|UDP:]<localPort>    / in this case the local port can be given as: [<dottedIP>:]<portNumber>  /where port number is the port the FB is listening on and the IP address can be specified to bind the port to a specific interface card indicating that only messages from that interface are accepted (default is any interface).

-
-for client: [TCP:|UDP:][<localPort>];<remotePort>    / In case of a client FB (same syntax as for servers), the local port is optional, indicating that the system may choose any available port number for communication. If specified, the FB will use the given port and optionally the given interface for communication. The remote port has to be given as: <dottedIP>:<portNumber>

- Examples:

    -
  • PORT = 10001   /   FB operates in TCP server mode, it waits for connection on Port 10001,
  • -
  • PORT = ;127.0.0.1:12345  /  TCP client mode, use various local port, connect with server FB on IP address 127.0.0.1 port 12345 (this could only be used internally) - (the server FB should have here PORT = 127.0.0.1:12345)
  • -
  • PORT = 4711;127.0.0.1:12345  /  TCP client mode, use local port 4711, connect with server FB on IP address 127.0.0.1 port 12345
  • -
  • PORT = UDP:10001   /   FB operates in UDP Server Mode, that means it listens for incoming packages on Port 10001 and sends packages to the source port of the last received UDP message. But in this case a message must have been received first before the FB can send a message.
  • -
  • PORT = UDP:10001;10.0.0.1:9001   /   FB operates in UDP Client Mode, that means it listens for incoming packages on Port 10001 from IP 10.0.0.1 - packages from other IPs/ports are dropped, sending will adress packages to 10.0.0.1:9001 (With the use of DestPort 10001, in our example, this mode would allow the sending of UDP messages without having received a package before)
  • -
  • PORT = TCP:10.0.0.1:10001;10.0.0.1:9001  /  FB operates in TCP Client Mode, it listens for incoming packages on 10.0.0.1 port 10001 - packages from other IPs/ports are dropped, sending will address packages to 10.0.0.1:90001
  • -

-

-

-

 

'STARTCHAR', 'ENDCHAR'-data input:

This parameters are optional. They can be used for structuring a data stream (like TCP) into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and then the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

A line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, can be made by setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>), because the functionblock only permits a single marker byte. This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be an <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'SD'-data input:

Containes data that will be transferred to the client when REQ-Event happens.

-
-

'SD_LEN'-data input:

Contains the number of data bytes to be sent at data input 'SD' with 'REQ'-event.

-
-

'QO'-data output:

Shows the initialization status.

TRUE means initializing or deinitializing has worked properly

FALSE means initializing or deinitializing did not work properly, an error has occurred. Error message is set at 'STATUS'.

 

'STATUS'-data output:

When an input event ('INIT', 'REQ' or 'ACK') has been successfully processed, the output is blank. Only if an error has occurred it contains the specific error message.

 

'PEERADDR'-data output:

Containes the address of the client receiving data or which has last sent some.

 

'RD'-data output:

Containes the data received from a client and now ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

-
-

'RD_LEN'-data output:

Contains the number of data bytes which are read at data output 'RD' with 'IND'-event.

-

-

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml deleted file mode 100644 index 983d576a4..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/NOT.doc.xml +++ /dev/null @@ -1,32 +0,0 @@ - -
- - - - - - - - -

This function block implements a logical NOT.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: Not is a logical operator, which turns the value of the input 'IN1' ... 'INn' into its opposite and leads the result to the related output 'OUT1' ... 'OUTn'. There is in each case only one input and one output connected together. It leads to output TRUE if the input is FALSE, or to FALSE if the input is TRUE.

 

-

- - - - - - - - - - - -
Logic table
InOut
01
10

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. The input is bitwise inverted and the result is stored into the corresponding output. Within a FB different input types may be defined. But an input and its corresponding output have always the same type.

 

For example:

BYTE:  'IN1': 16#F7 (11110111)  'OUT1': 16#08 (00001000)

WORD: 'IN2': 16#F0AF (1111000010101111)  'OUT2': 16#0F50 (0000111101010000)

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml b/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml deleted file mode 100644 index f8fe1ce67..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/NUMBER2TIME.doc.xml +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - - - - -

This function block converts an input value into the time format using a scale-factor.

-
-

- Temporal Behavior

-

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

-

 

-

Functional Behavior

-

Multiplies the value from 'IN'-input with the 'FACTOR'-input and converts the result into the time format which is passed to the 'OUT'-output. When 'FACTOR'-input is not set then a value of 1 is used.

-

 

- diff --git a/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml deleted file mode 100644 index d54db8902..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/OPCUASERVER.doc.xml +++ /dev/null @@ -1,30 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for OPC UA access.

It represents the server for the OPC UA connection.

- Attention: The OPCUASERVER functionality has to be enabled within the configuration, because it is disabled per default to save memory when OPCUASERVER is not in use. There is a 'main switch' to enable the functionality of OPCUASERVER. If OPCUASERVER is used in a project but disabled, a log message will be written.

- Procedure to enable OPCUASERVER: Open the device list and select the relevant device. Now set the following nodes within the properties of the device in the right part of the list to OVERWRITE and open them: Configuration → FB → OPCUASERVER. Then set Enable to True. (More information can be found in studio help: main menu Help → Help at item Device List (click in the device list on an empty row, to be sure nothing is selected, and press F1 / or if you want to open the page manually: Solution→Distributed PAC Project→Editors→System Editor→Device List))

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

 -If input 'QI' is TRUE the initialization of the block can happen

  'QO' is set to TRUE

  'INITO' is fired

 -If input 'QI' is FALSE the block will be deinitialized

  'QO' is set to FALSE

  'INITO' is fired

 

'COMM'-Event Input:

 -Internally used, leave unconnected

 

'INITO'-Event Output:

 -is fired after each triggered 'INIT'

 

- Functional Behavior -

'QI'-input:

 -If TRUE, function block can be initialized.

 -If set FALSE the block will be deinitialized.

 

'MGR_ID'-input:

 -The OPC UA-port and IP address, default: 0.0.0.0:4840, adapt it if necessary

 

'SRVCERT'-input:

-Communication between UA-server (this function block) and UA-client can be secured optionally by the use of certificates. A certificate for the OPC UA connection can be specified here. The default setting is uaserver.der. Until now only this certificate is provided. The certificate key has to be copied to the same path of the CF-card where the boot project is stored. (linux: ./var/lib/nxtRT61499F/boot or RT Target: ./boot)

-If this constant has not been set or the file of the specified certificate is not readable, the built-in nxtControl certificate will be used when the OPC UA client connects and a warning like this will be generated in the log:

Cannot open certificate file: C:\Users\nxtUser.NXTCONTROL\AppData\Local\nxtControl\nxtONE-2.0\nxtRT61499F\boot\uaserver.der, using builtin one

 

 

'QO'-output:

-Shows True if initialized and communication works

-Sows False if deinitialized or an error has occurred

 

'STATUS'-output:

-Shows status information (OK,TERMINATED, etc.)

 

-

-

-

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml deleted file mode 100644 index 629cd9607..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/OR.doc.xml +++ /dev/null @@ -1,77 +0,0 @@ - -
- - - - - - - - -

This function block implements a logical OR.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL: OR leads to output 'OUT' TRUE (1) if one or all of the enabled inputs 'IN1' ... 'INn' are TRUE. Only if all inputs are FALSE (0), 'OUT' is FALSE.

 

-

- - - - - - - - - - - - - - - - - - - - - - -
-

Logic table

In2In1Out
000
101
011
111

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise logical OR of the INPUTs. The result is stored into OUT.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

examples for logic table

in2in1out
000000000000
000000010001
001000000010
000100010001
001100010011
111010011111

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml deleted file mode 100644 index 3ad0094bb..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_IN.doc.xml +++ /dev/null @@ -1,20 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access

PD_ANY_IN implements a function block that reads data out of the associated fieldbus process memory.

It is a generic block. The number of inputs (RD1...RD16) can be chosen from 1 to 16. Datatype BOOL, BYTE, WORD, DWORD and REAL can be selected independently for each input.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'INIT' has to be triggered after every alteration of InitSize or MaxSize and leads to an 'INITO'-Event.

An incoming 'REQ'-event causes the block to read from fieldbus and leads to an 'CNF'-event, but an 'IND'-event is fired anyway after each bus-cycle or bit value change depending on what definition at 'IND_ON_CHG' and 'IND_FACTOR' has been set. For that reason the 'IND'-port may be sufficient in many cases and the 'REQ'- and 'CNF'-port can be left unconnected.

 

Functional Behavior

'QI': has to be TRUE so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

'QO': shows status of the block (TRUE is ready, FALSE is error or deinitialized).

'BUS_ID': has to be connected with the incoming KBUS -busId- (or the like), to identify the bus the current device is attached to.

'SLOT_NO': has to be connected with the KBUS -nextSlotNo- or the like, to get the definition which device values are read from.

'OFFSET': defines the bit offset of the accessor within the device.

 

'PD_USES_MSBF':

- if this port is set TRUE, process data will be encoded as most significant byte first.

- if this port is set FALSE, process data will be encoded as least significant byte first.

 

'IND_ON_CHG':

- when set TRUE, 'IND' will be fired only if bit value has changed,

- when set FALSE, 'IND' is fired on every IND_FACTOR buscycle.

 

'IND_FACTOR': value 1...n, defines the factor for the buscycle to fire 'IND'.

'IND_OFFSET': value 1...n, defines the starting value of 'IND'-count; default is based on SLOT_NO.

'STATUS': shows the current accessor status.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml deleted file mode 100644 index 2b172a077..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PD_ANY_OUT.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access

PD_ANY_OUT implements a function block that writes data into the associated fieldbus process memory.

It is a generic block. The number of outputs (WR1...WR16) can be chosen from 1 to 16. Datatype BOOL, BYTE, WORD, DWORD and REAL can be selected independently for each output.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

- Temporal Behavior

'INIT' has to be triggered after every alteration of InitSize or MaxSize and leads to an 'INITO'-Event.

An incoming 'REQ'-event causes the block to write to fieldbus and leads to an 'CNF'-event.

-

 

Functional Behavior

'QI': has to be TRUE so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

'QO': shows status of the block (TRUE is ready, FALSE is error or deinitialized).

'BUS_ID': has to be connected with the incoming KBUS -busId- (or the like), to identify the bus the current device is attached to.

'SLOT_NO': has to be connected with the incoming KBUS -nextSlotNo- (or the like), to get the definition which device values are written to.

'OFFSET': defines the bit offset of the accessor within the device.

'PD_USES_MSBF': if this port is set true, process data will be encoded as most significant byte first.

'STATUS': shows the current accessor status.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml deleted file mode 100644 index 15b67ae71..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_IN.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access

-

-
-

This function block is internally used for hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml deleted file mode 100644 index 15b67ae71..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PD_DIRECT_OUT.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for hardware access

-

-
-

This function block is internally used for hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml deleted file mode 100644 index e70c0c1ed..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE.doc.xml +++ /dev/null @@ -1,25 +0,0 @@ - -
- - - - - - - - -

This function block is internally used to store data over reboots

-

It is a generic block. The number of inputs can be chosen from 1 to 32. The number of outputs and default-inputs increase equally.

The type for each input has to be defined, default and output type will change automatically.

-

Be careful to use this function block considering the write cycles of the CF card.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Captures the 'QI'-input

- Fires the 'INITO'-Event

- If 'QI' is FALSE then

  - The 'QO'-output is set to FALSE

  - Any READ or WRITE input event will cause no effect, means nothing will be written or read and also the 'READCNF' and 'WRITECNF' will not be fired

 

- If 'QI' is TRUE then

  - The 'QO'-output is set to TRUE

  - READ or WRITE input Event executes the internal logic 

 

 

'READ'-Event input:

 - Causes the reading of stored data (from data file on disk)

 - 'output(s)' is (are) set

 - Fires 'READCNF'-output Event

   - If no 'WRITE'-Event has happened before

     - the default values are stored in a data file on disk

     - 'defaultsUsed' is set TRUE

   - Else

     - stored data from data file on disk is read

     - 'defaultsUsed is set FALSE

 

'WRITE'-Event input:

- performs writing data from input(s) to disk

- 'output(s)' are set

- 'defaultsUsed' is set FALSE

- fires 'WRITECNF'-output Event

 

'INITO'-Event output:

 - is fired after every triggered 'INIT'-Event, no matter if the FB is initialized or not

 

'READCNF'-Event output:

 - is fired after every successfully executed 'READ'-Event

 

'WRITECNF'-Event output:

 - is fired after every successfully executed 'WRITE'-Event

 

Functional Behavior

 'QI'-input:

- If the value is TRUE a triggered 'INIT' performs an initialization, the FB will be ready to work

- If the value is FALSE a triggered 'INIT' performs a deinitialization, the FB will not react to a READ or WRITE Event

 

'input(n)':

- This data will be written to data file when 'WRITE'-Event is triggered

 

'default(n)'-input:

- This data will be used if no other data is available on disk for this FB (by the very first READ when no WRITE has happened and therefor no persistent data exist)

 

'QO'-output:

- Shows the initialization status. TRUE is initialized, FALSE is not initialized.

 

'STATUS'-output:

- Containes the specific error message, if an error occurs

 

'defaultsUsed'-output:

- TRUE when defaults are used

- FALSE when stored data from disk is used

 

'output':

- Contains defaults or stored data from disk

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml deleted file mode 100644 index 36bb3e339..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PERSISTENCE_FRAM.doc.xml +++ /dev/null @@ -1,37 +0,0 @@ - -
- - - - - - - - -

This function block is used to store data over reboots on fast FRAM.

It is a generic block. The number of inputs can be chosen from 1 to 32. The number of outputs and default-inputs increase equally.

The type for each input has to be defined, the type of default and output will change automatically.

The functionality is the same as with the persistence FB, but it can be used only if the platform is equipped with a FRAM medium, that can be written any number of times (no Write-Cycle limit).

Note: On a soft-PLC a PERSISTENCE will be mapped additionally to a PERSISTENCE_FRAM, when an existing project is deployed.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Performs the initialization

- Captures the 'QI'-input

- Fires the 'INITO'-Event

- If 'QI' is FALSE then

  - The 'QO'-output is set to FALSE

  - Any READ or WRITE input event will cause no effect, means nothing will be written or read and also the 'READCNF' and 'WRITECNF' will not be fired

-

- If 'QI' is TRUE then

  - The 'QO'-output is set to TRUE

  - READ or WRITE input Event executes the internal logic

 

-

-

'READ'-Event input:

- Causes the reading of stored data (from data file on FRAM memory)

- 'output(s)' is (are) set

- Fires 'READCNF'-output Event

 - If no 'WRITE'-Event has happened before

   - the default values are stored in a data file on FRAM memory

   - 'defaultsUsed' is set TRUE

 - Else

   - stored data from data file on FRAM memory is read

   - 'defaultsUsed is set FALSE

 

-

'WRITE'-Event input:

- performs writing data from input(s) to FRAM memory

- 'output(s)' are set

- 'defaultsUsed' is set FALSE

- fires 'WRITECNF'-output Event

 

-

'INITO'-Event output:

- is fired after every triggered 'INIT'-Event, no matter if the FB is initialized or not

 

-

'READCNF'-Event output:

- is fired after every successfully executed 'READ'-Event

 

-

'WRITECNF'-Event output:

- is fired after every successfully executed 'WRITE'-Event

 

-

Functional Behavior

'QI'-input:

- If the value is TRUE a triggered 'INIT' performs an initialization, the FB will be ready to work

- If the value is FALSE a triggered 'INIT' performs a deinitialization, the FB will not react to a READ or WRITE Event

-

 

'input(n)':

- This data will be written to data file when 'WRITE'-Event is triggered

-

 

'default(n)'-input:

- This data will be used if no other data for this FB is available on FRAM memory (by the very first READ when no WRITE has happened)

-

 

'QO'-output:

- Shows the initialization status. TRUE is initialized, FALSE is not initialized.

-

 

'STATUS'-output:

- Containes the specific error message, if an error has occurred

-

 

'defaultsUsed'-output:

- TRUE when default data is used

- FALSE when stored data from FRAM memory is used

-

 

'output':

- Contains defaults or stored data from FRAM memory

-

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml deleted file mode 100644 index b95968795..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/PRIOSCHEDULER.doc.xml +++ /dev/null @@ -1,40 +0,0 @@ - -
- - - - - - - - -

This function block is used for time scheduler sequences

This is a generic function block, the number of Channels can be defined from 1 to 64.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'INIT'-Event input:

Performs the initialization and captures the QI-input

If input 'QI' is TRUE the initialization of the block can happen

 'QO' is set to TRUE

 'INITO' is fired

If input 'QI' is FALSE the block will be deinitialized

 'QO' is set to FALSE

 'INITO' is fired

 

-

'SET'-Event input:

If 'QI' is TRUE and 'INIT' has worked properly it executes the writing of the message

 A 'SETO'-Event is fired

If 'QI' is FALSE no further action (FB deinitialized)

 

'INITO'-Event output:

is fired after each INIT

 

'SETO'-Event output:

is fired after a triggered SET, if the FB is initialized properly

 

'IND'-Event output:

is fired when defined point of time out of SCHEDULE occurs, in conjunction with that the respective CHANNEL containes the defined value.

After an INIT when the FB looks back in time for the last event to set, it will provide a value at one or more channels but in this case no IND-event is fired.

 

Functional Behavior

'QI'-input:

if TRUE, function block can be initialized.

If set FALSE the block will be deinitialized.

 

'FIRSTCHANNEL'-input:

Defines the channel number of CHANNEL1. CHANNEL1 is equal to FIRSTCHANNEL. CHANNEL2 gets the number of CHANNEL1 plus one.

If FIRSTCHANNEL=0 CHANNEL1=0

With this feature it is possible to use several EVENTSCHEDULER blocks with various channel definitions but only one list to provide 'SCHEDULE'.

 

'MAXINITTIME'-input:

Maximum time the FB looks back in time after INIT to trigger an event that has to happen. This is to fetch the event that has happened before the INIT event has arrived. Only the last event out of the list, that had happened before INIT and within the MAXINITTIME, will be considered. The FB will look no further back in time, even if MAXINITTIME is set to 24 hours or more.

 

'SCHEDULE'-input:

Use the cron format for the SCHEDULE string. If using a list of sequences, seperate them with a semicolon.

Format:

(min hr day mon wday year ch val; min hr...)

each value can be a single number or a list of numbers divided by a comma (min,min hr,hr,hr day mon wday year ch val,val; min hr...)

Possible values:

general: * means always, it is used if no specific value is set

min: [*] [0-59] hr: [*] [0-23] day: [*] [1-31] mon: [*] [1-12]

wday: [*] [0-7] 0 and 7 = sunday, 1 = monday, 2 = tuesday, etc.

year: [*] [####]

ch: [0 - 999999] this value has to be the result of the 'CHANNELn' output number of the FB + the defined value of 'FIRSTCHANNNEL'-input

val: [0 - 999999]

 

Examples:

-

- - - - - - - - - - - - - - - - - -
Scheduler example strings
StringDescription
0 * * * * * 0 1Sets on every hour, on minute 0 channel 0 to value 1
30 7 * * * * 1 50Sets every day on 07:30 channel 1 to value 50
0 17 1 1,2 * * 2 80Sets on first january and first february on 17:00 the channel 2 to value 80
15,45 * * * 1,3 * 3 0Sets on monday and wednesday every hour on minute 15 and 45 channel 3 to value 0

 

 

 

 

 

 

 

 

The definition of the point of time can only be the exact minute. Somewhere in this defined minute the event will happen.

 

'QO'-output:

shows status of the block

TRUE is ready

FALSE is deinitialized or error

 

'STATUS'-output:

Blank if no error

Shows error message when an error occures. (i.e.: Syntax error in schedule definition at position 21)

If a SET is triggered but the FB is deinitialized a specific error message will appear not until the FB is initialized properly.

 

'CHANNELn'-output:

Outputs value(s) defined at 'SCHEDULE'

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml b/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml deleted file mode 100644 index 6d2c3b529..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/QUERY_CONNECTION.doc.xml +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - - - - - - -

This function block is internally used to query connection states.

It verifies the presence of a connection.

-

-

-

-
-

- Temporal Behavior

'REQ'-Event input:

Every REQ captures 'INST_PATHNAME', 'INST_VAR' and QUERY_TYPE and executes the internal logic.

Outputs NOT_FOUND and CONNECTED are set.

A CNF-Event is fired.

 

'CNF'-Event output:

CNF is fired after each REQ.

 

Functional Behavior

'INST_PATHNAME'-input parameter:

Pathname of that function block instance the connection state is to be checked. The pathname is composed of "${PATH}" and the instance name divided by a dot (i.e.: ${PATH}.FB1, ${PATH}.FB2, etc. or merely ${PATH} if the pathname is generic [for example the QUERY_CONNECTION is used inside of a composite or a CAT and it has to check the connection state of this composite or CAT containing it]).

 

'INST_VAR'-input parameter:

Input- or outputname of the instance (FB) to be checked. (i.e. OUT, ...)

Note: checking the connection state of a variable of a function block (query_type 3): only input variable check is supported. QUERY_CONNECTION does not work with output variable (in that case output 'CONNECTED' shows FALSE anyway, no matter if connected or not).

 

'QUERY_TYPE'-input parameter:

This parameter defines what connection type has to be checked. 0,1 and 2 is for Adapter types, 3 has to be chosen if the connection state of an input variable is to be checked.

0=Adapter Remote, 1=Adapter Locally, 2=Adapter Both, 3 Variable

 

'NOT_FOUND'-output:

Output is set to TRUE if the function block to be checked can not be found, Block does not exist respectively the parameter at 'INST_PATHNAME' is not correct.

Output is set to FALSE if the function block to be checked has been found.

 

'CONNECTED'-output:

Output is set to FALSE if no connection at the specified in- or output could be detected. But it's also FALSE if a output variable is defined at 'INST_VAR' with an existing connection, because output variables can not be checked. Further it is set to FALSE if the parameter at 'INST_VAR' or 'QUERY_TYPE' is not correct. There is no other warning if that happens.

Output is set to TRUE if a connection at the specified in- or output could be detected.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml deleted file mode 100644 index a82b9713d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/REPORT_APP_STATE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Reports the state of the application back to the IEC 61499 Runtime

-

-
-

The function block allows the application to report the application status back to the IEC 61499 runtime.

The main usage is to tell the runtime that the application has performed its initialization stages and is ready to proceed with the normal operation. The runtime then enables processes such as updating the data stored in the non-volatile storage, that can be inconsistent during the initialization. This is achieved using STATE = App Initialized.

The FB can either start automatically as soon as the resource it is located in starts, or explicitely using the START event. Note that the STARTMODE is a parameter (it is not associated with any event) and as such it has to be defined as a constant. If the STARTMODE is implicit, also the TIMEOUT has to be specified as a constant.

If there is any REPORT_APP_STATE FB in any resource, there has to be exactly one with STARTMODE App Init in the device.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml b/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml deleted file mode 100644 index 755d2b8ff..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/RES_WATCHDOG.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used access the watchdog functions

-

-
-

This function block is internally used access the watchdog functions

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml deleted file mode 100644 index 0479b16de..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ROL.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a bitwise rotation to the left.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Rotates the value in 'IN1' by 'N' positions to the left. Bits falling out on the left side, will be inserted on the right side in the same order. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

The maximum value of 'N' depends on the type.  For each IN/OUT type the number of bit rotations performed is calculated according the following formulas:

BYTE: Bits_to_rotate := (N AND 7)

WORD: Bits_to_rotate := (N AND 15)

DWORD: Bits_to_rotate := (N AND 31)

LWORD: Bits_to_rotate := (N AND 63)

 

For example:

N := 2

BYTE:  'IN1': 16#C8 (11001000)  'OUT1': 16#23 (00100011)

WORD: 'IN2': 16#8003 (1000000000000011)  'OUT2': 16#000E (0000000000001110)

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml deleted file mode 100644 index deb5f13c7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ROR.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a bitwise rotation to the right.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Rotates the value in 'IN1' by 'N' positions to the right. Bits falling out on the right side, will be inserted on the left side in the same order. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

The maximum value of 'N' depends on the type.  For each IN/OUT type the number of bit rotations performed is calculated according the following formulas:

BYTE: Bits_to_rotate := (N AND 7)

WORD: Bits_to_rotate := (N AND 15)

DWORD: Bits_to_rotate := (N AND 31)

LWORD: Bits_to_rotate := (N AND 63)

 

For example:

N := 2

BYTE:  'IN1': 16#C8 (11001000)  'OUT1': 16#32 (00110010)

WORD: 'IN2': 16#8003 (1000000000000011)  'OUT2': 16#E000 (1110000000000000)

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml b/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml deleted file mode 100644 index 1907afa77..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/RTWatchdog.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block is used to access the built-in runtime watchdog functions

A RESET-Event has to be fired before the adjusted expire time runs out.

-

-
-

- Temporal Behavior

'INIT'-Event input: 

- has to be triggered first to initialize, catches 'QI' and leads to an 'INITO'-Event.

 

'START'-Event input:

- has to be triggered immediately after the initialization chain is ready; leads the time setting to output 'EXPIRETIME' and starts the FB.

 

'RESET'-Event input:

- This input has to be connected to a FB sending events  triggered before the expiretime runs out. If not the selected action at input 'ACTION' starts.

 

'STOP'-Event input:

- stops the RTWatchdog, no further watchdog action, Fires a 'STOPO' event.

 

'TRIGGER'-Event input:

- A triggered 'TRIGGER'-Event fires the 'EXPIRED'-Event immediately, independently from expire time.

 

'INITO'-Event output:

- This event is fired after each triggered 'INIT'.

 

'STARTO'-Event output:

- This event is fired after a triggered 'START'.

 

'RESETO'-Event output:

- This event is fired after each triggered 'RESET'.

 

'STOPO'-Event output:

- This event is fired after each triggered 'STOP'.

 

'EXPIRED'-Event output:

- This event is fired if expire time runs out and 'ACTION' is set on event (=2)

 

Functional Behavior

'QI'-input:

- has to be TRUE, so that the block can be initialized and is ready to work. It can be set FALSE to deinitialize the block.

 

'ACTION'-input:

- defines the action to be done if expire time runs out.

0 Default - same as Log

1 No action - no further action

2 Event - an event at 'EXPIRED'

3 Log - only message into log file/no event

4 Exit - stops runtime/no event

5 Reboot - reboots runtime

 

'QO'-output:

- shows status of the block (TRUE is ready, FALSE is error or deinitialized).

 

'EXPIRETIME'-output:

- shows the real expire time. It is advised to RESET the watchdog at least 3-5 times so fast to cover possible execution delays, Default setting is 30s; to set it to another time it is configurable in the *.config file: Configuration.FB.RTWatchdog.ExpireInterval = <Milliseconds>

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml deleted file mode 100644 index c9ba2c809..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SELECT.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block selects one of the input values and passes it to the output when the request event is received.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each 'REQ'-Event passes the value of one of the 'INn'-inputs selected by the 'SELECT'-input to the 'OUT' and fires an 'CNF'-Event.

 

Functional Behavior

The number of inputs 'IN1' ... 'INn' can be defined from 2 ... 16. The numerical value of the 'SELECT'-input is an 'index' starting at the value 0 for selection of 'IN1' to 15 for 'IN16'. A value at the 'SELECT'-input which is greater than the number of (inputs - 1) will be ignored, the value of 'OUT' remains unchanged.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml deleted file mode 100644 index 7dc7a0921..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SERIALIO.doc.xml +++ /dev/null @@ -1,34 +0,0 @@ - -
- - - - - - - - -

This function block is used to access a serial IO interface.

-

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Captures the 'QI'-input

- If 'QI' is FALSE then

  - The FB will be deinitialized

  - The 'QO'-output is set to TRUE, when deinitializing was successful

  - 'STATUS'-output is blank, when deinitializing was successful

  - The 'INITO'-Event is fired

- If 'QI' is TRUE then

  - The FB is initialized

  - Captures the STARTCHAR and ENDCHAR parameters

  - The 'QO'-output is set to TRUE, when initializing was successful

  - 'STATUS'-output is blank, when initializing was successful

  - Applies the new settings

  - The 'INITO'-Event is fired

- If an error is detected while initializing or deinitializing then

  - 'QO'-output is set to FALSE

  - 'STATUS'-output is set to an error message

  - The 'INITO'-Event is fired

 

-

'REQ'-Event input:

- If 'QI'-input is TRUE and 'INIT' has worked properly:

   - A triggered 'REQ' performs the sending of data contained at the 'DATAOUT'-input.

   - The 'CNF'-Event output is fired

- If 'QI'-input is FALSE and the FB is deinitialized:

   - 'QO' is set to FALSE

   - 'STATUS'-output shows an error message (i.e.: REQ invalid in state START)

   - No data will be sent

   - The 'CNF'-Event is fired

 

'ACK'-Event input:

Has to be triggered to signalize that data from an 'IND'-Event has been processed. If some further data is available, the Function block is ready to accept the next data,  provide it at 'DATAIN'-output and fire 'IND' once more. The very first ACK-Event after INIT is triggered automatically.

If an 'ACK' is triggered before data is available, the event remains active and works with the next data.

If an 'ACK' is triggered but the FB is deinitialized, the function block does not react and no 'IND' will be fired. A 'STATUS'-message will be shown when the Function block gets initialized.

 

-

'INITO'-Event output:

This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

-

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired to signalize that data has arrived and is contained at output DATAIN. Any error will be indicated at QO and STATUS.

An ACK-Event must have been triggered first, to make the FB ready to accept new data.

 

-

Functional Behavior

'QI'-input:

If the value is TRUE an initialization is performed, else all existing settings are cleared (deinitialization).

 

-

'COM'-input:

Contains the parameters of the serial connection properties. The properties have to be separated by a single space character.

They have to be edited in the following order: {dev=name baudrate=bps bits=width stopbits=[1|2] parity=[none|even|odd]}

(i.e.: dev=COM2 baudrate=9600 bits=8 stopbits=1 parity=none)

The notation COMx is to be recommended because, by using it in this way, the device name will be converted platform-specific. (i.e. on Beckhoff CX10x0 → COM1: is converted to /dev/ttyS0 with Linux, 0 with RTOS, ...)

 

-

'STARTCHAR', 'ENDCHAR':

-

This parameters are optional. They can be used for structuring a data stream into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and with this the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

The functionblock only permits a single marker byte. If it is necessary to get a line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, the following constraints have to be considered: setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>). This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be a <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'DATAOUT'-input:

Containes data to be transferred to the connected serial interface when an REQ-Event happens.

 

-

'QO'-output:

Shows the success of initialization or deinitialization. TRUE is successfully initialized or deinitialized, FALSE shows that an error with INIT has occured.

 

-

'STATUS'-output:

When an input event ('INIT'- or 'REQ'-Event) has been successfully processed, this output is set blank.

It contains the specific error message if an error has occurred.

-

-

 

'DATAIN'-output:

Containes the datablock ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml deleted file mode 100644 index ea3b3e470..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SHL.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a left bit shift operation of the input value.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Shifts the value in 'IN1' by 'N' positions to the left. Bits falling out on the left side are lost. 'N' number of zero(s) bits will be inserted on the right side. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

For example:

N := 3

BYTE:  'IN1': 16#C9 (11001001)  'OUT1': 16#48 (01001000)

WORD: 'IN2': 16#8F03 (1000111100000011)  'OUT2': 16#7818 (0111100000011000)

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml deleted file mode 100644 index d89a576fc..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SHR.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a right bit shift operation of the input value.

It is a generic block. The number of inputs and accordingly outputs can be chosen from 1 to 16. Each input has one corresponding output with the same type.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Shifts the value in 'IN1' by 'N' positions to the right. Bits falling out on the right side are lost. 'N' number of zero(s) bits will be inserted on the left side. The result is written to 'OUT1'. Within a FB different input types may be defined.

 

For example:

N := 3

BYTE:  'IN1': 16#C9 (11001001)  'OUT1': 16#19 (00011001)

WORD: 'IN2': 16#8F03 (1000111100000011)  'OUT2': 16#11E0 (0001000111100000)

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml deleted file mode 100644 index 448e7c469..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SIMULATION_RES.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - Stanislav - Meduna - - stanislav.meduna@nxtcontrol.com - -

Summary

-

-
-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SMI_DEVICE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml deleted file mode 100644 index c76b6e4a2..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SMI_INTERFACE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for Enocean hardware access

-

-
-

This function block is internally used for Enocean hardware access

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml deleted file mode 100644 index ffb76b354..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SMOOTH.doc.xml +++ /dev/null @@ -1,22 +0,0 @@ - -
- - - - - - - - -

This function block is used to smooth input data and with this the transmitted events.

It is a generic block. The datatypes of inputs (and accordingly outputs) can be chosen. One function block can be defined with 1 to 16 in- and outputs.

-

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the values from 'TYPE', 'VALCONDITION','TIMEDIFF', 'CYCLE', VALDIFFn'.

 

 'REQ'-Event input:

- This event starts the internal logic and produces a 'CNF'-event only if the requirements of the adjusted parameters are fulfilled.

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed.

 

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the requirements of the adjusted parameters are fulfilled.

- This event will be fired as well if 'CYCLE' is in use and causes the function block to work before a new 'REQ'-event arrives.

 

Functional Behavior

 'TYPE'-input:

- types to select conditions for smoothing data:

- 0: no smoohing - each 'REQ' will cause a 'CNF'-event and data passes from input to output, values at 'VALCONDITION', 'TIMEDIFF' or 'VALDIFFn' will be ignored. A constant at 'CYCLE' will cause events in the defined intervall, no matter if any input value has changed. (i.e. t#1s causes events at 'CNF' every second and with that data is passed to output(s).)

- 1: old/new - new data at input must differ from old data to be passed to output(s) (and cause a 'CNF'-event). If 'VALCONDITION' = 1 all values must have changed. 'VALDIFFn' is ignored.

- 2: value - value based smoothing, a minimum value difference (definable at 'VALDIFFn' for each input) is neccessary to pass the new value to output (and cause a 'CNF'-event); constants at 'VALCONDITION' and 'VALDIFFn' are active. 'TIMEDIFF' is ignored.

- 3: time - time based smoothing, a minimum time span has to elapse, before the new value(s) can pass to output(s) (and cause a 'CNF'-event); a constant at 'TIMEDIFF' is active. 'VALCONDITION' and 'VALDIFFn' are ignored.

- 4: time or value - adjusted parameters for time based smoothing or value based smoothing have to be fulfilled to pass value(s) to output(s) (and cause a 'CNF'-event).

- 5: time and value - all adjusted parameters for time based smoothing and value based smoothing have to be fulfilled to pass value(s) to output(s) (and cause a 'CNF'-event).

- 6 and greater: undefined condition, do not use

 

 'VALCONDITION'-input:

- Value-based smoothing,

- 0: values are sent if one of the input values differ enough from the last value

- 1: values are sent only if the values of all inputs differ enough from their last value

 

 'TIMEDIFF'-input:

- For time based smoothing: This value defines the time difference or deflutter time that has to pass before new data will be sent.

 

 'CYCLE'-input:

- This value defines how often the value(s) and the 'CNF'-event will be sent at least. (It will overrule all other parameters if it's in use.)

- If it should not be used, set it on 0s.

 

 'VALDIFFn'-input:

- This value defines the minimum difference to occur between the last value written to output and the new input value, to proceed a new writing execution (and with this an event at 'CNF').

- Datatype depending on 'IN'-input datatype.

 

 'INn'-input:

- Data input. Datatype selectable with the interface editor.

 

 'OUTn'-output:

- Data output. Datatype depending on 'IN'-input datatype.

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml deleted file mode 100644 index 2a40ee4d7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Write periodically log information into the device log file.

-

-
-

This functionblock writes periodically log information into the device log file.

The log informations are written into the log file of the device.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml deleted file mode 100644 index 544b9a03b..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_ARCHIVE.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Write periodically log information into the device log file.

-

-
-

Write periodically log information into the device log file.

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml deleted file mode 100644 index fe081ea19..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_DEV.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Write periodically log information into the device log file.

-

-
-

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the device component.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml deleted file mode 100644 index 110d5d539..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_NET.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Write periodically log information into the device log file.

-

-
-

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml deleted file mode 100644 index 110d5d539..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/STATS_LOGGER_RSRC.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

Write periodically log information into the device log file.

-

-
-

This function block is used by STATS_LOGGER function block.

The function block enables the statistical log information of the archiving components.

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml deleted file mode 100644 index d88482cae..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SUB.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block implements a mathematical subtract operation.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Subtracts from 'IN1' the values of 'IN2', ... 'INn' and writes the result to 'OUT'. Depending on the input values, the operation could also generate overflows/underflows. Information may be lost if the result of the operation(s) cannot be represented in the 'OUT' type.

'OUT' := 'IN1' - 'IN2' - ... - 'INn'

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml deleted file mode 100644 index 739b805c8..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUEDST.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

The receiver function block SYMLINKMULTIQUEDST has to fetch the data from the data queue of the corresponding source (SYMLINKMULTIQUESRC) on its own request.

All value output channels of the FB are assigned with the path name of this block.

Only one SYMLINKMULTIQUESRC and one SYMLINKMULTIQUEDST have to work together. If there were several ...SRC or ...DST blocks there is no way to define which block fetches which value out of the data queue.

Please note: The maximum capacity of the queue can be defined (see 'REQ'-Event input of SYMLINKMULTIQUESRC !). If the specified limit has to be adjusted, it should be regarded, that the limit should keep an application from using up all memory of the device. Consequently, the sum of all entries in all queue FBs at any time must not exceed the limit of your device memory.

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is FALSE.

- Each 'INIT' causes an 'INITO'-event.

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized and data is available. If the data queue is empty the 'CNF'-event will not be fired, it is fired immediately when data is available from the data queue, without another 'REQ'.

- After proper initialization a 'REQ'-event should be triggered once. If there is no data in the data queue available the FB is ready-to-receive.

- Data of the queue counts as fully processed when 'REQ' has been triggered at least once and no data is stored in the queue, that means no 'CNF'-event has followed.

- When the SYMLINKMULTIQUEDST is ready (a 'REQ' has been triggered without data is provided) and then the corresponding SYMLINKMULTIQUESRC writes ('REQ' of the ...SRC is triggered) the data will be written directly to output(s) 'VALUEn' of the ...SRC and a 'CNF' will be triggered at both, the ...SRC and the ...DST.

- 'REQ'-events, which are triggered after the data queue is empty and the one ready-to-receive 'REQ' has already been triggered, will cause no effect. This one 'REQ', that brings the FB in ready-to-receive state, will cause fetching the first set of data from the queue as soon as it is available. Further data fetching needs new 'REQ'-events.

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

- For correct operation the 'INITO'-Event should be looped back to the 'REQ' of the SYMLINKMULTIQUEDST, after all subsequent FBs have been initialized. This will trigger the first 'REQ' after initializing, that brings the FB in ready-to-receive state as described above at 'REQ'.

 

 'CNF'-Event output:

- This event is fired after each 'REQ'-event, only if the function block is initialized properly and when data for processing is available in the data queue.

- 'REQ'-Events while the data queue is empty does not produce a 'CNF'-Event. In this case the first available value will be fetched immediately from the SYMLINKMULTIQUESRC and the 'CNF'-Event is fired without another 'REQ'-Event. Further data fetching, respectively 'CNF'-Events, need further 'REQ'-Events.

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIQUESRC 'NAME'-input. (i.e.: ${PATH}HW_pump1)

- To connect HW IOs with process values it is necessary to use the prefix '${PATH}' in the path name.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

      ERR_QUEMPTY < queue currently empty >

      ERR_QUFULL    < the queue is full >

      ERR_NORECV   < the queue is full and there is nobody to read >

      ERR_VARCNT   < incorrect number of variables >

 

 'VALUEn'-output:

- Value that has been fetched from data queue from the corresponding SYMLINKMULTIQUESRC. Datatype can be defined within the interface editor.

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml deleted file mode 100644 index 1c4bca64d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIQUESRC.doc.xml +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It provides a data queue, to appropriate data (up to the defined maximum capacity) whithout having to wait for proper initialization of the corresponding SYMLINKQUEDST. The receiver function block SYMLINKMULTIQUEDST has to fetch the transmitted data on its own request.

All value input channels of the FB are assigned with the path name of this block.

Only one SYMLINKMULTIQUESRC and one SYMLINKMULTIQUEDST have to work together. If there were several ...SRC or ...DST blocks there is no way to define which block fetches which value out of the data queue.

Please note: The maximum capacity of the queue can be defined (see 'REQ'-Event input). If the specified limit has to be adjusted, it should be regarded, that the limit should keep an application from using up all memory of the device. Consequently, the sum of all entries in all queue FBs at any time must not exceed the limit of your device memory.

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized (even if the data queue is already full).

- After proper initialization each 'REQ'-event causes the block to store the current data of the 'VALUEn'-channnels into the data queue, without having to wait for proper initialization of the corresponding SYMLINKQUEDST until the defined maximum capacity limit of the queue has been reached. Data that arrives while the queue is already full will be dropped until the corresponding SYMLINKMULTIQUEDST requests data and the queue gets empty space again.

- The maximum capacity range can be defined from 5 to 2000, default setting is 128. (The procedure how to set the value is described in the studio help at Solution→Distributed PAC Project→Symbolic Links.)

- Data that is arriving at the 'VALUEn'-inputs of the SYMLINKQUESRC, after the data queue is already full, will get lost. So be careful to ensure, that the data queue is emptied fast enough and does not overflow, but consider, that the max. capacity has to be small enough to prevent the application from using up all memory (particularly with the use of several SYMLINKMULTIQUESRC function blocks in the same device).

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

 'CNF'-Event output:

- This event is fired after each 'REQ'-event, only if the function block is initialized properly. It is also fired after each 'REQ'-event while the queue is filled up already.

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAME'-input. (i.e.: ${PATH}HW_pump1)

- To connect HW IOs with process values it is necessary to use the prefix '${PATH}' in the path name.

 

 'VALUEn'-input:

- Value to be sent to data queue from where the corresponding SYMLINKMULTIQUEDST will fetch it. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:
      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

      ERR_QUEMPTY < queue currently empty >

      ERR_QUFULL    < the queue is full >

      ERR_NORECV   < the queue is full and there is nobody to read >

      ERR_VARCNT   < incorrect number of variables >

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml deleted file mode 100644 index 6a03fe824..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALDST.doc.xml +++ /dev/null @@ -1,30 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

-

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

Several pairs of SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST can be used in unison with the same path name to transmit value arrays of arbitrary size.

It serves as the symlinkdestination and needs a SYMLINKMULTIVALSRC with the same parameterizing to fetch the transmitted data from.

-

All value input channels of the FB are assigned with the path name of this block.

-

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event. The 'INIT' should be triggered before triggering the 'INIT' of the SYMLINKMULTIVALSRC to prevent the loss of data (see SYMLINKMULTIVALSRC, 'REQ'-Event).

-

 

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

-

 

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

-

 

 'CNF'-Event output:

- This event is fired after each successfully 'REQ'-event of the corresponding SYMLINKMULTIVALSRC, if the function block is initialized properly.

- This event is fired after an 'INIT'-event of the SYMLINKMULTIVALSRC, if both function blocks (the SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST) are initialized properly.

- This event is fired after a 'REQ'-event, if the function block is initialized properly.

-

 

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

-

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARSRC 'NAME'-input. (i.e.: HW_pump1.isOn)

 

 'INDEX'-input:

- This value defines which SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST do correspond, because it is possible to apply series of pairs with the same path name, for the transmitting of arrays.

Example: See SYMLINKMULTIVALSRC, at 'INDEX'-input.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

 'VALUEn'-output:

- Value that has arrived from corresponding SYMLINKMULTIVALSRC. Datatype can be defined within the interface editor (and has to be equal to the corresponding SYMLINKMULTIVALSRC).

-

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml deleted file mode 100644 index 5b0ac5ed9..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVALSRC.doc.xml +++ /dev/null @@ -1,27 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

Several pairs of SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST can be used in unison with the same path name to transmit value arrays of arbitrary size.

It serves as the symlinksource and needs a SYMLINKMULTIVALDST with the same parameterizing to fetch the transmitted data.

-

All value input channels of the FB are assigned with the path name of this block.

-

-

-
-

-

Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is TRUE the 'INIT' event causes also the first data transmitting without a 'REQ'-event.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

-

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

- If the corresponding SYMLINKMULTIVALDST is initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVALDST function block too.

- If the corresponding SYMLINKMULTIVALDST is not yet initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVALDST function block after the initialization of this block is done. In this case data is written to the SYMLINKMULTIVALDST when the initialization of this block happens, without a further REQ. Only the last value of each channel that has been sent will be received at the SYMLINKMULTIVALDST. Be sure to have the SYMLINKMULTIVALDST initialized before initializing the SYMLINKMULTIVALSRC, or at least before the second REQ-Event of the SYMLINKMULTIVALSRC is triggered, to prevent the loss of data.

 

-

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

-

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the function block is initialized properly.

 

-

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAME'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAMEn'-input. (i.e.: HW_pump1.isOn)

- One Path name is

 

 'INDEX'-input:

- This value defines which SYMLINKMULTIVALSRC and SYMLINKMULTIVALDST do correspond, because it is possible to apply series of pairs with the same path name, for the transmitting of arrays.

Example:

 

 'VALUEn'-input:

- Value to be sent to corresponding SYMLINKMULTIVARDST. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml deleted file mode 100644 index 222b18aa7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARDST.doc.xml +++ /dev/null @@ -1,28 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 outputs. Each output datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It serves as the symlinkdestination and needs a SYMLINKMULTIVARSRC with the same parameterizing from which it can fetch the transmitted data.

Each value input is assigned with it's own path name.

-

-

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event. The 'INIT' should be triggered before triggering the 'INIT' of the SYMLINKMULTIVARSRC to prevent the loss of data (see SYMLINKMULTIVARSRC, 'REQ'-Event).

 

-

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

 

-

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

-

 'CNF'-Event output:

- This event is fired after each successfully 'REQ'-event of the corresponding SYMLINKMULTIVARSRC, if the function block is initialized properly.

- This event is fired after an 'INIT'-event of the SYMLINKMULTIVARSRC, if both function blocks (the SYMLINKMULTIVARSRC and SYMLINKMULTIVARDST) are initialized properly.

- This event is fired after a 'REQ'-event, if the function block is initialized properly.

 

-

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

-

 'NAMEn'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARSRC 'NAMEn'-input. (i.e.: HW_pump1.isOn)

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

 

'VALUEn'-output:

- Value that has arrived from corresponding SYMLINKMULTIVARSRC. Datatype can be defined within the interface editor (and has to be equal to the corresponding SYMLINKMULTIVARSRC).

 

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml deleted file mode 100644 index 685e3216b..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKMULTIVARSRC.doc.xml +++ /dev/null @@ -1,27 +0,0 @@ - -
- - - - - - - - -

This function block is internally used for symlink connections solely in Hardware CATs.

It is a generic block and can be defined with 1 to 16 inputs. Each input datatype can be defined independently. (More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

It serves as the symlinksource and needs a SYMLINKMULTIVARDST with the same parameterizing to fetch the transmitted data.

Each value input is assigned with it's own path name.

-

-

-

-
-

- Temporal Behavior

 'INIT'-Event input:

- Performs the initialization and captures the 'QI'-input.

- - If 'QI' is TRUE the function block is initialized and ready to work, 'QO' is TRUE.

- - If 'QI' is TRUE the 'INIT' event causes also the first data transmitting without a 'REQ'-event.

- - If 'QI' is FALSE the function block is deinitialized, 'QO' is false.

- Each 'INIT' causes an 'INITO'-event.

 

-

 'REQ'-Event input:

- Produces a 'CNF'-event, if the function block is initialized.

- If the corresponding SYMLINKMULTIVARDST is initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVARDST function block too.

- If the corresponding SYMLINKMULTIVARDST is not yet initialized, this event produces a 'CNF'-event at the SYMLINKMULTIVARDST function block when the initialization of this block is done. In this case data is written to the SYMLINKMULTIVARDST when the initialization of this block happens, without a further REQ. Only the last value of each channel that has been sent will be received at the SYMLINKMULTIVARDST. Be sure to have the SYMLINKMULTIVARDST initialized before initializing the SYMLINKMULTIVARSRC, or at least before the second REQ-Event of the SYMLINKMULTIVARSRC is triggered, to prevent the loss of data.

 

 

-

 'INITO'-Event output:

- This event is fired when the 'INIT'-Event has been processed (successfully or not).

 

-

 'CNF'-Event output:

- This event is fired after a 'REQ'-event, only if the function block is initialized properly.

 

-

Functional Behavior

 'QI'-input:

- If the value is TRUE an initialization is performed, else: the function block will be deinitialized with an INIT-event.

 

 'NAMEn'-input:

- Path name, has to be equal at the corresponding SYMLINKMULTIVARDST 'NAMEn'-input. (i.e.: HW_pump1.isOn)

 

 'VALUEn'-input:

- Value to be sent to corresponding SYMLINKMULTIVARDST. Datatype can be defined within the interface editor.

 

 'QO'-output:

- TRUE if the function block is initialized, FALSE if not.

 

 'STATUS'-output:

- Indicates the status of the function block.

- Possible status codes of 'STATUS'-output:

      OK                  < status OK >

      NTF_IVAL        < success, inital values set notification >

 

- Possible error codes of 'STATUS'-output:

      ERR_MEM        < out of memory >

      ERR_SIZE        < illegal size spezification >

      ERR_PARAM     < parameterization error (empty name or size of zero) >

      ERR_INDEX      < index value out of range >

      ERR_NOVALUE < no input value where an output variable is given >

      ERR_CONV       < conversion of this type not allowed (not possible) >

      ERR_RANGE     < conversion possible but value has changed >

      ERR_UNDEF     < no queue with the given name defined >

      ERR_MDEF       < multiple destination queue FBs defined >

-

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml deleted file mode 100644 index 369804b82..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYMLINKSTATUS.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used to get symlink status informations

-

-
-

This function block is internally used to get symlink status informations

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml deleted file mode 100644 index e66be0d50..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYSLOGLOGGER.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used to send logging information to a syslog server

-

-
-

This function block is internally used to send logging information to a syslog server

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml deleted file mode 100644 index 59fe8086f..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/SYSMONITOR.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is internally used to read system information

-

-
-

This function block is internally used to read system information

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml b/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml deleted file mode 100644 index 85be19eb4..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/TCPIO.doc.xml +++ /dev/null @@ -1,55 +0,0 @@ - -
- - - - - - - - -

This function block is used to access a TCP/UDP connection

-

-

-

-

-

-

It is equipped with a 16k buffer to cache data (i.e. if the receiving client is not as fast as the sender). If data cannot be received fast enough, so that the buffer gets overcharged, some parts of the datastream will get lost. There is no warning if that happens, but the discarding of received datablocks is minuted in the cyclic log.

-

-

-

-

-

-

-

-

-

-

-
-

- Temporal Behavior

'INIT'-Event input:

- Captures the QI-input

 - If QI is TRUE: Performs the initialization and applies the PORT and START- and ENDCHARACTER settings. If the TCPIO-Server-functionblock is already running, it will be stopped first. Default communication is TCP, to use UDP the prefix UDP has to be set at input PORT (see below).

    -
  • TCP - only one client can be active at a time, if a second client signs in, the connection to the first client will be closed before the second one can communicate.

The success of the operation is shown: 'QO' is set TRUE, 'STATUS' is blank, 'INITO' is fired.

 - If QI is FALSE: Performs the deinitialization of the server functionblock. A potentially opened connection will be closed and a sign-in of a client is no longer possible. 'QO' is set TRUE, when the deinitialization has worked properly, and 'STATUS' is blank.

 - If initialization or deinitialization has not worked properly 'QO' is set to FALSE and STATUS will show an error message.

 

'REQ'-Event input:

Each triggered 'REQ' executes the internal logic which means that data at input DATAOUT will be transferred to client and a 'CNF'-Event is fired when the operation was successful.

    -
  • TCP - a client must have signed in, otherwise this event does not work
  • -
  • UDP - basically, data will be sent to the client from which the last package has been received, if there was no receiving at all, this event does not work; if it is necessary to send packages to a specific address use the parameter DestIP:DestPort, as described below at item 'PORT'

General: address of the client to be sent to is contained at output PEERADDR. The success of the operation is shown at CNF, QO and STATUS.

 

'ACK'-Event input:

This event has to be triggered to signalize the end of processing data from an 'IND'-Event. If some further data is available the function block will place it at 'DATAIN' and then fire an 'IND'-Event.

A triggered 'ACK' with no available data causes the event to remain active and work with the next data.

As soon as data is available at 'DATAIN'-output an IND-Event is fired to signalize it and this action is finished. If some further data is present, it will be provided at DATAIN and a new IND-Event is fired. This process will be repeated until no further data is available.

 

'INITO'-Event output:

This event is fired when an 'INIT'-Event has happened (successfully or not).

 

'CNF'-Event output:

This event is fired when 'REQ'-Event has been processed (successfully or not).

 

'IND'-Event output:

This event is fired when data has arrived from a client. The data is contained at output DATAIN, the address from the client at PEERADR and any error will be indicated at QO and STATUS.

 

- Functional Behavior -

'QI':

Input Event Qualifier TRUE: initialize will work with an INIT-Event. FALSE: an INIT-Event will deinitialize the functionblock.

 

'PORT':

This parameter sets the communication port  for the server functionblock to wait for the clients, or for the client to address the server. The portnumber must be in a range from 1 to 65535, depending on operating system (in some case 1024-65535).

To use TCP set the prefix "TCP:" (or no prefix would use also TCP), to use UDP set the prefix "UDP:" and then the portnumber (i.e.: UDP:1024).

If there is given only a portnumber (and optionally an IP address first) the FB will work in server mode.

If there are given [IP address]:portnumber, semicolon, then IP address:port the FB will work in client mode.

Optionally a local IP and Port can be set. If these parameters are set the FB will operate in client mode, that means the packages (triggered by REQ) will be sent to the given IP/Port address. Receiving Messages will be restricted to the given IP and the Source Port.

- Syntax: PORT = [UDP:|TCP:][[dotAddr:]portNo][;dotAddr:portNo]

that means in detail: 

for server: [TCP:|UDP:]<localPort>    / in this case the local port can be given as: [<dottedIP>:]<portNumber>  /where port number is the port the FB is listening on and the IP address can be specified to bind the port to a specific interface card indicating that only messages from that interface are accepted (default is any interface).

-
for client: [TCP:|UDP:][<localPort>];<remotePort>    / In case of a client FB (same syntax as for servers), the local port is optional, indicating that the system may choose any available port number for communication. If specified, the FB will use the given port and optionally the given interface for communication. The remote port has to be given as: <dottedIP>:<portNumber>

- Examples: -

    -
  • PORT = 10001   /   FB operates in TCP server mode, it waits for connection on Port 10001,
  • PORT = ;127.0.0.1:12345  /  TCP client mode, use various local port, connect with server FB on IP address 127.0.0.1 port 12345 (this could only be used internally) - (the server FB should have here PORT = 127.0.0.1:12345)
  • PORT = 4711;127.0.0.1:12345  /  TCP client mode, use local port 4711, connect with server FB on IP address 127.0.0.1 port 12345
  • -
  • PORT = UDP:10001   /   FB operates in UDP Server Mode, that means it listens for incoming packages on Port 10001 and sends packages to the source port of the last received UDP message. But in this case a message must have been received first before the FB can send a message.
  • -
  • PORT = UDP:10001;10.0.0.1:9001   /   FB operates in UDP Client Mode, that means it listens for incoming packages on Port 10001 from IP 10.0.0.1 - packages from other IPs/ports are dropped, sending will adress packages to 10.0.0.1:9001 (With the use of DestPort 10001, in our example, this mode would allow the sending of UDP messages without having received a package before)
  • PORT = TCP:10.0.0.1:10001;10.0.0.1:9001  /  FB operates in TCP Client Mode, it listens for incoming packages on 10.0.0.1 port 10001 - packages from other IPs/ports are dropped, sending will address packages to 10.0.0.1:90001

-

-

-

 

'STARTCHAR', 'ENDCHAR':

This parameters are optional. They can be used for structuring a data stream (like TCP) into sentences, lines or blocks. The parameter value can be 1 to 255 (ASCII-table), which is converted into a data byte. If this parameters are used, they will be attached to each data block which is contained at 'DATAOUT'-input after a 'REQ'-Event. That means each data block will be prefixed with the STARTCHAR character, and the ENDCHAR character gets attached to the end and then the block is sent. By receiving data, only that part between this marker bytes are valid and will be transferred to 'DATAIN'-output.

If parameter STARTCHAR is missing, the transfer begins with the next received Byte. If parameter ENDCHAR is missing, the transfer goes on to the last received byte. If both parameters do not exist, data will be transferred to output DATAIN in the same condition as received.

A line-by-line data processing with a line end character sequence <CR><LF>, as it is usual with Microsoft, can be made by setting STARTCHAR to 0 (<NULL>) and ENDCHAR to 13 (<CR>), because the functionblock only permits a single marker byte. This setting produces data parts with an prefixed <LF> additional character. It would have to be picked out of the received data. To avoid this character the STARTCHAR has to be 10 (<LF>), but by this the very beginning of the datastream must be an <LF> (blank line), otherwise the first data part will get lost.

The maximum block size is 1KByte (1024Bytes). If the received blocks are longer, they will be separated into blocks of 1K automatically. This means the maximum size of data contained at 'DATAIN'-output is 1024 characters. By this measure the system is prevented to get overloaded by unlimited allocating of data. Also all the subsequent function blocks have a defined record length to work with. After receiving a datablock, and separating it into parts if necessary, all parts of the block will be buffered in a queue within the function block to wait for the subsequent processing. The maximum size of buffered data within the queue is 16K.

 

'DATOUT'-data input:

Containes data that will be transferred to the client when REQ-Event happens.

 

'QO'-output:

Shows the initialization status.

TRUE means initializing or deinitializing has worked properly

FALSE means initializing or deinitializing did not work properly, an error has occurred. Error message is set at 'STATUS'.

 

'STATUS'-output:

When an input event ('INIT', 'REQ' or 'ACK') has been successfully processed, the output is blank. Only if an error has occurred it contains the specific error message.

 

'PEERADDR'-output:

Containes the address of the client receiving data or which has last sent some.

 

'DATAIN'-data output:

Containes the data received from a client and now ready to be used. An 'IND'-Event will be fired each time when new data is available at this output. An 'ACK'-Event should signalize the end of processing this datablock.

-

-

-

-

-

-

- - \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml deleted file mode 100644 index f8caa7f1d..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ULUX_IN.doc.xml +++ /dev/null @@ -1,180 +0,0 @@ - -
- - - - - - - - -

This generic function block reads values from the u::Lux switch.

The ULUX_IN satellite function block has to be used in combination with the ULUX_SWITCH function block.

The number of in- and outputs can be increased up to 16.

-

-

-
-

- Behaviour

This is a satellite function block bound to the ULUX_SWITCH function block via the SwitchId input.

The values accessed are addressed via ActorId (zero for switch-global data, non-zero for actor data) and an addressing string specifying a value and optionally sub and sub-sub identification. The exact meaning is out of scope of this description, so this is only a quick overwiew of possible values.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueIdGlobal/ActorSubIdSubSubIdDescription
MotionSensorglobal--Motion sensor detected motion
ProximitySensorglobal--Proximity sensor detected an object
LightSensorgobal--Light intensity over threshold
PageCountgobal--Count of display pages in the switch
PageIndexgobal--Currently active page
EditValueactor--Edit value of the actor
RealValueactor0..3-Up to 4 values provided to the actor
LEDColoractor0..3-LED color
LEDBlinkModeactor0..3-LED blink mode (see u::Lux docs)
LEDOverrideactor0..3-LED is controlled by PLC (not the switch)
Textactor0..9ColorText color
- - -VisibleText is visible
- - -UseColorColor is controlled by PLC
- - -TextUp to 10 texts per actor
Buttonboth0..3-Button pressed
Luxglobal--Light intensity
LuxValidglobal--Light intensity sensor present
Temperatureglobal--Temperature
TemperatureValidglobal--Temperature sensor present
Humidityglobal--Humidity
HumidityValidglobal--Humidity sensor present
CO2global--CO2
CO2Validglobal--CO2 sensor present
IN2global-0..1Additional two digital inputs
IN2Validglobal-0..1Additional inputs present

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml deleted file mode 100644 index 09e20e2a6..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ULUX_OUT.doc.xml +++ /dev/null @@ -1,95 +0,0 @@ - -
- - - - - - - - -

This generic function block writes values to the u::Lux switch.

The ULUX_OUT satellite function block has to be used in combination with the ULUX_SWITCH function block.

The number of in- and outputs can be increased up to 16.

-

-
-

- Behaviour

This is a satellite function block bound to the ULUX_SWITCH function block via the SwitchId input.

The values accessed are addressed via ActorId (zero for switch-global data, non-zero for actor data) and an addressing string specifying a value and optionally sub and sub-sub identification. The exact meaning is out of scope of this description, so this is only a quick overwiew of possible values.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueIdGlobal/ActorSubIdSubSubIdDescription
PageIndexgobal--Set the currently active page
EditValueactor--Edit value of the actor
RealValueactor0..3-Up to 4 values provided to the actor
LEDColoractor0..3-LED color
LEDBlinkModeactor0..3-LED blink mode (see u::Lux docs)
LEDOverrideactor0..3-LED is controlled by PLC (not the switch)
Textactor0..9ColorText color
- - -VisibleText is visible
- - -UseColorColor is controlled by PLC
- - -TextUp to 10 texts per actor
- - -RemoveCompletely remove the text

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml b/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml deleted file mode 100644 index 66a79e45e..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/ULUX_SWITCH.doc.xml +++ /dev/null @@ -1,89 +0,0 @@ - -
- - - - - - - - -

This function block represents an instance of u::Lux switch

It handles both the configuration (assigning an IP address, flashing the firmware) and operation. For accessing the data of the switch the ULUX_IN and ULUX_OUT satellite function blocks are used.

-

-
-

- Initializing -

Each switch is addressed via its IP address. The IPAddress, IPNetmaskWidth and IPGateway have to be set at the 'INIT' time. If the switch has to broadcast the data to other PLCs (not used at the moment), DestinationIP has to be set as well.

Commissioning

After an installation of the new switch it has to be commissioned, i.e. the MAC address has to be determined and IP address assigned to it. To efficiently do this the u::Lux switch provides a way to send a message allowing to identify itself. The process is then as follows

    -
  • set 00:00:00:00:00:00 as MACAddress
  • -
  • fire the 'COMMISSION' event. The StateStr changes to 'Commissioning'. Now you have 1 minute to perform the next step
  • -
  • on the switch itself perform an action to send the commissioning message (the exact way is to be defined, the new switches will be delivered with this possibility)
  • -
  • the MACAddressOut gives the switch's MAC address and the 'COMMISSIONED_IND' fires
  • -
  • persistently save the MAC address and loop it back to the MACAddress input

Assigning / changing the IP address

If the MAC address of the switch is known, the next step is to assign an IP address to it.

    -
  • if the switch already had an address and the State is Running, fire a 'STOP' event first and wait for 'STOP_CNF'
  • -
  • fire 'SET_IP' to set and 'ERASE_IP' to remove the IP address. The operation will be confirmed by corresponding output events
  • -
  • depending on the IP addresses and state of the operating system's ARP tables the operation can seem to time out but in fact complete successfully. When changing an already allocated IP address it is recommended to erase it first, wait several seconds and then to set it

Operation

If at the time of 'INIT' a switch with matching MAC and IP is found, the state changes to 'HasIP' and the 'CONFIGURED_IND' event fires. This event can be routed back to the 'START' event, which triggers the following

    -
  • the firmware running in the switch is checked
  • -
  • if it differs from the one present in the project, it is flashed
  • -
  • the switch is configured and provided with the current date/time
  • -
  • the current data are read
  • -
  • the 'RUNNING_IND' event fires

Now the switch can be interacted with using the ULUX_IN/ULUX_OUT function blocks.

The 'STOP' event stops the switch. This is necessary to change its IP address.

The 'RESTART' event stops the switch and then runs the sequence described for 'START'.

States

The State output presents a numerical state that can be together with 'STATE_IND' be used to perform some checks/indications in the CAT. The StateStr gives this information in a text form and the Error output contains additional information in the case of an error.

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
State and StateStr
StateStateStrMeaning
0Not initializedNo event yet
1InitializedInitialized, but switch not found (yet)
2Setting IPIn the process of setting an IP address
3Has IPMAC/IP match and found
4Checking FirmwareChecking if the firmware has to be updated
5FlashingUpdating the firmware
6Waiting for init requesttemporary stati while starting
7Waiting for init done
8Waiting for initial values
9RunningSwitch operating normally
10CommissioningWaiting for the physical action on the switch
11ErrorThe last operation ended with error

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml b/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml deleted file mode 100644 index c73457f14..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/VALFORMAT.doc.xml +++ /dev/null @@ -1,32 +0,0 @@ - -
- - - - - - - - -

This function block converts input values which can be numerical values or strings into a string, where the format is defined by a string at an extra input. The resulting string is written to the output and an output event is generated.

It is a generic block. The number of inputs can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'REQ'-Event input:

Each 'REQ'-Event reads the string form the 'FORMAT'-input and processes it. The string is parsed (which could also result in an error) and the numerical values supplied at the 'VALUEn' inputs are converted into a string according to the format-string. The result is written to the 'RESULT'-output and a 'CNF'-Event is fired.

'CNF'-Event output:

This event output is fired after every 'REQ'.

 

Functional Behavior

'FORMAT' input:

The format string definition is compatible to the one of the 'C'-language library function 'printf(format, ... )'.

The string 'FORMAT' consists of two types of items - characters that will be printed to the 'RESULT' string, and format commands that define how the other arguments ('VALUE1' ... 'VALUEn') are converted. Basically, a format string is specified which has text in it, as well as "special" characters that map to the other arguments 'VALUE1' ... 'VALUEn'.

The %s means, "insert the first argument, a string, right here." The %d indicates that the second argument (an integer) should be placed there. There are different %-codes for different variable types, as well as options to limit the length of the variables. The arguments have to be in the same order as the 'VALUE1-n' inputs are, beginning with 'VALUE1'.

    -
  • %d         type: int, output format: signed decimal integer
  • -
  • %i          type: int, output format: signed decimal integer
  • -
  • %o         type: int, output format: unsigned octal integer
  • -
  • %u         type: int, output format: unsigned decimal integer
  • -
  • %x         type: int, output format: unsigned hexadecimal integer, using "abcdef"
  • -
  • %X         type: int, output format: unsigned hexadecimal integer, using "ABCDEF"
  • -
  • %e         type: double, output format: scientific notation, with a lowercase "e"
  • -
  • %E         type: double, output format: scientific notation, with an uppercase "E"
  • -
  • %f          type: double, output format: floating point (eg: %.2f type: double, 2 digits after decimal point)
  • -
  • %s         type: string, output format: string
  • -
  • %c         type: char, output format: char
  • -
  • %%        type: char, output "%" sign

An integer placed between a % sign and the format command acts as a minimum field specifier, and pads the output with spaces or zeros to make it long enough. If zeros shall be padded, a zero should be placed before the minimum field width specifier.

example:  FORMAT := "%04X", VALUE1 :=  220 generates the following output at RESULT := "00DC"  

A precision modifier can be placed, which has different meanings depending on the format code being used. With %e, %E and %f, the precision modifier lets specify the number of decimal places desired. (eg: %10.5f will generate a floating number at least 10 digits wide, with 5 decimal places).

 

'VALUE1-n' input:

Data inputs, format selectable. The values of this inputs are passed to the 'RESULT' output accordingly with the characters and definition at input 'FORMAT'.

'RESULT' output:

Prints the string to the 'RESULT'-output according to the 'FORMAT'-input string and the values passed in 'VALUE1' ... 'VALUEn'. 

-

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml b/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml deleted file mode 100644 index 73aae6be8..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/VALSCAN.doc.xml +++ /dev/null @@ -1,30 +0,0 @@ - -
- - - - - - - - -

This function block reads values which can be numerical values or strings out of a given input string INSTR according to the specified string format FORMAT. The ´read values are provided as outputs VALUEn and an output event is generated.

It is a generic block. The number of outputs can be defined from 1 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

'REQ'-Event input:

Each 'REQ'-Event reads the input strings 'FORMAT' and 'INSTR' and processes them. The format string is parsed (which could also result in an error) and the values defined by the 'VALUEn' outputs are converted from the input string according to the format string. The resulting values are written to the 'output variables and a 'CNF'-Event is fired.

 

Functional Behavior

Reads the designated output values VALUEn from the 'INSTR' input according to the 'FORMAT' input string. The format string definition is compatible to the one of the 'C'-language library function 'scanf(format, ... )'. 

The string 'FORMAT' consists of two types of items - fill characters that may define some separators between dedicated values coded into the input string and format commands that define how the other values 'VALUE1' ... 'VALUEn') have been coded into the input string. Basically, a format string is specified which has text in it, as well as "special" characters that map to the other arguments 'VALUE1' ... 'VALUEn'.

The %s means, "read the first argument, a string, right here." The %d indicates that the second argument (an integer) should be decoded as second value. There are different %-codes for different variable types, as well as options to limit the length of the variables.

 

    -
  • %d         type: int, input format: signed decimal integer
  • -
  • %i          type: int, input format: signed decimal integer
  • -
  • %o         type: int, input format: unsigned octal integer
  • -
  • %u         type: int, input format: unsigned decimal integer
  • -
  • %x         type: int, input format: unsigned hexadecimal integer, using "abcdef"
  • -
  • %X         type: int, input format: unsigned hexadecimal integer, using "ABCDEF"
  • -
  • %e         type: double, input format: scientific notation, with a lowercase "e"
  • -
  • %E         type: double, input format: scientific notation, with an uppercase "E"
  • -
  • %f          type: double, input format: floating point (eg: %4f type: double, 4 digits altogether including the decimal point)
  • -
  • %s         type: string, input format: string
  • -
  • %c         type: char, input format: char

An integer placed between a % sign and the format command acts as a minimum field specifier.

 

example:  FORMAT := '%3d', INSTR :=  '4210' decodes the following output at VALUE1 (INT) := 421

 

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml b/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml deleted file mode 100644 index 9cc3da4f0..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/WATCHSERVER.doc.xml +++ /dev/null @@ -1,18 +0,0 @@ - -
- - - - - - - - -

This function block is used internally for accessing the watch service

-

-
-

This function block is used internally for accessing the watch service

-

- diff --git a/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml b/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml deleted file mode 100644 index 70c6086a7..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/XOR.doc.xml +++ /dev/null @@ -1,109 +0,0 @@ - -
- - - - - - - - -

This function block implements a logical eXclusive OR.

It is a generic block. The number of inputs can be chosen from 2 to 16.

(More information about generic blocks: Studio help (press F1) at Solution→Distributed PAC Project→Editors→System Editor)

-

-
-

- Temporal Behavior

Each triggered 'REQ' executes the internal logic and leads to an 'CNF'-Event.

 

Functional Behavior

Datatype BOOL for two inputs: XOR leads to output 'OUT' TRUE (1) only if one of the two inputs 'IN1' and 'IN2' is TRUE, when 'IN1' and 'IN2' have the same value (either TRUE or FALSE) the output is 'FALSE'. 

 

-

- - - - - - - - - - - - - - - - - - - - - - -
logic table
In2In1Out
000
101
011
110

 

Datatype BOOL for 'n' inputs: XOR leads to output 'OUT' TRUE (1) if an odd number of inputs 'IN1' ... 'INn' has the same state (either TRUE or FALSE). When an even number of input has the same state, the output is set to FALSE. 

 

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
In4In3In2In1Out
01001
01111
10010
11110

 

For all other possible datatypes (BYTE, WORD, DWORD, LWORD) the same functionality is applied. It performs a bitwise-exclusive-OR of the INPUTs. The result is stored into OUT.

 

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

examples for logic table

In2In1Out
000000000000
000000010001
001000000010
000100010000
001100010010
111010010111

-

- From 187cd70f99db60efc1fb78b55a07ba4ba6458a0e Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 27 Feb 2024 15:46:18 +0300 Subject: [PATCH 15/50] typo --- .../kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt index 9ec819e44..8123a1b1f 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt @@ -70,7 +70,7 @@ class NewLibraryAction : AnAction() { - dialog.title = "New Library" + dialog.title = "Library" dialog.show() if (!dialog.isOK) { return From f6ba3bead377a82b4b61ac0c24771820362e1cef Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 1 Mar 2024 12:33:15 +0300 Subject: [PATCH 16/50] Moved to anothed plugin --- .../fbme/ide/platform/ImportLibraryAction.kt | 10 ++++++ .../fbme/ide/platform}/NewLibraryAction.kt | 4 +-- .../src/main/resources/META-INF/plugin.xml | 12 +++++++ .../src/main/resources/icons/lib.svg | 0 .../org.fbme.ide.richediting.plugin.mps | 32 ++++++++++++++++++- .../src/main/resources/META-INF/plugin.xml | 5 --- 6 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt rename code/{richediting/src/main/kotlin/org/fbme/ide/richediting/actions => platform/src/main/kotlin/org/fbme/ide/platform}/NewLibraryAction.kt (98%) rename code/{richediting => platform}/src/main/resources/icons/lib.svg (100%) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt new file mode 100644 index 000000000..13553e1db --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -0,0 +1,10 @@ +package org.fbme.ide.platform + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent + +class ImportLibraryAction: AnAction() { + override fun actionPerformed(p0: AnActionEvent) { + + } +} \ No newline at end of file diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt similarity index 98% rename from code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 8123a1b1f..b452ba00e 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/actions/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.richediting.actions +package org.fbme.ide.platform import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent @@ -70,7 +70,7 @@ class NewLibraryAction : AnAction() { - dialog.title = "Library" + dialog.title = "New Library" dialog.show() if (!dialog.isOK) { return diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 505de4275..c0bfa1f61 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -26,8 +26,10 @@ + + @@ -42,4 +44,14 @@ + + + + + diff --git a/code/richediting/src/main/resources/icons/lib.svg b/code/platform/src/main/resources/icons/lib.svg similarity index 100% rename from code/richediting/src/main/resources/icons/lib.svg rename to code/platform/src/main/resources/icons/lib.svg diff --git a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps index 6a6446b37..f7e37cd49 100644 --- a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps +++ b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps @@ -3778,7 +3778,7 @@ - +
@@ -3788,5 +3788,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/richediting/src/main/resources/META-INF/plugin.xml b/code/richediting/src/main/resources/META-INF/plugin.xml index c10bc3a13..402347b18 100644 --- a/code/richediting/src/main/resources/META-INF/plugin.xml +++ b/code/richediting/src/main/resources/META-INF/plugin.xml @@ -15,11 +15,6 @@ - Date: Wed, 6 Mar 2024 17:45:08 +0300 Subject: [PATCH 17/50] Raw: import/export library actions --- .../fbme/ide/platform/ExportLibraryAction.kt | 90 +++++++++++++++++++ .../fbme/ide/platform/ImportLibraryAction.kt | 63 ++++++++++++- .../src/main/resources/META-INF/plugin.xml | 3 + 3 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt new file mode 100644 index 000000000..5a498418c --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt @@ -0,0 +1,90 @@ +package org.fbme.ide.platform + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.ui.Messages +import com.intellij.openapi.util.NlsSafe +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.project.Solution +import jetbrains.mps.vfs.IFile +import org.jetbrains.mps.openapi.module.SModule +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.io.IOException +import java.util.zip.ZipEntry +import java.util.zip.ZipOutputStream + + +class ExportLibraryAction: AnAction() { + + private fun resolveModulePath(module: SModule): String? { + require(module is Solution) { "The module is not a Solution." } + // Attempt to get the descriptor file + val descriptorFile: IFile? = module.descriptorFile + return descriptorFile?.getParent()?.path + + } + + override fun actionPerformed(e: AnActionEvent) { + val module = e.getData(MPSCommonDataKeys.CONTEXT_MODULE) ?: return + + zipModule(module, "/Users/emgariko/work/itmo/thesis/fbme_fork/" + module.moduleName) + } + + @Throws(IOException::class) + fun zipModule(module: SModule?, zipFilePath: String?) { + val modulePath = resolveModulePath(module!!) + val fos = FileOutputStream(zipFilePath) + val zipOut = ZipOutputStream(fos) + val fileToZip = File(modulePath) + zipFile(fileToZip, fileToZip.getName(), zipOut) + zipOut.close() + fos.close() + } + + @Throws(IOException::class) + private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream) { + if (!fileToZip.isDirectory()) { + zipFile(fileToZip, fileName, zipOut, "") + return + } + val children = fileToZip.listFiles() + if (children != null) { + for (childFile in children) { + zipFile(childFile, fileName + "/" + childFile.getName(), zipOut, fileName) + } + } + } + + @Throws(IOException::class) + private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream, parentDirectoryName: String) { + var fileName = fileName + if (fileToZip.isHidden()) { + return + } + if (fileToZip.isDirectory()) { + if (!fileName.endsWith("/")) { + fileName += "/" + } + if (parentDirectoryName != "") { + zipOut.putNextEntry(ZipEntry(fileName)) + zipOut.closeEntry() + } + val children = fileToZip.listFiles() + for (childFile in children) { + zipFile(childFile, fileName + childFile.getName(), zipOut, fileName) + } + return + } + val fis = FileInputStream(fileToZip) + val zipEntry = ZipEntry(fileName) + zipOut.putNextEntry(zipEntry) + val bytes = ByteArray(1024) + var length: Int + while (fis.read(bytes).also { length = it } >= 0) { + zipOut.write(bytes, 0, length) + } + fis.close() + } +} \ No newline at end of file diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 13553e1db..51f3016e5 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -2,9 +2,68 @@ package org.fbme.ide.platform import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.util.indexing.diagnostic.dump.paths.PortableFilePath.* +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil +import jetbrains.mps.kernel.model.SModelUtil +import jetbrains.mps.project.Solution +import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.project.structure.modules.SolutionDescriptor +import jetbrains.mps.smodel.SModelRepository +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.io.IOException +import java.util.zip.ZipEntry +import java.util.zip.ZipInputStream + class ImportLibraryAction: AnAction() { - override fun actionPerformed(p0: AnActionEvent) { + + override fun actionPerformed(e: AnActionEvent) { + // Get the selected zip file or provide a file chooser dialog + // For simplicity, let's assume filePath is the path to the zip file + val filePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/test.zip" + + // Specify the destination directory + val destinationDir = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" + try { + // Create destination directory if it doesn't exist + val destDir = File(destinationDir) + if (!destDir.exists()) { + destDir.mkdirs() + } + ZipInputStream(FileInputStream(filePath)).use { zipInputStream -> + // Extract each entry in the zip file + var entry: ZipEntry + while (zipInputStream.getNextEntry().also { entry = it } != null) { + val entryName = entry.name + val entryFile = File(destDir, entryName) + + // Create parent directories if they don't exist + File(entryFile.getParent()).mkdirs() + FileOutputStream(entryFile).use { fos -> + val buffer = ByteArray(1024) + var bytesRead: Int + while (zipInputStream.read(buffer).also { bytesRead = it } != -1) { + fos.write(buffer, 0, bytesRead) + } + } + + // Close the current entry + zipInputStream.closeEntry() + } + } + + // Optionally, you can print a message or log success + println("Unarchive completed successfully!") + } catch (ex: IOException) { + ex.printStackTrace() + } + + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject + + val newSolution = NewModuleUtil.createSolution("Runtime.Base1", "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions/Runtime.Base1", mpsProject) } -} \ No newline at end of file +} diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index c0bfa1f61..5de6f08e4 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -52,6 +52,9 @@ + From c90b272b521ec9f1ef18616e76122b3aed40a232 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 6 Mar 2024 18:24:00 +0300 Subject: [PATCH 18/50] Export action fix + import fix --- .../fbme/ide/platform/ExportLibraryAction.kt | 2 +- .../fbme/ide/platform/ImportLibraryAction.kt | 9 +----- .../org.fbme.ide.richediting.plugin.mps | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt index 5a498418c..8df625d3c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt @@ -29,7 +29,7 @@ class ExportLibraryAction: AnAction() { override fun actionPerformed(e: AnActionEvent) { val module = e.getData(MPSCommonDataKeys.CONTEXT_MODULE) ?: return - zipModule(module, "/Users/emgariko/work/itmo/thesis/fbme_fork/" + module.moduleName) + zipModule(module, "/Users/emgariko/work/itmo/thesis/fbme_fork/" + module.moduleName + ".zip") } @Throws(IOException::class) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 51f3016e5..53a7cd699 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -21,26 +21,21 @@ import java.util.zip.ZipInputStream class ImportLibraryAction: AnAction() { override fun actionPerformed(e: AnActionEvent) { - // Get the selected zip file or provide a file chooser dialog - // For simplicity, let's assume filePath is the path to the zip file + val filePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/test.zip" - // Specify the destination directory val destinationDir = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" try { - // Create destination directory if it doesn't exist val destDir = File(destinationDir) if (!destDir.exists()) { destDir.mkdirs() } ZipInputStream(FileInputStream(filePath)).use { zipInputStream -> - // Extract each entry in the zip file var entry: ZipEntry while (zipInputStream.getNextEntry().also { entry = it } != null) { val entryName = entry.name val entryFile = File(destDir, entryName) - // Create parent directories if they don't exist File(entryFile.getParent()).mkdirs() FileOutputStream(entryFile).use { fos -> val buffer = ByteArray(1024) @@ -50,12 +45,10 @@ class ImportLibraryAction: AnAction() { } } - // Close the current entry zipInputStream.closeEntry() } } - // Optionally, you can print a message or log success println("Unarchive completed successfully!") } catch (ex: IOException) { ex.printStackTrace() diff --git a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps index f7e37cd49..c0ed2663f 100644 --- a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps +++ b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps @@ -3818,5 +3818,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5e47fb8fe87c0d85cea48ded2892094804d85a57 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 7 Mar 2024 16:12:50 +0300 Subject: [PATCH 19/50] Import action fix --- .../fbme/ide/platform/ImportLibraryAction.kt | 115 +++++++++++++----- 1 file changed, 83 insertions(+), 32 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 53a7cd699..b73470613 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -2,61 +2,112 @@ package org.fbme.ide.platform import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.util.indexing.diagnostic.dump.paths.PortableFilePath.* import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil -import jetbrains.mps.kernel.model.SModelUtil +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.MementoImpl +import jetbrains.mps.project.ModuleId +import jetbrains.mps.project.ProjectPathUtil import jetbrains.mps.project.Solution import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor import jetbrains.mps.project.structure.modules.SolutionDescriptor -import jetbrains.mps.smodel.SModelRepository +import jetbrains.mps.smodel.GeneralModuleFactory +import jetbrains.mps.smodel.ModuleDependencyVersions +import jetbrains.mps.smodel.language.LanguageRegistry +import jetbrains.mps.vfs.IFile +import java.io.BufferedOutputStream import java.io.File import java.io.FileInputStream import java.io.FileOutputStream -import java.io.IOException -import java.util.zip.ZipEntry import java.util.zip.ZipInputStream class ImportLibraryAction: AnAction() { - override fun actionPerformed(e: AnActionEvent) { + fun unzip(zipFilePath: String, targetDirectoryPath: String) { + val buffer = ByteArray(1024) + val zipFile = File(zipFilePath) + val folder = File(targetDirectoryPath) + if (!folder.exists()) { + folder.mkdirs() + } - val filePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/test.zip" + ZipInputStream(FileInputStream(zipFile)).use { zis -> + var zipEntry = zis.nextEntry + while (zipEntry != null) { + val newFile = File(folder, zipEntry.name) + if (zipEntry.isDirectory) { + newFile.mkdirs() + } else { + File(newFile.parent).mkdirs() - val destinationDir = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" - try { - val destDir = File(destinationDir) - if (!destDir.exists()) { - destDir.mkdirs() - } - ZipInputStream(FileInputStream(filePath)).use { zipInputStream -> - var entry: ZipEntry - while (zipInputStream.getNextEntry().also { entry = it } != null) { - val entryName = entry.name - val entryFile = File(destDir, entryName) - - File(entryFile.getParent()).mkdirs() - FileOutputStream(entryFile).use { fos -> - val buffer = ByteArray(1024) - var bytesRead: Int - while (zipInputStream.read(buffer).also { bytesRead = it } != -1) { - fos.write(buffer, 0, bytesRead) + FileOutputStream(newFile).use { fos -> + var len: Int + BufferedOutputStream(fos, buffer.size).use { bos -> + while (zis.read(buffer).also { len = it } > 0) { + bos.write(buffer, 0, len) + } } } - - zipInputStream.closeEntry() } + zipEntry = zis.nextEntry } + zis.closeEntry() + } + } - println("Unarchive completed successfully!") - } catch (ex: IOException) { - ex.printStackTrace() + companion object { + private fun getModuleFile(namespace: String, rootPath: IFile, extension: String): IFile { + return rootPath.findChild(namespace + extension) } + private fun createNewSolutionDescriptor(namespace: String, descriptorFile: IFile): SolutionDescriptor { + val descriptor = SolutionDescriptor() + descriptor.namespace = namespace + descriptor.id = ModuleId.regular() + val moduleLocation = descriptorFile.parent + val modelsDir = moduleLocation!!.findChild("models") + + modelsDir.mkdirs() + descriptor.modelRootDescriptors.add( + DefaultModelRoot.createDescriptor( + modelsDir.parent!!, + *arrayOf(modelsDir) + ) + ) + descriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("java", MementoImpl())) + ProjectPathUtil.setGeneratorOutputPath(descriptor, moduleLocation!!.findChild("source_gen").path) + return descriptor + } + } + + override fun actionPerformed(e: AnActionEvent) { + val zipFilePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/Runtime.Base1.zip" + val targetDirectoryPath = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" + + unzip(zipFilePath, targetDirectoryPath) + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject - val newSolution = NewModuleUtil.createSolution("Runtime.Base1", "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions/Runtime.Base1", mpsProject) - +// val newSolution = NewModuleUtil.createSolution("Runtime.Base1", "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions/Runtime.Base1", mpsProject) + + val namespace = "Runtime.Base1" + + val descriptorFile = getModuleFile(namespace, + mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), + ".msd") + + val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) + val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution + mpsProject.addModule(module) + ModuleDependencyVersions( + (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, + mpsProject.getRepository() + ).update(module) + module.save() +// return module + + println("Created?") } } From 0671ccc78d54114eb5d9465a3d259efb82986425 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 7 Mar 2024 16:51:06 +0300 Subject: [PATCH 20/50] Raw import action implementation --- .../fbme/ide/platform/ExportLibraryAction.kt | 4 ++ .../fbme/ide/platform/ImportLibraryAction.kt | 39 +++++++++++-------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt index 8df625d3c..f91539940 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt @@ -29,6 +29,10 @@ class ExportLibraryAction: AnAction() { override fun actionPerformed(e: AnActionEvent) { val module = e.getData(MPSCommonDataKeys.CONTEXT_MODULE) ?: return + // TODO: (SEE the same note at the ImportLIbraryAction.kt + // consider rename solution or it's id in .mds or header file in order to avoid id conflicts + // while importing exported library + zipModule(module, "/Users/emgariko/work/itmo/thesis/fbme_fork/" + module.moduleName + ".zip") } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index b73470613..510467a00 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -6,10 +6,7 @@ import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.persistence.DefaultModelRoot import jetbrains.mps.persistence.MementoImpl -import jetbrains.mps.project.ModuleId -import jetbrains.mps.project.ProjectPathUtil -import jetbrains.mps.project.Solution -import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.project.* import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor import jetbrains.mps.project.structure.modules.SolutionDescriptor import jetbrains.mps.smodel.GeneralModuleFactory @@ -83,6 +80,9 @@ class ImportLibraryAction: AnAction() { } override fun actionPerformed(e: AnActionEvent) { + // TODO: (SEE the same note at the ExportLIbraryAction.kt + // consider rename solution or it's id in .mds or header file in order to avoid id conflicts + val zipFilePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/Runtime.Base1.zip" val targetDirectoryPath = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" @@ -94,18 +94,25 @@ class ImportLibraryAction: AnAction() { val namespace = "Runtime.Base1" - val descriptorFile = getModuleFile(namespace, - mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), - ".msd") - - val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) - val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution - mpsProject.addModule(module) - ModuleDependencyVersions( - (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, - mpsProject.getRepository() - ).update(module) - module.save() + mpsProject.modelAccess.runWriteAction { +// TODO: are there any issues with specific model(how do IEC61499 model gets loaded?) + + val descriptorFile = getModuleFile(namespace, + mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), + ".msd") + +// NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in +// .msd file + val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) + val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution + mpsProject.addModule(module) + ModuleDependencyVersions( + (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, + mpsProject.getRepository() + ).update(module) + module.save() + } + // return module println("Created?") From df68a44c00c726a789d66d3c9fedd01d0ada129c Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 8 Mar 2024 17:48:10 +0300 Subject: [PATCH 21/50] Import/export action: dialog with FileChooser and some refactoring --- .../fbme/ide/platform/ExportLibraryAction.kt | 5 +- .../fbme/ide/platform/ImportLibraryAction.kt | 138 +++++++++++------- 2 files changed, 89 insertions(+), 54 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt index f91539940..3d32bb53c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt @@ -33,7 +33,10 @@ class ExportLibraryAction: AnAction() { // consider rename solution or it's id in .mds or header file in order to avoid id conflicts // while importing exported library - zipModule(module, "/Users/emgariko/work/itmo/thesis/fbme_fork/" + module.moduleName + ".zip") + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) + val ideaProject = mpsProject!!.project + val targetDir = ideaProject.basePath + zipModule(module, targetDir + "/" + module.moduleName + ".zip") } @Throws(IOException::class) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 510467a00..4a170a536 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -2,11 +2,17 @@ package org.fbme.ide.platform import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.TextFieldWithBrowseButton +import com.intellij.openapi.ui.VerticalFlowLayout import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.persistence.DefaultModelRoot import jetbrains.mps.persistence.MementoImpl -import jetbrains.mps.project.* +import jetbrains.mps.project.ModuleId +import jetbrains.mps.project.ProjectPathUtil +import jetbrains.mps.project.Solution +import jetbrains.mps.project.StandaloneMPSProject import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor import jetbrains.mps.project.structure.modules.SolutionDescriptor import jetbrains.mps.smodel.GeneralModuleFactory @@ -18,43 +24,46 @@ import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.util.zip.ZipInputStream +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel class ImportLibraryAction: AnAction() { - fun unzip(zipFilePath: String, targetDirectoryPath: String) { - val buffer = ByteArray(1024) - val zipFile = File(zipFilePath) - val folder = File(targetDirectoryPath) - if (!folder.exists()) { - folder.mkdirs() - } + companion object { + fun unzip(zipFilePath: String, targetDirectoryPath: String) { + val buffer = ByteArray(1024) + val zipFile = File(zipFilePath) + val folder = File(targetDirectoryPath) + if (!folder.exists()) { + folder.mkdirs() + } - ZipInputStream(FileInputStream(zipFile)).use { zis -> - var zipEntry = zis.nextEntry - while (zipEntry != null) { - val newFile = File(folder, zipEntry.name) - if (zipEntry.isDirectory) { - newFile.mkdirs() - } else { - File(newFile.parent).mkdirs() - - FileOutputStream(newFile).use { fos -> - var len: Int - BufferedOutputStream(fos, buffer.size).use { bos -> - while (zis.read(buffer).also { len = it } > 0) { - bos.write(buffer, 0, len) + ZipInputStream(FileInputStream(zipFile)).use { zis -> + var zipEntry = zis.nextEntry + while (zipEntry != null) { + val newFile = File(folder, zipEntry.name) + if (zipEntry.isDirectory) { + newFile.mkdirs() + } else { + File(newFile.parent).mkdirs() + + FileOutputStream(newFile).use { fos -> + var len: Int + BufferedOutputStream(fos, buffer.size).use { bos -> + while (zis.read(buffer).also { len = it } > 0) { + bos.write(buffer, 0, len) + } } } } + zipEntry = zis.nextEntry } - zipEntry = zis.nextEntry + zis.closeEntry() } - zis.closeEntry() } - } - companion object { private fun getModuleFile(namespace: String, rootPath: IFile, extension: String): IFile { return rootPath.findChild(namespace + extension) } @@ -77,44 +86,67 @@ class ImportLibraryAction: AnAction() { ProjectPathUtil.setGeneratorOutputPath(descriptor, moduleLocation!!.findChild("source_gen").path) return descriptor } - } - override fun actionPerformed(e: AnActionEvent) { - // TODO: (SEE the same note at the ExportLIbraryAction.kt - // consider rename solution or it's id in .mds or header file in order to avoid id conflicts - - val zipFilePath = "/Users/emgariko/work/itmo/thesis/fbme_fork/Runtime.Base1.zip" - val targetDirectoryPath = "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions" + private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject - unzip(zipFilePath, targetDirectoryPath) + val zipFilePath = filePath + val targetDirectoryPath = mpsProject.project.basePath + "/solutions" - val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject + unzip(zipFilePath, targetDirectoryPath) -// val newSolution = NewModuleUtil.createSolution("Runtime.Base1", "/Users/emgariko/work/itmo/thesis/fbme_fork/solutions/Runtime.Base1", mpsProject) + val namespace = "Runtime.Base1" - val namespace = "Runtime.Base1" - - mpsProject.modelAccess.runWriteAction { + mpsProject.modelAccess.runWriteAction { // TODO: are there any issues with specific model(how do IEC61499 model gets loaded?) - val descriptorFile = getModuleFile(namespace, - mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), - ".msd") + val descriptorFile = getModuleFile(namespace, + mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), + ".msd") // NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in // .msd file - val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) - val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution - mpsProject.addModule(module) - ModuleDependencyVersions( - (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, - mpsProject.getRepository() - ).update(module) - module.save() - } + val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) + val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution + mpsProject.addModule(module) + ModuleDependencyVersions( + (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, + mpsProject.getRepository() + ).update(module) + module.save() + } // return module - println("Created?") + println("Created?") + } + } + + override fun actionPerformed(e: AnActionEvent) { + // TODO: (SEE the same note at the ExportLIbraryAction.kt + // consider rename solution or it's id in .mds or header file in order to avoid id conflicts + val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() + val textFieldWithBrowseButton = TextFieldWithBrowseButton() + textFieldWithBrowseButton.addBrowseFolderListener("Select Archive", null, null, fileChooserDescriptor) + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Select Archive:")) + panel.add(textFieldWithBrowseButton) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = "Import Library" + } + + override fun createCenterPanel(): JComponent? { + return panel + } + } + + if (dialogWrapper.showAndGet()) { + val filePath = textFieldWithBrowseButton.text + handleSelectedFilePath(filePath, e) + } } } From a1be9708a41e9f238ecb27a980ccb3dd73d5bc59 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sun, 10 Mar 2024 17:06:26 +0300 Subject: [PATCH 22/50] Import action small fix --- .../kotlin/org/fbme/ide/platform/ImportLibraryAction.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 4a170a536..7ce43b971 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -88,6 +88,8 @@ class ImportLibraryAction: AnAction() { } private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { + val moduleName = filePath.split("/").last().split(".").first() + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject val zipFilePath = filePath @@ -95,13 +97,13 @@ class ImportLibraryAction: AnAction() { unzip(zipFilePath, targetDirectoryPath) - val namespace = "Runtime.Base1" + val namespace = moduleName mpsProject.modelAccess.runWriteAction { // TODO: are there any issues with specific model(how do IEC61499 model gets loaded?) val descriptorFile = getModuleFile(namespace, - mpsProject.getFileSystem().getFile(targetDirectoryPath + "/Runtime.Base1"), + mpsProject.getFileSystem().getFile(targetDirectoryPath + "/" + moduleName), ".msd") // NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in From b62eb79bbab489f12b8043afefbf66f4d2a16c62 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sun, 10 Mar 2024 17:54:08 +0300 Subject: [PATCH 23/50] Import action small fix --- .../src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 7ce43b971..13256d927 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -88,6 +88,7 @@ class ImportLibraryAction: AnAction() { } private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { +// :TODO: get module name from it's descriptor file val moduleName = filePath.split("/").last().split(".").first() val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject From e3fa82f330fcad6fd51f043cd8cbef4ed5397f1e Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sun, 10 Mar 2024 18:10:13 +0300 Subject: [PATCH 24/50] Import action small fix --- .../main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 13256d927..8d16a5b9c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -89,7 +89,8 @@ class ImportLibraryAction: AnAction() { private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { // :TODO: get module name from it's descriptor file - val moduleName = filePath.split("/").last().split(".").first() +// path/to/archive/weird_name.zip + val moduleName = filePath.split("/").last().dropLast(4) val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject @@ -121,6 +122,8 @@ class ImportLibraryAction: AnAction() { // return module + // TODO: add as a dependency + println("Created?") } } From c1288a832ef85b34f10464709debc955a690218f Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 27 Mar 2024 18:59:47 +0300 Subject: [PATCH 25/50] Fixed module id mismatch --- .../fbme/ide/platform/ImportLibraryAction.kt | 30 +++++++++++++++++-- .../org/fbme/ide/platform/NewLibraryAction.kt | 2 ++ .../src/main/resources/META-INF/plugin.xml | 1 - 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt index 8d16a5b9c..082b98cd7 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt @@ -19,6 +19,11 @@ import jetbrains.mps.smodel.GeneralModuleFactory import jetbrains.mps.smodel.ModuleDependencyVersions import jetbrains.mps.smodel.language.LanguageRegistry import jetbrains.mps.vfs.IFile +import org.jdom.Document +import org.jdom.Element +import org.jdom.input.SAXBuilder +import org.jdom.output.Format +import org.jdom.output.XMLOutputter import java.io.BufferedOutputStream import java.io.File import java.io.FileInputStream @@ -64,14 +69,31 @@ class ImportLibraryAction: AnAction() { } } + private fun overrideModuleId(id: String, filePath: String) { + try { + val saxBuilder = SAXBuilder() + val document: Document = saxBuilder.build(File(filePath)) + val rootNode: Element = document.rootElement + + rootNode.setAttribute("uuid", id) + + val xmlOutputter = XMLOutputter(Format.getPrettyFormat()) + FileOutputStream(filePath).use { output -> + xmlOutputter.output(document, output) + } + } catch (e: Exception) { + e.printStackTrace() + } + } + private fun getModuleFile(namespace: String, rootPath: IFile, extension: String): IFile { return rootPath.findChild(namespace + extension) } - private fun createNewSolutionDescriptor(namespace: String, descriptorFile: IFile): SolutionDescriptor { + private fun createNewSolutionDescriptor(id: ModuleId, namespace: String, descriptorFile: IFile): SolutionDescriptor { val descriptor = SolutionDescriptor() descriptor.namespace = namespace - descriptor.id = ModuleId.regular() + descriptor.id = id val moduleLocation = descriptorFile.parent val modelsDir = moduleLocation!!.findChild("models") @@ -98,6 +120,8 @@ class ImportLibraryAction: AnAction() { val targetDirectoryPath = mpsProject.project.basePath + "/solutions" unzip(zipFilePath, targetDirectoryPath) + val id = ModuleId.regular() + overrideModuleId(id.toString(), filePath) val namespace = moduleName @@ -110,7 +134,7 @@ class ImportLibraryAction: AnAction() { // NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in // .msd file - val descriptor = createNewSolutionDescriptor(namespace, descriptorFile) + val descriptor = createNewSolutionDescriptor(id, namespace, descriptorFile) val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution mpsProject.addModule(module) ModuleDependencyVersions( diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index b452ba00e..5bac07b1c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -40,6 +40,7 @@ class NewLibraryAction : AnAction() { dialog.withFactory { val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) + val root = result.modelRoots.iterator().next() as DefaultModelRoot model = try { val fullModelName = "NewLibrary@content" @@ -47,6 +48,7 @@ class NewLibraryAction : AnAction() { } catch (e: ModelCannotBeCreatedException) { throw RuntimeException("Model can not be created", e) } + val repository = PlatformRepositoryProvider.getInstance(mpsProject) val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) mpsProject.repository.modelAccess.runReadInEDT { diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 5de6f08e4..2418feda9 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -26,7 +26,6 @@ - From 916c53f10b2e39cb8097815452022e4df05df4ef Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 28 Mar 2024 16:37:16 +0300 Subject: [PATCH 26/50] Trying to crerate custom facet --- .../org/fbme/ide/platform}/CustomFacet.java | 2 +- .../fbme/ide/platform}/CustomFacetFactory.java | 4 +++- .../org/fbme/ide/platform/NewLibraryAction.kt | 17 ++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) rename code/{richediting/src/main/kotlin/org/fbme/ide/richediting => platform/src/main/kotlin/org/fbme/ide/platform}/CustomFacet.java (91%) rename code/{richediting/src/main/kotlin/org/fbme/ide/richediting => platform/src/main/kotlin/org/fbme/ide/platform}/CustomFacetFactory.java (84%) diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java similarity index 91% rename from code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java rename to code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java index 11a1ddd64..a5679b2b3 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacet.java +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java @@ -1,4 +1,4 @@ -package org.fbme.ide.richediting; +package org.fbme.ide.platform; import jetbrains.mps.extapi.module.ModuleFacetBase; import org.jetbrains.annotations.NotNull; diff --git a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java similarity index 84% rename from code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java rename to code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java index 44c68a096..b6b95b97c 100644 --- a/code/richediting/src/main/kotlin/org/fbme/ide/richediting/CustomFacetFactory.java +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java @@ -1,4 +1,4 @@ -package org.fbme.ide.richediting; +package org.fbme.ide.platform; import org.jetbrains.annotations.NotNull; import org.jetbrains.mps.openapi.module.FacetsFacade; @@ -21,4 +21,6 @@ public SModuleFacet create(@NotNull SModule sModule) { public String getPresentation() { return "Library"; } + + public static CustomFacetFactory CUSTOM_FACET_FACTORY = new CustomFacetFactory(); } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 5bac07b1c..5ddc0579b 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -2,6 +2,7 @@ package org.fbme.ide.platform import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import jetbrains.mps.extapi.module.FacetsRegistry import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.ide.projectPane.ProjectPane @@ -51,20 +52,22 @@ class NewLibraryAction : AnAction() { val repository = PlatformRepositoryProvider.getInstance(mpsProject) val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) + mpsProject.repository.modelAccess.runReadInEDT { val navigationSupport = NavigationSupport.getInstance() navigationSupport.openNode(mpsProject, initialElement.node, true, false) navigationSupport.selectInTree(mpsProject, initialElement.node, false) } -// NOTE: companion object with JVMStatic field turns off the new lib button for some reason -// if (FacetsFacade.getInstance().getFacetFactory("library") == null) { -// FacetsFacade.getInstance().addFactory("library", customFacetFactory) -// } + val facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY + + val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) + if (facetsRegistry.getFacetFactory("library") == null) { + facetsRegistry.addFactory("library", facetFactory) + } -// val facetFactory = FacetsRegistry.getInstance().getFacetFactory("library") -// val libFacet = facetFactory!!.create(result) -// result.moduleDescriptor.addFacetDescriptor(libFacet) + val libFacet = facetFactory.create(result) + result.moduleDescriptor.addFacetDescriptor(libFacet) mpsProject.save() result From 0902d6526f92a7529f32478b9242d5bfaa70b762 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 29 Mar 2024 13:28:20 +0300 Subject: [PATCH 27/50] Successfully registered custom facet factory --- .../org/fbme/ide/platform/CustomFacet.java | 14 ---------- .../org/fbme/ide/platform/CustomFacet.kt | 10 +++++++ .../fbme/ide/platform/CustomFacetFactory.java | 26 ------------------- .../fbme/ide/platform/CustomFacetFactory.kt | 23 ++++++++++++++++ .../org/fbme/ide/platform/NewLibraryAction.kt | 12 ++++++--- 5 files changed, 42 insertions(+), 43 deletions(-) delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java deleted file mode 100644 index a5679b2b3..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.fbme.ide.platform; - -import jetbrains.mps.extapi.module.ModuleFacetBase; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.mps.openapi.module.SModule; - -public class CustomFacet extends ModuleFacetBase { - - private static final String FACET_TYPE = "library"; - - protected CustomFacet(@NotNull SModule module) { - super(FACET_TYPE, module); - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt new file mode 100644 index 000000000..e12e533da --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt @@ -0,0 +1,10 @@ +package org.fbme.ide.platform + +import jetbrains.mps.extapi.module.ModuleFacetBase +import org.jetbrains.mps.openapi.module.SModule + +class CustomFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { + companion object { + private const val FACET_TYPE = "library" + } +} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java deleted file mode 100644 index b6b95b97c..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.fbme.ide.platform; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.mps.openapi.module.FacetsFacade; -import org.jetbrains.mps.openapi.module.SModule; -import org.jetbrains.mps.openapi.module.SModuleFacet; - -public class CustomFacetFactory implements FacetsFacade.FacetFactory { - @Override - public boolean isApplicable(@NotNull SModule module) { - return FacetsFacade.FacetFactory.super.isApplicable(module); - } - - @Override - public SModuleFacet create(@NotNull SModule sModule) { - return new CustomFacet(sModule); - } - - @NotNull - @Override - public String getPresentation() { - return "Library"; - } - - public static CustomFacetFactory CUSTOM_FACET_FACTORY = new CustomFacetFactory(); -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt new file mode 100644 index 000000000..ad979fb42 --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt @@ -0,0 +1,23 @@ +package org.fbme.ide.platform + +import org.jetbrains.mps.openapi.module.FacetsFacade.FacetFactory +import org.jetbrains.mps.openapi.module.SModule +import org.jetbrains.mps.openapi.module.SModuleFacet + +class CustomFacetFactory : FacetFactory { + override fun isApplicable(module: SModule): Boolean { + return super.isApplicable(module) + } + + override fun create(sModule: SModule): SModuleFacet { + return CustomFacet(sModule) + } + + override fun getPresentation(): String { + return "Library" + } + + companion object { + var CUSTOM_FACET_FACTORY = CustomFacetFactory() + } +} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 5ddc0579b..c71c8a425 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -59,14 +59,20 @@ class NewLibraryAction : AnAction() { navigationSupport.selectInTree(mpsProject, initialElement.node, false) } - val facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY + var facetFactory: CustomFacetFactory? = null + try { + facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY + } catch (e: Throwable) { + println(e.stackTrace) + println(e.message) + } val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) if (facetsRegistry.getFacetFactory("library") == null) { - facetsRegistry.addFactory("library", facetFactory) + facetsRegistry.addFactory("library", facetFactory!!) } - val libFacet = facetFactory.create(result) + val libFacet = facetFactory!!.create(result) result.moduleDescriptor.addFacetDescriptor(libFacet) mpsProject.save() From 6a8dc4fcf235b867e51eff45eb3e1333fff84cf6 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 29 Mar 2024 16:42:02 +0300 Subject: [PATCH 28/50] Small fix --- .../src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index c71c8a425..d0146d306 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -10,10 +10,12 @@ import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog import jetbrains.mps.openapi.navigation.NavigationSupport import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.MementoImpl import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.MPSExtentions import jetbrains.mps.project.ModelImporter import jetbrains.mps.project.Solution +import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.projectWizard.LibraryTemplate @@ -74,6 +76,8 @@ class NewLibraryAction : AnAction() { val libFacet = facetFactory!!.create(result) result.moduleDescriptor.addFacetDescriptor(libFacet) +// result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) + result.save() mpsProject.save() result From 539562524ed443f5572f57fd3ee73715c2b75a51 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sat, 30 Mar 2024 14:36:02 +0300 Subject: [PATCH 29/50] . --- .../org/fbme/ide/platform/NewLibraryAction.kt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index d0146d306..014311362 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -61,20 +61,15 @@ class NewLibraryAction : AnAction() { navigationSupport.selectInTree(mpsProject, initialElement.node, false) } - var facetFactory: CustomFacetFactory? = null - try { - facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY - } catch (e: Throwable) { - println(e.stackTrace) - println(e.message) - } + var facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY +// TODO: add factory at the FBME start val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) if (facetsRegistry.getFacetFactory("library") == null) { - facetsRegistry.addFactory("library", facetFactory!!) + facetsRegistry.addFactory("library", facetFactory) } - val libFacet = facetFactory!!.create(result) + val libFacet = facetFactory.create(result) result.moduleDescriptor.addFacetDescriptor(libFacet) // result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) result.save() From 8b0b4d371f9abd0bf699005e478066efb47341e7 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sat, 30 Mar 2024 14:44:44 +0300 Subject: [PATCH 30/50] . --- .../main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt index ad979fb42..57749cb5c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt @@ -5,9 +5,6 @@ import org.jetbrains.mps.openapi.module.SModule import org.jetbrains.mps.openapi.module.SModuleFacet class CustomFacetFactory : FacetFactory { - override fun isApplicable(module: SModule): Boolean { - return super.isApplicable(module) - } override fun create(sModule: SModule): SModuleFacet { return CustomFacet(sModule) From 4863da3427dd0b76f9fc31f1ec437b81f5288ac5 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sat, 30 Mar 2024 16:51:29 +0300 Subject: [PATCH 31/50] . --- .../src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 014311362..550c5c16e 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -61,7 +61,7 @@ class NewLibraryAction : AnAction() { navigationSupport.selectInTree(mpsProject, initialElement.node, false) } - var facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY + val facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY // TODO: add factory at the FBME start val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) @@ -72,9 +72,9 @@ class NewLibraryAction : AnAction() { val libFacet = facetFactory.create(result) result.moduleDescriptor.addFacetDescriptor(libFacet) // result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) + result.setModuleDescriptor(result.moduleDescriptor, true) result.save() - mpsProject.save() result } From 1a628ce97824987f7dea4e634f32aa4d55a631d8 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 2 Apr 2024 15:46:36 +0300 Subject: [PATCH 32/50] Trying to create FacetTab --- .../src/main/kotlin/CustomFacetTab.kt | 24 +++++++++++++++++++ .../org/fbme/ide/platform/CustomFacet.kt | 2 ++ .../ide/platform/CustomFacetTabFactory.kt | 13 ++++++++++ .../src/main/resources/META-INF/plugin.xml | 3 +++ 4 files changed, 42 insertions(+) create mode 100644 code/platform/src/main/kotlin/CustomFacetTab.kt create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt diff --git a/code/platform/src/main/kotlin/CustomFacetTab.kt b/code/platform/src/main/kotlin/CustomFacetTab.kt new file mode 100644 index 000000000..794c133b8 --- /dev/null +++ b/code/platform/src/main/kotlin/CustomFacetTab.kt @@ -0,0 +1,24 @@ +package org.fbme.ide.platform + +import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab +import org.jetbrains.mps.openapi.module.SModuleFacet +import org.jetbrains.mps.openapi.ui.persistence.FacetTab + +class CustomFacetTab(moduleFacet: CustomFacet): BaseTab(), FacetTab { + override fun init() { + TODO("Not yet implemented") + } + + override fun isModified(): Boolean { + TODO("Not yet implemented") + } + + override fun apply() { + TODO("Not yet implemented") + } + + override fun getFacet(): SModuleFacet { + TODO("Not yet implemented") + } + +} \ No newline at end of file diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt index e12e533da..1994f1a06 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt @@ -7,4 +7,6 @@ class CustomFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { companion object { private const val FACET_TYPE = "library" } + + } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt new file mode 100644 index 000000000..3a3feefb5 --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt @@ -0,0 +1,13 @@ +package org.fbme.ide.platform + +import jetbrains.mps.ide.java.ui.JavaModuleFacetTab +import jetbrains.mps.project.facets.JavaModuleFacetImpl +import org.jetbrains.mps.openapi.ui.persistence.FacetTab +import org.jetbrains.mps.openapi.ui.persistence.TabFactory + + +class CustomFacetTabFactory : TabFactory { + override fun getTab(moduleFacet: CustomFacet?): FacetTab { + return CustomFacetTab(moduleFacet!!) + } +} diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 2418feda9..181e986fc 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -16,12 +16,14 @@ + + @@ -30,6 +32,7 @@ + Date: Tue, 2 Apr 2024 23:48:04 +0300 Subject: [PATCH 33/50] Simple FacetTab --- .../src/main/kotlin/CustomFacetTab.kt | 69 ++++++++++++++++++- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/code/platform/src/main/kotlin/CustomFacetTab.kt b/code/platform/src/main/kotlin/CustomFacetTab.kt index 794c133b8..85107c510 100644 --- a/code/platform/src/main/kotlin/CustomFacetTab.kt +++ b/code/platform/src/main/kotlin/CustomFacetTab.kt @@ -1,12 +1,75 @@ package org.fbme.ide.platform +import com.intellij.ui.components.JBLabel +import com.intellij.uiDesigner.core.GridConstraints +import com.intellij.uiDesigner.core.GridLayoutManager +import com.intellij.util.ui.JBInsets +import com.intellij.util.ui.JBUI import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab import org.jetbrains.mps.openapi.module.SModuleFacet import org.jetbrains.mps.openapi.ui.persistence.FacetTab +import java.awt.Dimension +import javax.swing.JPanel +import javax.swing.JTextField + +class CustomFacetTab(val moduleFacet: CustomFacet): BaseTab(), FacetTab { + private var myTextField: JTextField? = null -class CustomFacetTab(moduleFacet: CustomFacet): BaseTab(), FacetTab { override fun init() { - TODO("Not yet implemented") + val content = JPanel() + content.setLayout(GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1)) + + val label = JBLabel("Plugin ID:") + content.add( + label, GridConstraints( + 0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false + ) + ) + + myTextField = JTextField("ID") + myTextField!!.isEditable = false + + content.add( + myTextField, GridConstraints( + 0, + 1, + 1, + 1, + GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, + null, + null, + null, + 0, + false + ) + ) + + val outerPanel = JPanel() + outerPanel.setLayout(GridLayoutManager(1, 1, JBInsets(10, 10, 10, 10), -1, -1)) + outerPanel.add( + content, + GridConstraints( + 0, + 0, + 1, + 1, + GridConstraints.ANCHOR_NORTHWEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, + null, + Dimension(150, -1), + null, + 0, + false + ) + ) + + tabComponent = outerPanel } override fun isModified(): Boolean { @@ -18,7 +81,7 @@ class CustomFacetTab(moduleFacet: CustomFacet): BaseTab(), FacetTab { } override fun getFacet(): SModuleFacet { - TODO("Not yet implemented") + return moduleFacet } } \ No newline at end of file From 7c1a41cf27c16897baf17f733c333ffaa9791c26 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 3 Apr 2024 14:50:17 +0300 Subject: [PATCH 34/50] Renamed Facet classes --- .../segments/Ethernet.seg | 7 --- .../ide/platform/CustomFacetTabFactory.kt | 13 ---- .../{CustomFacet.kt => LibraryFacet.kt} | 3 +- ...FacetFactory.kt => LibraryFacetFactory.kt} | 6 +- .../fbme/ide/platform/LibraryFacetTab.kt} | 5 +- .../ide/platform/LibraryFacetTabFactory.kt | 12 ++++ .../org/fbme/ide/platform/NewLibraryAction.kt | 4 +- .../NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt | 57 ------------------ .../NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt | 33 ----------- .../NewLibrary/LINKPUBLISHER_32_0_8_0.fbt | 59 ------------------- 10 files changed, 21 insertions(+), 178 deletions(-) delete mode 100644 code/4diac-integration/solutions/stdlib/models/iec61499.4diac.stdlib/segments/Ethernet.seg delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt rename code/platform/src/main/kotlin/org/fbme/ide/platform/{CustomFacet.kt => LibraryFacet.kt} (73%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{CustomFacetFactory.kt => LibraryFacetFactory.kt} (73%) rename code/platform/src/main/kotlin/{CustomFacetTab.kt => org/fbme/ide/platform/LibraryFacetTab.kt} (93%) create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt delete mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt delete mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt delete mode 100644 solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt diff --git a/code/4diac-integration/solutions/stdlib/models/iec61499.4diac.stdlib/segments/Ethernet.seg b/code/4diac-integration/solutions/stdlib/models/iec61499.4diac.stdlib/segments/Ethernet.seg deleted file mode 100644 index 9e6a3ba5c..000000000 --- a/code/4diac-integration/solutions/stdlib/models/iec61499.4diac.stdlib/segments/Ethernet.seg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt deleted file mode 100644 index 3a3feefb5..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetTabFactory.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.fbme.ide.platform - -import jetbrains.mps.ide.java.ui.JavaModuleFacetTab -import jetbrains.mps.project.facets.JavaModuleFacetImpl -import org.jetbrains.mps.openapi.ui.persistence.FacetTab -import org.jetbrains.mps.openapi.ui.persistence.TabFactory - - -class CustomFacetTabFactory : TabFactory { - override fun getTab(moduleFacet: CustomFacet?): FacetTab { - return CustomFacetTab(moduleFacet!!) - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt similarity index 73% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt index 1994f1a06..96da0c4ab 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacet.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt @@ -3,10 +3,11 @@ package org.fbme.ide.platform import jetbrains.mps.extapi.module.ModuleFacetBase import org.jetbrains.mps.openapi.module.SModule -class CustomFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { +class LibraryFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { companion object { private const val FACET_TYPE = "library" } + } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt similarity index 73% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt index 57749cb5c..504a6ed7c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/CustomFacetFactory.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt @@ -4,10 +4,10 @@ import org.jetbrains.mps.openapi.module.FacetsFacade.FacetFactory import org.jetbrains.mps.openapi.module.SModule import org.jetbrains.mps.openapi.module.SModuleFacet -class CustomFacetFactory : FacetFactory { +class LibraryFacetFactory : FacetFactory { override fun create(sModule: SModule): SModuleFacet { - return CustomFacet(sModule) + return LibraryFacet(sModule) } override fun getPresentation(): String { @@ -15,6 +15,6 @@ class CustomFacetFactory : FacetFactory { } companion object { - var CUSTOM_FACET_FACTORY = CustomFacetFactory() + var CUSTOM_FACET_FACTORY = LibraryFacetFactory() } } diff --git a/code/platform/src/main/kotlin/CustomFacetTab.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt similarity index 93% rename from code/platform/src/main/kotlin/CustomFacetTab.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt index 85107c510..97a53f84f 100644 --- a/code/platform/src/main/kotlin/CustomFacetTab.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.org.fbme.ide.platform import com.intellij.ui.components.JBLabel import com.intellij.uiDesigner.core.GridConstraints @@ -6,13 +6,14 @@ import com.intellij.uiDesigner.core.GridLayoutManager import com.intellij.util.ui.JBInsets import com.intellij.util.ui.JBUI import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab +import org.fbme.ide.platform.LibraryFacet import org.jetbrains.mps.openapi.module.SModuleFacet import org.jetbrains.mps.openapi.ui.persistence.FacetTab import java.awt.Dimension import javax.swing.JPanel import javax.swing.JTextField -class CustomFacetTab(val moduleFacet: CustomFacet): BaseTab(), FacetTab { +class LibraryFacetTab(val moduleFacet: LibraryFacet): BaseTab(), FacetTab { private var myTextField: JTextField? = null override fun init() { diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt new file mode 100644 index 000000000..15bc4f408 --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt @@ -0,0 +1,12 @@ +package org.fbme.ide.platform + +import org.fbme.ide.platform.org.fbme.ide.platform.CustomFacetTab +import org.jetbrains.mps.openapi.ui.persistence.FacetTab +import org.jetbrains.mps.openapi.ui.persistence.TabFactory + + +class LibraryFacetTabFactory : TabFactory { + override fun getTab(moduleFacet: LibraryFacet?): FacetTab { + return CustomFacetTab(moduleFacet!!) + } +} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 550c5c16e..62b4a4cac 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -10,12 +10,10 @@ import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog import jetbrains.mps.openapi.navigation.NavigationSupport import jetbrains.mps.persistence.DefaultModelRoot -import jetbrains.mps.persistence.MementoImpl import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.MPSExtentions import jetbrains.mps.project.ModelImporter import jetbrains.mps.project.Solution -import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.projectWizard.LibraryTemplate @@ -61,7 +59,7 @@ class NewLibraryAction : AnAction() { navigationSupport.selectInTree(mpsProject, initialElement.node, false) } - val facetFactory = CustomFacetFactory.CUSTOM_FACET_FACTORY + val facetFactory = LibraryFacetFactory.CUSTOM_FACET_FACTORY // TODO: add factory at the FBME start val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt deleted file mode 100644 index 38f01e9a1..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/LINKDATARECEIVER_0_32_0_0.fbt +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt deleted file mode 100644 index 533ec2e07..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/LINKEVENTRECEIVER_0_0_0_8.fbt +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt b/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt deleted file mode 100644 index 1b9c5f5ed..000000000 --- a/solutions/Runtime.Base/models/NewLibrary/LINKPUBLISHER_32_0_8_0.fbt +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 74266182f330a728140c524df65e5374c25e6470 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 8 Apr 2024 13:06:32 +0300 Subject: [PATCH 35/50] Refactored LibraryFacetTab class name --- .../kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt index 15bc4f408..1cb09d621 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt @@ -1,12 +1,12 @@ package org.fbme.ide.platform -import org.fbme.ide.platform.org.fbme.ide.platform.CustomFacetTab +import org.fbme.ide.platform.org.fbme.ide.platform.LibraryFacetTab import org.jetbrains.mps.openapi.ui.persistence.FacetTab import org.jetbrains.mps.openapi.ui.persistence.TabFactory class LibraryFacetTabFactory : TabFactory { override fun getTab(moduleFacet: LibraryFacet?): FacetTab { - return CustomFacetTab(moduleFacet!!) + return LibraryFacetTab(moduleFacet!!) } } From 93d66cd56b3046db0b1ee73419b73d843aa7a493 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Wed, 17 Apr 2024 22:56:06 +0300 Subject: [PATCH 36/50] Import Nxt Library action --- .../ide/platform/ImportNxtLibraryAction.kt | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt new file mode 100644 index 000000000..4a8f7447c --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt @@ -0,0 +1,107 @@ +package org.fbme.ide.platform + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.TextFieldWithBrowseButton +import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil +import jetbrains.mps.openapi.navigation.NavigationSupport +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.MementoImpl +import jetbrains.mps.persistence.ModelCannotBeCreatedException +import jetbrains.mps.project.* +import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor +import jetbrains.mps.project.structure.modules.SolutionDescriptor +import jetbrains.mps.smodel.GeneralModuleFactory +import jetbrains.mps.smodel.ModuleDependencyVersions +import jetbrains.mps.smodel.SModelId +import jetbrains.mps.smodel.language.LanguageRegistry +import jetbrains.mps.vfs.IFile +import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.persistence.Iec61499ModelFactory +import org.fbme.ide.platform.persistence.Iec61499ModelHeader +import org.fbme.ide.platform.projectWizard.LibraryTemplate +import org.jdom.Document +import org.jdom.Element +import org.jdom.input.SAXBuilder +import org.jdom.output.Format +import org.jdom.output.XMLOutputter +import org.jetbrains.mps.openapi.model.SModelName +import org.jetbrains.mps.openapi.persistence.PersistenceFacade +import java.io.BufferedOutputStream +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.util.zip.ZipInputStream +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel + +class ImportNxtLibraryAction: AnAction() { + + companion object { + + private fun handleSelectedFolderPath(folerPath: String, e: AnActionEvent) { + val nxtLibNamespaceFolder = "$folerPath/Files" + +// TODO: copy all files + + // Suppose we've already copied all files, now + // we have to parse them + + val mpsProject: MPSProject = e.getData(MPSCommonDataKeys.MPS_PROJECT)!! + mpsProject.modelAccess.executeCommand { + val moduleName = "NxtLib" // TODO: extract from folder name + + val moduleDir = mpsProject.project.projectFile!!.parent.path + + val root = solution.modelRoots.iterator().next() as DefaultModelRoot + val model = try { + val fullModelName = if (stereotype == null) moduleName else "$moduleName@$stereotype" + root.createModel(SModelName(fullModelName), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE) + } catch (e: ModelCannotBeCreatedException) { + throw RuntimeException("Model can not be created", e) + } + val repository = PlatformRepositoryProvider.getInstance(project) + val initialElement = initModel(project.project, repository, model) + model.module.declaredDependencies + val initialNode = initialElement.node + project.repository.modelAccess.runReadInEDT { + val navigationSupport = NavigationSupport.getInstance() + navigationSupport.openNode(project, initialNode, true, false) + navigationSupport.selectInTree(project, initialNode, false) + } + } + } + } + + override fun actionPerformed(e: AnActionEvent) { + val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() + val textFieldWithBrowseButton = TextFieldWithBrowseButton() + textFieldWithBrowseButton.addBrowseFolderListener("Select NxtLib Archive", null, null, fileChooserDescriptor) + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Select NxtLib Folder")) + panel.add(textFieldWithBrowseButton) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = "Import NxtLib" + } + + override fun createCenterPanel(): JComponent? { + return panel + } + } + + if (dialogWrapper.showAndGet()) { + val filePath = textFieldWithBrowseButton.text + handleSelectedFolderPath(filePath, e) + } + } + +} From 146511973bf86530190dd396cc7fcc6da3bc01d7 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 18 Apr 2024 16:52:46 +0300 Subject: [PATCH 37/50] Import Nxt Library action --- .../ide/platform/ImportNxtLibraryAction.kt | 152 ++++++++++++++---- .../org/fbme/ide/platform/NewLibraryAction.kt | 18 +-- 2 files changed, 132 insertions(+), 38 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt index 4a8f7447c..d50a8de5a 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt @@ -1,41 +1,41 @@ package org.fbme.ide.platform +import com.intellij.notification.Notification +import com.intellij.notification.NotificationType +import com.intellij.notification.Notifications import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory +import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.TextFieldWithBrowseButton import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.extapi.model.SModelSimpleHeader import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.openapi.navigation.NavigationSupport import jetbrains.mps.persistence.DefaultModelRoot -import jetbrains.mps.persistence.MementoImpl import jetbrains.mps.persistence.ModelCannotBeCreatedException import jetbrains.mps.project.* -import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor -import jetbrains.mps.project.structure.modules.SolutionDescriptor -import jetbrains.mps.smodel.GeneralModuleFactory -import jetbrains.mps.smodel.ModuleDependencyVersions import jetbrains.mps.smodel.SModelId -import jetbrains.mps.smodel.language.LanguageRegistry -import jetbrains.mps.vfs.IFile +import jetbrains.mps.smodel.SNodeUtil +import jetbrains.mps.util.JDOMUtil +import jetbrains.mps.util.NameUtil +import org.fbme.ide.iec61499.repository.PlatformElement +import org.fbme.ide.iec61499.repository.PlatformElementsOwner +import org.fbme.ide.iec61499.repository.PlatformRepository import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.converter.PlatformConverter import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.persistence.Iec61499ModelHeader -import org.fbme.ide.platform.projectWizard.LibraryTemplate import org.jdom.Document -import org.jdom.Element -import org.jdom.input.SAXBuilder -import org.jdom.output.Format -import org.jdom.output.XMLOutputter +import org.jetbrains.mps.openapi.model.SModel import org.jetbrains.mps.openapi.model.SModelName +import org.jetbrains.mps.openapi.model.SModelReference +import org.jetbrains.mps.openapi.model.SNode +import org.jetbrains.mps.openapi.persistence.ModelLoadException import org.jetbrains.mps.openapi.persistence.PersistenceFacade -import java.io.BufferedOutputStream -import java.io.File -import java.io.FileInputStream -import java.io.FileOutputStream -import java.util.zip.ZipInputStream +import java.io.* import javax.swing.JComponent import javax.swing.JLabel import javax.swing.JPanel @@ -44,35 +44,129 @@ class ImportNxtLibraryAction: AnAction() { companion object { - private fun handleSelectedFolderPath(folerPath: String, e: AnActionEvent) { - val nxtLibNamespaceFolder = "$folerPath/Files" + fun initModel(project: Project, repository: PlatformRepository, model: SModel, moduleName: String, folderPath: String): PlatformElement { + val nxtLibNamespaceFolder = "$folderPath/Files" + val modelId = SModelId.generate() + val modelName = "Library@content" + + val ref = PersistenceFacade.getInstance().createModelReference(null, modelId, modelName) + val header: SModelSimpleHeader = Iec61499ModelHeader(ref, emptyList()) + + val entries = loadEntries(File(nxtLibNamespaceFolder)) + + val errorEntries = mutableSetOf() + for (entry in entries) { + try { + loadRootFromFile(header, entry, model) + } catch (e: Exception) { +// errorEntries += entry + } + } + if (errorEntries.isNotEmpty()) { + val notification = Notification( + "fbme.integration.nxt", + "Error during import", + "Failed to load ${errorEntries.size} documents: ${errorEntries.joinToString { it.name }}", + NotificationType.ERROR + ) + Notifications.Bus.notify(notification, project) + } + val first = model.rootNodes.firstOrNull() + if (first != null) { + return repository.adapter(first) + } + val result = repository.iec61499Factory.createBasicFBTypeDeclaration(null) + result.name = "EmptyBasicFB" + return result as PlatformElement + } + + @Throws(ModelLoadException::class) + fun loadRootFromFile(header: SModelSimpleHeader, documentFile: File, model: SModel) { + BufferedReader(FileReader(documentFile)).use { reader -> + val doc = JDOMUtil.loadDocument(reader) + val node = convertRootNode(header.modelReference, doc, documentFile.extension) + if (node != null) { +// val virtualPackage = NameUtil.namespaceFromLongName(documentFile.name) +// if (virtualPackage != null && virtualPackage.isNotEmpty()) { +// node.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, virtualPackage) +// } + model.addRootNode(node) + } + } + } + + private fun convertRootNode(reference: SModelReference, doc: Document, fileExtension: String?): SNode? { + // TODO: how this is expected to be used or smth ??? + val owner = PlatformElementsOwner() + val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) + val converter = PlatformConverter.create(configuration, reference, doc) + return when (fileExtension) { + Iec61499ModelFactory.FBT_FILE_EXT -> (converter.convertFBType() as PlatformElement).node + Iec61499ModelFactory.ADP_FILE_EXT -> (converter.convertAdapterType() as PlatformElement).node + Iec61499ModelFactory.SUB_FILE_EXT -> (converter.convertSubapplicationType() as PlatformElement).node + Iec61499ModelFactory.RES_FILE_EXT -> (converter.convertResourceType() as PlatformElement).node + Iec61499ModelFactory.DEV_FILE_EXT -> (converter.convertDeviceType() as PlatformElement).node + Iec61499ModelFactory.SEG_FILE_EXT -> (converter.convertSegmentType() as PlatformElement).node + Iec61499ModelFactory.SYS_FILE_EXT -> (converter.convertSystemConfiguration() as PlatformElement).node + else -> null + } + } + + private fun supportedFileExtension(fileExt: String): Boolean { + return fileExt == Iec61499ModelFactory.FBT_FILE_EXT + || fileExt == Iec61499ModelFactory.ADP_FILE_EXT + || fileExt == Iec61499ModelFactory.SUB_FILE_EXT + || fileExt == Iec61499ModelFactory.RES_FILE_EXT + || fileExt == Iec61499ModelFactory.DEV_FILE_EXT + || fileExt == Iec61499ModelFactory.SYS_FILE_EXT + || fileExt == Iec61499ModelFactory.SEG_FILE_EXT + } + + private fun loadEntries(rootDirectory: File): Sequence = sequence { + val files = rootDirectory.listFiles() ?: return@sequence + for (file in files) { + if (file.isDirectory) { + for (nestedFile in file.listFiles()!!) { // unexpected format if exception occurs + if (supportedFileExtension(nestedFile.extension)) { + yield(nestedFile) + } + } + } + } + } + + private fun handleSelectedFolderPath(folderPath: String, e: AnActionEvent) { // TODO: copy all files // Suppose we've already copied all files, now // we have to parse them val mpsProject: MPSProject = e.getData(MPSCommonDataKeys.MPS_PROJECT)!! - mpsProject.modelAccess.executeCommand { - val moduleName = "NxtLib" // TODO: extract from folder name + mpsProject.modelAccess.runWriteAction { + // create a variable called moduleName and assign to it the name of directory specified by folderPath + val moduleName = File(folderPath).name - val moduleDir = mpsProject.project.projectFile!!.parent.path + val moduleDir = mpsProject.project.basePath + "/solutions/" + moduleName + val solution = NewModuleUtil.createSolution(moduleName, moduleDir, mpsProject) val root = solution.modelRoots.iterator().next() as DefaultModelRoot val model = try { - val fullModelName = if (stereotype == null) moduleName else "$moduleName@$stereotype" - root.createModel(SModelName(fullModelName), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE) + root.createModel(SModelName(moduleName), null, + Iec61499ModelFactory.DST, + Iec61499ModelFactory.TYPE + ) } catch (e: ModelCannotBeCreatedException) { throw RuntimeException("Model can not be created", e) } - val repository = PlatformRepositoryProvider.getInstance(project) - val initialElement = initModel(project.project, repository, model) + val repository = PlatformRepositoryProvider.getInstance(mpsProject) + val initialElement = initModel(mpsProject.project, repository, model, moduleName, folderPath) model.module.declaredDependencies val initialNode = initialElement.node - project.repository.modelAccess.runReadInEDT { + mpsProject.repository.modelAccess.runReadInEDT { val navigationSupport = NavigationSupport.getInstance() - navigationSupport.openNode(project, initialNode, true, false) - navigationSupport.selectInTree(project, initialNode, false) + navigationSupport.openNode(mpsProject, initialNode, true, false) + navigationSupport.selectInTree(mpsProject, initialNode, false) } } } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt index 62b4a4cac..551ffa1ad 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt @@ -41,7 +41,7 @@ class NewLibraryAction : AnAction() { dialog.withFactory { val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) - + val root = result.modelRoots.iterator().next() as DefaultModelRoot model = try { val fullModelName = "NewLibrary@content" @@ -62,14 +62,14 @@ class NewLibraryAction : AnAction() { val facetFactory = LibraryFacetFactory.CUSTOM_FACET_FACTORY // TODO: add factory at the FBME start - val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) - if (facetsRegistry.getFacetFactory("library") == null) { - facetsRegistry.addFactory("library", facetFactory) - } - - val libFacet = facetFactory.create(result) - result.moduleDescriptor.addFacetDescriptor(libFacet) -// result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) +// val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) +// if (facetsRegistry.getFacetFactory("library") == null) { +// facetsRegistry.addFactory("library", facetFactory) +// } + +// val libFacet = facetFactory.create(result) +// result.moduleDescriptor.addFacetDescriptor(libFacet) +//// result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) result.setModuleDescriptor(result.moduleDescriptor, true) result.save() From 368c3dbdd23d288151756aa0b54f1a09af63f419 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 18 Apr 2024 16:55:27 +0300 Subject: [PATCH 38/50] Import Nxt Library action --- code/platform/src/main/resources/META-INF/plugin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 181e986fc..44185584e 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -57,6 +57,9 @@ + From b31dfb3d508e5a46542adb45239632b5088f48f0 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 19 Apr 2024 13:24:58 +0300 Subject: [PATCH 39/50] Import Nxt Library action --- .../main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt index d50a8de5a..10fa7135d 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt @@ -97,7 +97,6 @@ class ImportNxtLibraryAction: AnAction() { } private fun convertRootNode(reference: SModelReference, doc: Document, fileExtension: String?): SNode? { - // TODO: how this is expected to be used or smth ??? val owner = PlatformElementsOwner() val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) val converter = PlatformConverter.create(configuration, reference, doc) From 178ece1768b587381209b85cb91daff3aa3fc111 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Fri, 19 Apr 2024 22:41:27 +0300 Subject: [PATCH 40/50] Implemented "Import NxtLib" functionality with namespaces --- .../ide/platform/ImportNxtLibraryAction.kt | 57 ++++++++++++++++--- .../src/main/resources/META-INF/plugin.xml | 2 +- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt index 10fa7135d..6bdc2cf1c 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt @@ -36,6 +36,10 @@ import org.jetbrains.mps.openapi.model.SNode import org.jetbrains.mps.openapi.persistence.ModelLoadException import org.jetbrains.mps.openapi.persistence.PersistenceFacade import java.io.* +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.util.stream.Collectors import javax.swing.JComponent import javax.swing.JLabel import javax.swing.JPanel @@ -44,9 +48,45 @@ class ImportNxtLibraryAction: AnAction() { companion object { + val NAMESPACES_FILE_EXTENSION = ".iecproj" + val NAMESPACES_XML_TAG = "Namespaces" + val NAMESPACE_XML_TAG = "Ns" + val NAMESPACE_PARAMETER_XML_TAG = "Name" + val FB_XML_TAG = "FB" + val FB_PARAMETER_XML_TAG = "Name" + + fun extractNamespaces(folderPath: String): HashMap { + val result = HashMap() + + val iecprojFilePath = Files.walk(Paths.get(folderPath)) + .filter { path: Path -> path.toString().endsWith(NAMESPACES_FILE_EXTENSION) } + .collect(Collectors.toList()) + .firstOrNull() ?: throw RuntimeException("No .iecproj file found in the directory") + + BufferedReader(FileReader(iecprojFilePath.toFile())).use { reader -> + val doc = JDOMUtil.loadDocument(reader) + val rootElement = doc.rootElement + + val namespacesElement = rootElement.getChild(NAMESPACES_XML_TAG, rootElement.namespace) + + for (nsElement in namespacesElement.getChildren(NAMESPACE_XML_TAG, rootElement.namespace)) { + val namespaceName = nsElement.getAttributeValue(NAMESPACE_PARAMETER_XML_TAG) + val fbNames = nsElement.getChildren(FB_XML_TAG, rootElement.namespace) + .map { it.getAttributeValue(FB_PARAMETER_XML_TAG) } + // for all fbNames in the namespace, add the namespaceName to the result + fbNames.forEach { result[it] = namespaceName } + } + } + + return result + } + + fun initModel(project: Project, repository: PlatformRepository, model: SModel, moduleName: String, folderPath: String): PlatformElement { val nxtLibNamespaceFolder = "$folderPath/Files" + val namespaces = extractNamespaces(folderPath) + val modelId = SModelId.generate() val modelName = "Library@content" @@ -58,7 +98,7 @@ class ImportNxtLibraryAction: AnAction() { val errorEntries = mutableSetOf() for (entry in entries) { try { - loadRootFromFile(header, entry, model) + loadRootFromFile(header, entry, model, namespaces) } catch (e: Exception) { // errorEntries += entry } @@ -82,15 +122,15 @@ class ImportNxtLibraryAction: AnAction() { } @Throws(ModelLoadException::class) - fun loadRootFromFile(header: SModelSimpleHeader, documentFile: File, model: SModel) { + fun loadRootFromFile(header: SModelSimpleHeader, documentFile: File, model: SModel, namespaces: HashMap) { BufferedReader(FileReader(documentFile)).use { reader -> val doc = JDOMUtil.loadDocument(reader) val node = convertRootNode(header.modelReference, doc, documentFile.extension) if (node != null) { -// val virtualPackage = NameUtil.namespaceFromLongName(documentFile.name) -// if (virtualPackage != null && virtualPackage.isNotEmpty()) { -// node.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, virtualPackage) -// } + val virtualPackage = namespaces[documentFile.name] + if (virtualPackage != null && virtualPackage.isNotEmpty()) { + node.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, virtualPackage) + } model.addRootNode(node) } } @@ -147,11 +187,10 @@ class ImportNxtLibraryAction: AnAction() { val moduleName = File(folderPath).name val moduleDir = mpsProject.project.basePath + "/solutions/" + moduleName - val solution = NewModuleUtil.createSolution(moduleName, moduleDir, mpsProject) val root = solution.modelRoots.iterator().next() as DefaultModelRoot val model = try { - root.createModel(SModelName(moduleName), null, + root.createModel(SModelName("Library@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE ) @@ -186,7 +225,7 @@ class ImportNxtLibraryAction: AnAction() { title = "Import NxtLib" } - override fun createCenterPanel(): JComponent? { + override fun createCenterPanel(): JComponent { return panel } } diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 44185584e..aa3e0c062 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -16,7 +16,7 @@ - + From 73c046c6022db3c94929146301544a6f8142bf16 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Sun, 21 Apr 2024 20:43:07 +0300 Subject: [PATCH 41/50] Implemented "Create namespace" & namespaces workaround --- .../fbme/ide/platform/SetNamespaceAction.kt | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt new file mode 100644 index 000000000..4dcfc0c17 --- /dev/null +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt @@ -0,0 +1,56 @@ +package org.fbme.ide.platform + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.ui.tree.smodel.SNodeTreeNode +import jetbrains.mps.project.AbstractModule +import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.smodel.SNodeUtil +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel +import javax.swing.JTextField + + +class SetNamespaceAction: AnAction() { + + val BUTTON_TITLE = "Set namespace" + + override fun actionPerformed(e: AnActionEvent) { + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject + val mpsNode = (e.getData(MPSCommonDataKeys.TREE_NODE) as SNodeTreeNode).sNode!! + + val textField = JTextField() + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Specify the namespace:")) + panel.add(textField) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = BUTTON_TITLE + } + + override fun createCenterPanel(): JComponent? { + return panel + } + } + + mpsProject.modelAccess.runWriteAction { + if (dialogWrapper.showAndGet()) { + val namespaceName = textField.text + mpsNode.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, namespaceName) + + (mpsNode.model!!.module as AbstractModule).setChanged() + + mpsProject.save() + + } + } + + } +} From 0122e3dea5c248ec4442fb59f8089045cc23af62 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 22 Apr 2024 15:43:44 +0300 Subject: [PATCH 42/50] Small fix --- .../src/main/resources/META-INF/plugin.xml | 3 ++ .../org.fbme.ide.richediting.plugin.mps | 50 +++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index aa3e0c062..3ef032f0a 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -60,6 +60,9 @@ + diff --git a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps index c0ed2663f..7db4fb00c 100644 --- a/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps +++ b/code/richediting/solutions/org.fbme.ide.richediting/models/org.fbme.ide.richediting.plugin.mps @@ -3812,6 +3812,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -3848,5 +3868,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7eff963679f6281d9cdc0c5910da47551626008d Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 23 Apr 2024 17:29:50 +0300 Subject: [PATCH 43/50] Facet-namespace logic --- .../org/fbme/ide/platform/LibraryFacet.kt | 94 +++++++++++++++++++ .../org/fbme/ide/platform/LibraryFacetTab.kt | 15 +++ 2 files changed, 109 insertions(+) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt index 96da0c4ab..eb995b358 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt @@ -1,13 +1,107 @@ package org.fbme.ide.platform import jetbrains.mps.extapi.module.ModuleFacetBase +import org.fbme.ide.iec61499.repository.PlatformElement +import org.fbme.ide.iec61499.repository.PlatformElementsOwner +import org.fbme.ide.platform.converter.PlatformConverter +import org.jdom.Document +import org.jetbrains.mps.openapi.model.SModelReference +import org.jetbrains.mps.openapi.model.SNode import org.jetbrains.mps.openapi.module.SModule +import org.jetbrains.mps.openapi.persistence.Memento class LibraryFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { companion object { private const val FACET_TYPE = "library" + private const val NAMESPACES_KEY = "namespaces" + private const val GENERATED_KEY = "generated" + private const val PATH_KEY = "path" } + private val namespaces: HashMap = HashMap() + /** + * Adds a new namespace to the namespaces map. + * + * @param node The SNode to be added. + * @param namespace The namespace represented by a String. + */ + fun addNamespace(node: SNode, namespace: String) { + namespaces[node] = namespace + } + + /** + * Removes a namespace from the namespaces map. + * + * @param node The SNode to be removed. + */ + fun removeNamespace(node: SNode) { + namespaces.remove(node) + } + + /** + * Returns the namespace of a specific SNode. + * + * @param node The SNode whose namespace is to be retrieved. + * @return The namespace of the SNode. + */ + fun getNamespace(node: SNode): String? { + return namespaces[node] + } + + /** + * Returns all the namespaces stored in the namespaces map. + * + * @return A map of all namespaces. + */ + fun getAllNamespaces(): Map { + return namespaces + } + + /** + * Save the current state of the namespaces map to a Memento object. + * + * @param memento The Memento object to save to. + */ + override fun save(memento: Memento) { + memento.clear() + namespaces.forEach { (node, namespace) -> + val child = memento.createChild(NAMESPACES_KEY) + child.put(GENERATED_KEY, node.nodeId.toString()) + child.put(PATH_KEY, namespace) + } + } + + /** + * Load the state of the namespaces map from a Memento object. + * + * @param memento The Memento object to load from. + */ + override fun load(memento: Memento) { + namespaces.clear() + memento.getChildren(NAMESPACES_KEY).forEach { child -> + val nodeId = child.get(GENERATED_KEY) + val namespace = child.get(PATH_KEY) + if (nodeId != null && namespace != null) { + val node = + namespaces[node] = namespace + } + } + } + + /** + * Converts an SNode to a PlatformElement. + * + * @param node The SNode to be converted. + * @param reference The SModelReference for the model that the SNode belongs to. + * @param doc The Document that represents the XML structure of the SNode. + * @return The converted PlatformElement. + */ + fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { + val owner = PlatformElementsOwner() + val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) + val converter = PlatformConverter.create(configuration, reference, doc) + return converter.convert(node) as PlatformElement + } } diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt index 97a53f84f..48071e8c0 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt @@ -1,5 +1,6 @@ package org.fbme.ide.platform.org.fbme.ide.platform +import com.intellij.openapi.ui.VerticalFlowLayout import com.intellij.ui.components.JBLabel import com.intellij.uiDesigner.core.GridConstraints import com.intellij.uiDesigner.core.GridLayoutManager @@ -10,12 +11,24 @@ import org.fbme.ide.platform.LibraryFacet import org.jetbrains.mps.openapi.module.SModuleFacet import org.jetbrains.mps.openapi.ui.persistence.FacetTab import java.awt.Dimension +import javax.swing.BorderFactory +import javax.swing.JLabel import javax.swing.JPanel import javax.swing.JTextField class LibraryFacetTab(val moduleFacet: LibraryFacet): BaseTab(), FacetTab { private var myTextField: JTextField? = null + private fun displayAllNamespaces() { + val namespacesPanel = JPanel(VerticalFlowLayout()) + moduleFacet.getAllNamespaces().forEach { (node, namespace) -> + val label = JLabel("Node ID: ${node.nodeId}, Name: ${node.name}, Namespace: $namespace") + label.border = BorderFactory.createEmptyBorder(10, 10, 10, 10) // Add space around the label + namespacesPanel.add(label) + } + tabComponent.add(namespacesPanel) + } + override fun init() { val content = JPanel() content.setLayout(GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1)) @@ -70,6 +83,8 @@ class LibraryFacetTab(val moduleFacet: LibraryFacet): BaseTab(), FacetTab { ) ) + displayAllNamespaces() + tabComponent = outerPanel } From fff5172fffe3a788cbd59a3e7d6accfda0791652 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 23 Apr 2024 17:34:55 +0300 Subject: [PATCH 44/50] refactoring --- .../platform/{ => library}/LibraryFacetFactory.kt | 3 ++- .../ide/platform/{ => library}/LibraryFacetTab.kt | 4 ++-- .../platform/{ => library}/LibraryFacetTabFactory.kt | 5 +++-- .../{ => library/actions}/ExportLibraryAction.kt | 4 +--- .../{ => library/actions}/ImportLibraryAction.kt | 2 +- .../{ => library/actions}/ImportNxtLibraryAction.kt | 3 +-- .../{ => library/actions}/NewLibraryAction.kt | 4 ++-- .../{ => library/actions}/SetNamespaceAction.kt | 2 +- .../ide/platform/{ => library/util}/LibraryFacet.kt | 2 +- code/platform/src/main/resources/META-INF/plugin.xml | 12 ++++++------ 10 files changed, 20 insertions(+), 21 deletions(-) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library}/LibraryFacetFactory.kt (83%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library}/LibraryFacetTab.kt (97%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library}/LibraryFacetTabFactory.kt (66%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/actions}/ExportLibraryAction.kt (96%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/actions}/ImportLibraryAction.kt (99%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/actions}/ImportNxtLibraryAction.kt (99%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/actions}/NewLibraryAction.kt (97%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/actions}/SetNamespaceAction.kt (97%) rename code/platform/src/main/kotlin/org/fbme/ide/platform/{ => library/util}/LibraryFacet.kt (98%) diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt similarity index 83% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt index 504a6ed7c..1b31c73be 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetFactory.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt @@ -1,5 +1,6 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library +import org.fbme.ide.platform.library.util.LibraryFacet import org.jetbrains.mps.openapi.module.FacetsFacade.FacetFactory import org.jetbrains.mps.openapi.module.SModule import org.jetbrains.mps.openapi.module.SModuleFacet diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt similarity index 97% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt index 48071e8c0..62f07de3d 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTab.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform.org.fbme.ide.platform +package org.fbme.ide.platform.library import com.intellij.openapi.ui.VerticalFlowLayout import com.intellij.ui.components.JBLabel @@ -7,7 +7,7 @@ import com.intellij.uiDesigner.core.GridLayoutManager import com.intellij.util.ui.JBInsets import com.intellij.util.ui.JBUI import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab -import org.fbme.ide.platform.LibraryFacet +import org.fbme.ide.platform.library.util.LibraryFacet import org.jetbrains.mps.openapi.module.SModuleFacet import org.jetbrains.mps.openapi.ui.persistence.FacetTab import java.awt.Dimension diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt similarity index 66% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt index 1cb09d621..cce281315 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacetTabFactory.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt @@ -1,6 +1,7 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library -import org.fbme.ide.platform.org.fbme.ide.platform.LibraryFacetTab +import org.fbme.ide.platform.library.util.LibraryFacet +import org.fbme.ide.platform.library.LibraryFacetTab import org.jetbrains.mps.openapi.ui.persistence.FacetTab import org.jetbrains.mps.openapi.ui.persistence.TabFactory diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt similarity index 96% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt index 3d32bb53c..356395311 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ExportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt @@ -1,9 +1,7 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.ui.Messages -import com.intellij.openapi.util.NlsSafe import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.project.Solution import jetbrains.mps.vfs.IFile diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt similarity index 99% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt index 082b98cd7..07dc77b88 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt similarity index 99% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt index 6bdc2cf1c..d2464e266 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/ImportNxtLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.actions import com.intellij.notification.Notification import com.intellij.notification.NotificationType @@ -20,7 +20,6 @@ import jetbrains.mps.project.* import jetbrains.mps.smodel.SModelId import jetbrains.mps.smodel.SNodeUtil import jetbrains.mps.util.JDOMUtil -import jetbrains.mps.util.NameUtil import org.fbme.ide.iec61499.repository.PlatformElement import org.fbme.ide.iec61499.repository.PlatformElementsOwner import org.fbme.ide.iec61499.repository.PlatformRepository diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt similarity index 97% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt index 551ffa1ad..e8c8e1158 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/NewLibraryAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt @@ -1,8 +1,7 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent -import jetbrains.mps.extapi.module.FacetsRegistry import jetbrains.mps.ide.actions.MPSCommonDataKeys import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil import jetbrains.mps.ide.projectPane.ProjectPane @@ -15,6 +14,7 @@ import jetbrains.mps.project.MPSExtentions import jetbrains.mps.project.ModelImporter import jetbrains.mps.project.Solution import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.library.LibraryFacetFactory import org.fbme.ide.platform.persistence.Iec61499ModelFactory import org.fbme.ide.platform.projectWizard.LibraryTemplate import org.jetbrains.mps.openapi.model.SModel diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt similarity index 97% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt index 4dcfc0c17..d486f1c99 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/SetNamespaceAction.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.actions import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt similarity index 98% rename from code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt rename to code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt index eb995b358..63b03efc8 100644 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/LibraryFacet.kt +++ b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt @@ -1,4 +1,4 @@ -package org.fbme.ide.platform +package org.fbme.ide.platform.library.util import jetbrains.mps.extapi.module.ModuleFacetBase import org.fbme.ide.iec61499.repository.PlatformElement diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 3ef032f0a..4ee99cb33 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -16,7 +16,7 @@ - + @@ -48,20 +48,20 @@ From 595d8e561e5753f09c9371b6e30ad4fe99bd0fb7 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Tue, 23 Apr 2024 18:06:12 +0300 Subject: [PATCH 45/50] Library internal logic && tests --- .../org.fbme.ide.iec61499.adapter.common.mps | 110 ++++++++++ .../kotlin/org/fbme/lib/common/Element.kt | 1 + .../kotlin/org/fbme/lib/common/Library.kt | 12 ++ .../platform/library/LibraryActionsTest.kt | 191 ++++++++++++++++++ .../fbme/ide/platform/library/TestUtils.kt | 4 + .../src/test/resources/LibExample/Library.zip | Bin 0 -> 1386 bytes 6 files changed, 318 insertions(+) create mode 100644 code/library/src/main/kotlin/org/fbme/lib/common/Library.kt create mode 100644 code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt create mode 100644 code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt create mode 100644 code/platform/src/test/resources/LibExample/Library.zip diff --git a/code/language/solutions/org.fbme.ide.iec61499.adapter/models/org.fbme.ide.iec61499.adapter.common.mps b/code/language/solutions/org.fbme.ide.iec61499.adapter/models/org.fbme.ide.iec61499.adapter.common.mps index 557615311..9baf591cd 100644 --- a/code/language/solutions/org.fbme.ide.iec61499.adapter/models/org.fbme.ide.iec61499.adapter.common.mps +++ b/code/language/solutions/org.fbme.ide.iec61499.adapter/models/org.fbme.ide.iec61499.adapter.common.mps @@ -2195,5 +2195,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt b/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt index 90dc63260..1bb55e6a6 100644 --- a/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt +++ b/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt @@ -4,5 +4,6 @@ import org.fbme.lib.common.attributes.WithExternalXmlContent interface Element : WithExternalXmlContent { val container: Element? + val library: Library? fun copy(): Element } diff --git a/code/library/src/main/kotlin/org/fbme/lib/common/Library.kt b/code/library/src/main/kotlin/org/fbme/lib/common/Library.kt new file mode 100644 index 000000000..8656cdd95 --- /dev/null +++ b/code/library/src/main/kotlin/org/fbme/lib/common/Library.kt @@ -0,0 +1,12 @@ +package org.fbme.lib.common + +interface Library { + + val elements: Collection + val namespaces: List + + fun elementsByNamespace(namespace: String): Collection + + fun attachElement(element: RootElement, namespace: String = "") + fun detachElement(element: RootElement) +} diff --git a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt new file mode 100644 index 000000000..ead0d5b3d --- /dev/null +++ b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt @@ -0,0 +1,191 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooser +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.project.MPSProject +import jetbrains.mps.project.Solution +import junit.framework.TestCase.assertEquals +import org.fbme.ide.platform.testing.PlatformTestRunner +import org.junit.Test +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mock + +@RunWith(PlatformTestRunner::class) +class LibraryActionsTest { + + @Test + fun testNewLibraryAction() { + // Arrange + val newLibraryAction = NewLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock dialog to set module name and location + val cfg = mock(NameLocationPanel::class.java) + `when`(NewModuleDialog.projectHome(project)).thenReturn("solutions") + `when`(cfg.withDefaults("NewSolution", "solutions")).thenReturn(cfg) + val dialog = mock(NewModuleDialog::class.java) + `when`(NewModuleDialog(project, cfg)).thenReturn(dialog) + val model = mock(SModel::class.java) + val result = mock(Solution::class.java) + val modelRoot = mock(DefaultModelRoot::class.java) + `when`(result.modelRoots).thenReturn(setOf(modelRoot)) + `when`(modelRoot.createModel(SModelName("NewLibrary@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE)).thenReturn(model) + val repository = mock(PlatformRepository::class.java) + `when`(PlatformRepositoryProvider.getInstance(project)).thenReturn(repository) + val facet = mock(ModuleFacetBase::class.java) + `when`(result.getFacet(Iec61499Facet.FACET_TYPE)).thenReturn(facet) + val modelImporter = mock(ModelImporter::class.java) + `when`(ModelImporter(it)).thenReturn(modelImporter) + + + // Act + newLibraryAction.actionPerformed(event) + + // Assert + // Add your assertions here based on the expected outcome of the action + + assertNotNull(model) + assertEquals("NewLibrary@Content", model.getName().getValue()) + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + + } + + @Test + fun testExportLibraryAction() { + // Arrange + val exportLibraryAction = ExportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + // Assuming that the solution is selected in the project pane + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + // mock mpsProject to get the project + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock ideaProject to get the project base path + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + // mock module name + `when`(solution.moduleName).thenReturn("NewLibrary") + + // Act + exportLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + // check that the zip file is created + val zipFile = File("/path/to/project/NewLibrary.zip") + assertTrue(zipFile.exists()) + + } + + @Test + fun testImportLibraryAction() { + // Arrange + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(mpsProject) + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/Library.zip")) + + // Act + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + // remove the extracted directory + extractedDir.delete() + + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + + } + + @Test + fun testNewLibImportExport() { + val newLibraryAction = NewLibraryAction() + val exportLibraryAction = ExportLibraryAction() + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + `when`(solution.moduleName).thenReturn("NewLibrary") + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/NewLibrary.zip")) + + // Act + newLibraryAction.actionPerformed(event) + exportLibraryAction.actionPerformed(event) + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + val zipFile = File("/code/platform/src/test/resources/NewLibrary.zip") + assertTrue(zipFile.exists()) + + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + } + +} \ No newline at end of file diff --git a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt new file mode 100644 index 000000000..d5f128ee4 --- /dev/null +++ b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt @@ -0,0 +1,4 @@ +package org.fbme.ide.platform.library + +class TestUtils { +} \ No newline at end of file diff --git a/code/platform/src/test/resources/LibExample/Library.zip b/code/platform/src/test/resources/LibExample/Library.zip new file mode 100644 index 0000000000000000000000000000000000000000..38f1146babcd42b76b23ededbbaab869f7bef8e4 GIT binary patch literal 1386 zcmWIWW@Zs#;Nak3xD}fh!GHw#foz}5q@u*4O8wmYl+>JJeP)ILZ*~rl8YZa10G!&T zFtz)omctAr#Uy>aCIu(v7UZNlB^GBUJGq5a7NqK>C6(Crp5|*Z5ODooOZIM2J5XKUE+~*xHD zpYrF<4LuYeMVdb$oGB09TCkdy@Up{>B zZ&{cw&)yeG!HX|OZB049Sw}`@O7aS)jLzOqv$9%qvQp1p`Lo%hLPF3scio?TM^^Sc ztzI-I%lYQck*g^ggo-X#T66o3*y#5hJ@((m&=;aot^iDeMcNi3TKePm%*e|h=QD)!=AwZt&*_f0Jt855=GchcSSXa3)V|SRZ&ZU&v*@gVWB++yn(%$=@vBb~JG|+QzQpNc>o Date: Mon, 13 May 2024 12:47:46 +0300 Subject: [PATCH 46/50] Moved to separate plugin --- code/lib-management/build.gradle.kts | 68 +++++ .../src/main/java/org/example/Main.java | 7 + .../library/library/LibraryFacetFactory.kt | 21 ++ .../library/library/LibraryFacetTab.kt | 103 ++++++++ .../library/library/LibraryFacetTabFactory.kt | 13 + .../library/actions/ExportLibraryAction.kt | 95 +++++++ .../library/actions/ImportLibraryAction.kt | 182 ++++++++++++++ .../library/actions/ImportNxtLibraryAction.kt | 238 ++++++++++++++++++ .../library/actions/NewLibraryAction.kt | 106 ++++++++ .../library/actions/SetNamespaceAction.kt | 56 +++++ .../library/library/util/LibraryFacet.kt | 107 ++++++++ .../src/main/resources/META-INF/plugin.xml | 37 +++ .../src/main/resources/icons/lib.svg | 1 + .../main/resources/icons/library_project.svg | 5 + .../main/resources/icons/system_project.svg | 5 + .../platform/library/LibraryActionsTest.kt | 191 ++++++++++++++ .../fbme/ide/platform/library/TestUtils.kt | 4 + settings.gradle.kts | 6 +- 18 files changed, 1244 insertions(+), 1 deletion(-) create mode 100644 code/lib-management/build.gradle.kts create mode 100644 code/lib-management/src/main/java/org/example/Main.java create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetFactory.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTab.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTabFactory.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ExportLibraryAction.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportLibraryAction.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportNxtLibraryAction.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/NewLibraryAction.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/SetNamespaceAction.kt create mode 100644 code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt create mode 100644 code/lib-management/src/main/resources/META-INF/plugin.xml create mode 100644 code/lib-management/src/main/resources/icons/lib.svg create mode 100644 code/lib-management/src/main/resources/icons/library_project.svg create mode 100644 code/lib-management/src/main/resources/icons/system_project.svg create mode 100644 code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt create mode 100644 code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt diff --git a/code/lib-management/build.gradle.kts b/code/lib-management/build.gradle.kts new file mode 100644 index 000000000..365abaaf9 --- /dev/null +++ b/code/lib-management/build.gradle.kts @@ -0,0 +1,68 @@ +//import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +// +//plugins { +// id("java") +// kotlin("jvm") version "2.0.0-RC3" +//} +// +//group = "org.example" +//version = "unspecified" +// +//repositories { +// mavenCentral() +//} +// +//dependencies { +// testImplementation(platform("org.junit:junit-bom:5.9.1")) +// testImplementation("org.junit.jupiter:junit-jupiter") +// implementation(kotlin("stdlib-jdk8")) +//} +// +//tasks.test { +// useJUnitPlatform() +//} +import org.fbme.gradle.includeMpsArtifacts + +import org.fbme.gradle.moduleDependency +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + mps + kotlin +} + +dependencies { + implementation(project(mapOf("path" to ":code:platform"))) + implementation(project(mapOf("path" to ":code:platform"))) + compileOnly(mpsDistribution()) + compileOnly(project(":code:library")) + + implementation(project(":code:language")) + + testImplementation(mpsDistribution()) + testImplementation(project(":code:library")) + + mpsImplementation(project(":code:library", "mps")) + mpsImplementation(project(":code:language", "mps")) +} + +mps { + moduleName.set("org.fbme.platform.lib") + includeMpsArtifacts(project(":code:language")) + moduleDependency(project(":code:library")) +} + +val compileKotlin by tasks.getting(KotlinCompile::class) { + kotlinOptions.freeCompilerArgs = listOf("-Xjvm-default=all") +} + +val test by tasks.getting(Test::class) { + dependsOn( + ":code:library:buildDistPlugin", + "buildDistPlugin" + ) +} + +val copyLibs by tasks.getting(Copy::class) { + dependsOn(":code:language:jar") +} diff --git a/code/lib-management/src/main/java/org/example/Main.java b/code/lib-management/src/main/java/org/example/Main.java new file mode 100644 index 000000000..407f157bc --- /dev/null +++ b/code/lib-management/src/main/java/org/example/Main.java @@ -0,0 +1,7 @@ +package org.example; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetFactory.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetFactory.kt new file mode 100644 index 000000000..1b31c73be --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetFactory.kt @@ -0,0 +1,21 @@ +package org.fbme.ide.platform.library + +import org.fbme.ide.platform.library.util.LibraryFacet +import org.jetbrains.mps.openapi.module.FacetsFacade.FacetFactory +import org.jetbrains.mps.openapi.module.SModule +import org.jetbrains.mps.openapi.module.SModuleFacet + +class LibraryFacetFactory : FacetFactory { + + override fun create(sModule: SModule): SModuleFacet { + return LibraryFacet(sModule) + } + + override fun getPresentation(): String { + return "Library" + } + + companion object { + var CUSTOM_FACET_FACTORY = LibraryFacetFactory() + } +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTab.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTab.kt new file mode 100644 index 000000000..62f07de3d --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTab.kt @@ -0,0 +1,103 @@ +package org.fbme.ide.platform.library + +import com.intellij.openapi.ui.VerticalFlowLayout +import com.intellij.ui.components.JBLabel +import com.intellij.uiDesigner.core.GridConstraints +import com.intellij.uiDesigner.core.GridLayoutManager +import com.intellij.util.ui.JBInsets +import com.intellij.util.ui.JBUI +import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab +import org.fbme.ide.platform.library.util.LibraryFacet +import org.jetbrains.mps.openapi.module.SModuleFacet +import org.jetbrains.mps.openapi.ui.persistence.FacetTab +import java.awt.Dimension +import javax.swing.BorderFactory +import javax.swing.JLabel +import javax.swing.JPanel +import javax.swing.JTextField + +class LibraryFacetTab(val moduleFacet: LibraryFacet): BaseTab(), FacetTab { + private var myTextField: JTextField? = null + + private fun displayAllNamespaces() { + val namespacesPanel = JPanel(VerticalFlowLayout()) + moduleFacet.getAllNamespaces().forEach { (node, namespace) -> + val label = JLabel("Node ID: ${node.nodeId}, Name: ${node.name}, Namespace: $namespace") + label.border = BorderFactory.createEmptyBorder(10, 10, 10, 10) // Add space around the label + namespacesPanel.add(label) + } + tabComponent.add(namespacesPanel) + } + + override fun init() { + val content = JPanel() + content.setLayout(GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1)) + + val label = JBLabel("Plugin ID:") + content.add( + label, GridConstraints( + 0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, + GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false + ) + ) + + myTextField = JTextField("ID") + myTextField!!.isEditable = false + + content.add( + myTextField, GridConstraints( + 0, + 1, + 1, + 1, + GridConstraints.ANCHOR_WEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_CAN_GROW, + GridConstraints.SIZEPOLICY_FIXED, + null, + null, + null, + 0, + false + ) + ) + + val outerPanel = JPanel() + outerPanel.setLayout(GridLayoutManager(1, 1, JBInsets(10, 10, 10, 10), -1, -1)) + outerPanel.add( + content, + GridConstraints( + 0, + 0, + 1, + 1, + GridConstraints.ANCHOR_NORTHWEST, + GridConstraints.FILL_HORIZONTAL, + GridConstraints.SIZEPOLICY_WANT_GROW, + GridConstraints.SIZEPOLICY_FIXED, + null, + Dimension(150, -1), + null, + 0, + false + ) + ) + + displayAllNamespaces() + + tabComponent = outerPanel + } + + override fun isModified(): Boolean { + TODO("Not yet implemented") + } + + override fun apply() { + TODO("Not yet implemented") + } + + override fun getFacet(): SModuleFacet { + return moduleFacet + } + +} \ No newline at end of file diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTabFactory.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTabFactory.kt new file mode 100644 index 000000000..cce281315 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTabFactory.kt @@ -0,0 +1,13 @@ +package org.fbme.ide.platform.library + +import org.fbme.ide.platform.library.util.LibraryFacet +import org.fbme.ide.platform.library.LibraryFacetTab +import org.jetbrains.mps.openapi.ui.persistence.FacetTab +import org.jetbrains.mps.openapi.ui.persistence.TabFactory + + +class LibraryFacetTabFactory : TabFactory { + override fun getTab(moduleFacet: LibraryFacet?): FacetTab { + return LibraryFacetTab(moduleFacet!!) + } +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ExportLibraryAction.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ExportLibraryAction.kt new file mode 100644 index 000000000..356395311 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ExportLibraryAction.kt @@ -0,0 +1,95 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.project.Solution +import jetbrains.mps.vfs.IFile +import org.jetbrains.mps.openapi.module.SModule +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.io.IOException +import java.util.zip.ZipEntry +import java.util.zip.ZipOutputStream + + +class ExportLibraryAction: AnAction() { + + private fun resolveModulePath(module: SModule): String? { + require(module is Solution) { "The module is not a Solution." } + // Attempt to get the descriptor file + val descriptorFile: IFile? = module.descriptorFile + return descriptorFile?.getParent()?.path + + } + + override fun actionPerformed(e: AnActionEvent) { + val module = e.getData(MPSCommonDataKeys.CONTEXT_MODULE) ?: return + + // TODO: (SEE the same note at the ImportLIbraryAction.kt + // consider rename solution or it's id in .mds or header file in order to avoid id conflicts + // while importing exported library + + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) + val ideaProject = mpsProject!!.project + val targetDir = ideaProject.basePath + zipModule(module, targetDir + "/" + module.moduleName + ".zip") + } + + @Throws(IOException::class) + fun zipModule(module: SModule?, zipFilePath: String?) { + val modulePath = resolveModulePath(module!!) + val fos = FileOutputStream(zipFilePath) + val zipOut = ZipOutputStream(fos) + val fileToZip = File(modulePath) + zipFile(fileToZip, fileToZip.getName(), zipOut) + zipOut.close() + fos.close() + } + + @Throws(IOException::class) + private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream) { + if (!fileToZip.isDirectory()) { + zipFile(fileToZip, fileName, zipOut, "") + return + } + val children = fileToZip.listFiles() + if (children != null) { + for (childFile in children) { + zipFile(childFile, fileName + "/" + childFile.getName(), zipOut, fileName) + } + } + } + + @Throws(IOException::class) + private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream, parentDirectoryName: String) { + var fileName = fileName + if (fileToZip.isHidden()) { + return + } + if (fileToZip.isDirectory()) { + if (!fileName.endsWith("/")) { + fileName += "/" + } + if (parentDirectoryName != "") { + zipOut.putNextEntry(ZipEntry(fileName)) + zipOut.closeEntry() + } + val children = fileToZip.listFiles() + for (childFile in children) { + zipFile(childFile, fileName + childFile.getName(), zipOut, fileName) + } + return + } + val fis = FileInputStream(fileToZip) + val zipEntry = ZipEntry(fileName) + zipOut.putNextEntry(zipEntry) + val bytes = ByteArray(1024) + var length: Int + while (fis.read(bytes).also { length = it } >= 0) { + zipOut.write(bytes, 0, length) + } + fis.close() + } +} \ No newline at end of file diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportLibraryAction.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportLibraryAction.kt new file mode 100644 index 000000000..07dc77b88 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportLibraryAction.kt @@ -0,0 +1,182 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.TextFieldWithBrowseButton +import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.MementoImpl +import jetbrains.mps.project.ModuleId +import jetbrains.mps.project.ProjectPathUtil +import jetbrains.mps.project.Solution +import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor +import jetbrains.mps.project.structure.modules.SolutionDescriptor +import jetbrains.mps.smodel.GeneralModuleFactory +import jetbrains.mps.smodel.ModuleDependencyVersions +import jetbrains.mps.smodel.language.LanguageRegistry +import jetbrains.mps.vfs.IFile +import org.jdom.Document +import org.jdom.Element +import org.jdom.input.SAXBuilder +import org.jdom.output.Format +import org.jdom.output.XMLOutputter +import java.io.BufferedOutputStream +import java.io.File +import java.io.FileInputStream +import java.io.FileOutputStream +import java.util.zip.ZipInputStream +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel + + +class ImportLibraryAction: AnAction() { + + companion object { + fun unzip(zipFilePath: String, targetDirectoryPath: String) { + val buffer = ByteArray(1024) + val zipFile = File(zipFilePath) + val folder = File(targetDirectoryPath) + if (!folder.exists()) { + folder.mkdirs() + } + + ZipInputStream(FileInputStream(zipFile)).use { zis -> + var zipEntry = zis.nextEntry + while (zipEntry != null) { + val newFile = File(folder, zipEntry.name) + if (zipEntry.isDirectory) { + newFile.mkdirs() + } else { + File(newFile.parent).mkdirs() + + FileOutputStream(newFile).use { fos -> + var len: Int + BufferedOutputStream(fos, buffer.size).use { bos -> + while (zis.read(buffer).also { len = it } > 0) { + bos.write(buffer, 0, len) + } + } + } + } + zipEntry = zis.nextEntry + } + zis.closeEntry() + } + } + + private fun overrideModuleId(id: String, filePath: String) { + try { + val saxBuilder = SAXBuilder() + val document: Document = saxBuilder.build(File(filePath)) + val rootNode: Element = document.rootElement + + rootNode.setAttribute("uuid", id) + + val xmlOutputter = XMLOutputter(Format.getPrettyFormat()) + FileOutputStream(filePath).use { output -> + xmlOutputter.output(document, output) + } + } catch (e: Exception) { + e.printStackTrace() + } + } + + private fun getModuleFile(namespace: String, rootPath: IFile, extension: String): IFile { + return rootPath.findChild(namespace + extension) + } + + private fun createNewSolutionDescriptor(id: ModuleId, namespace: String, descriptorFile: IFile): SolutionDescriptor { + val descriptor = SolutionDescriptor() + descriptor.namespace = namespace + descriptor.id = id + val moduleLocation = descriptorFile.parent + val modelsDir = moduleLocation!!.findChild("models") + + modelsDir.mkdirs() + descriptor.modelRootDescriptors.add( + DefaultModelRoot.createDescriptor( + modelsDir.parent!!, + *arrayOf(modelsDir) + ) + ) + descriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("java", MementoImpl())) + ProjectPathUtil.setGeneratorOutputPath(descriptor, moduleLocation!!.findChild("source_gen").path) + return descriptor + } + + private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { +// :TODO: get module name from it's descriptor file +// path/to/archive/weird_name.zip + val moduleName = filePath.split("/").last().dropLast(4) + + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject + + val zipFilePath = filePath + val targetDirectoryPath = mpsProject.project.basePath + "/solutions" + + unzip(zipFilePath, targetDirectoryPath) + val id = ModuleId.regular() + overrideModuleId(id.toString(), filePath) + + val namespace = moduleName + + mpsProject.modelAccess.runWriteAction { +// TODO: are there any issues with specific model(how do IEC61499 model gets loaded?) + + val descriptorFile = getModuleFile(namespace, + mpsProject.getFileSystem().getFile(targetDirectoryPath + "/" + moduleName), + ".msd") + +// NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in +// .msd file + val descriptor = createNewSolutionDescriptor(id, namespace, descriptorFile) + val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution + mpsProject.addModule(module) + ModuleDependencyVersions( + (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, + mpsProject.getRepository() + ).update(module) + module.save() + } + +// return module + + // TODO: add as a dependency + + println("Created?") + } + } + + override fun actionPerformed(e: AnActionEvent) { + // TODO: (SEE the same note at the ExportLIbraryAction.kt + // consider rename solution or it's id in .mds or header file in order to avoid id conflicts + val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() + val textFieldWithBrowseButton = TextFieldWithBrowseButton() + textFieldWithBrowseButton.addBrowseFolderListener("Select Archive", null, null, fileChooserDescriptor) + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Select Archive:")) + panel.add(textFieldWithBrowseButton) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = "Import Library" + } + + override fun createCenterPanel(): JComponent? { + return panel + } + } + + if (dialogWrapper.showAndGet()) { + val filePath = textFieldWithBrowseButton.text + handleSelectedFilePath(filePath, e) + } + } +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportNxtLibraryAction.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportNxtLibraryAction.kt new file mode 100644 index 000000000..d2464e266 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportNxtLibraryAction.kt @@ -0,0 +1,238 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.notification.Notification +import com.intellij.notification.NotificationType +import com.intellij.notification.Notifications +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory +import com.intellij.openapi.project.Project +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.TextFieldWithBrowseButton +import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.extapi.model.SModelSimpleHeader +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil +import jetbrains.mps.openapi.navigation.NavigationSupport +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.ModelCannotBeCreatedException +import jetbrains.mps.project.* +import jetbrains.mps.smodel.SModelId +import jetbrains.mps.smodel.SNodeUtil +import jetbrains.mps.util.JDOMUtil +import org.fbme.ide.iec61499.repository.PlatformElement +import org.fbme.ide.iec61499.repository.PlatformElementsOwner +import org.fbme.ide.iec61499.repository.PlatformRepository +import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.converter.PlatformConverter +import org.fbme.ide.platform.persistence.Iec61499ModelFactory +import org.fbme.ide.platform.persistence.Iec61499ModelHeader +import org.jdom.Document +import org.jetbrains.mps.openapi.model.SModel +import org.jetbrains.mps.openapi.model.SModelName +import org.jetbrains.mps.openapi.model.SModelReference +import org.jetbrains.mps.openapi.model.SNode +import org.jetbrains.mps.openapi.persistence.ModelLoadException +import org.jetbrains.mps.openapi.persistence.PersistenceFacade +import java.io.* +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.util.stream.Collectors +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel + +class ImportNxtLibraryAction: AnAction() { + + companion object { + + val NAMESPACES_FILE_EXTENSION = ".iecproj" + val NAMESPACES_XML_TAG = "Namespaces" + val NAMESPACE_XML_TAG = "Ns" + val NAMESPACE_PARAMETER_XML_TAG = "Name" + val FB_XML_TAG = "FB" + val FB_PARAMETER_XML_TAG = "Name" + + fun extractNamespaces(folderPath: String): HashMap { + val result = HashMap() + + val iecprojFilePath = Files.walk(Paths.get(folderPath)) + .filter { path: Path -> path.toString().endsWith(NAMESPACES_FILE_EXTENSION) } + .collect(Collectors.toList()) + .firstOrNull() ?: throw RuntimeException("No .iecproj file found in the directory") + + BufferedReader(FileReader(iecprojFilePath.toFile())).use { reader -> + val doc = JDOMUtil.loadDocument(reader) + val rootElement = doc.rootElement + + val namespacesElement = rootElement.getChild(NAMESPACES_XML_TAG, rootElement.namespace) + + for (nsElement in namespacesElement.getChildren(NAMESPACE_XML_TAG, rootElement.namespace)) { + val namespaceName = nsElement.getAttributeValue(NAMESPACE_PARAMETER_XML_TAG) + val fbNames = nsElement.getChildren(FB_XML_TAG, rootElement.namespace) + .map { it.getAttributeValue(FB_PARAMETER_XML_TAG) } + // for all fbNames in the namespace, add the namespaceName to the result + fbNames.forEach { result[it] = namespaceName } + } + } + + return result + } + + + fun initModel(project: Project, repository: PlatformRepository, model: SModel, moduleName: String, folderPath: String): PlatformElement { + val nxtLibNamespaceFolder = "$folderPath/Files" + + val namespaces = extractNamespaces(folderPath) + + val modelId = SModelId.generate() + val modelName = "Library@content" + + val ref = PersistenceFacade.getInstance().createModelReference(null, modelId, modelName) + val header: SModelSimpleHeader = Iec61499ModelHeader(ref, emptyList()) + + val entries = loadEntries(File(nxtLibNamespaceFolder)) + + val errorEntries = mutableSetOf() + for (entry in entries) { + try { + loadRootFromFile(header, entry, model, namespaces) + } catch (e: Exception) { +// errorEntries += entry + } + } + if (errorEntries.isNotEmpty()) { + val notification = Notification( + "fbme.integration.nxt", + "Error during import", + "Failed to load ${errorEntries.size} documents: ${errorEntries.joinToString { it.name }}", + NotificationType.ERROR + ) + Notifications.Bus.notify(notification, project) + } + val first = model.rootNodes.firstOrNull() + if (first != null) { + return repository.adapter(first) + } + val result = repository.iec61499Factory.createBasicFBTypeDeclaration(null) + result.name = "EmptyBasicFB" + return result as PlatformElement + } + + @Throws(ModelLoadException::class) + fun loadRootFromFile(header: SModelSimpleHeader, documentFile: File, model: SModel, namespaces: HashMap) { + BufferedReader(FileReader(documentFile)).use { reader -> + val doc = JDOMUtil.loadDocument(reader) + val node = convertRootNode(header.modelReference, doc, documentFile.extension) + if (node != null) { + val virtualPackage = namespaces[documentFile.name] + if (virtualPackage != null && virtualPackage.isNotEmpty()) { + node.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, virtualPackage) + } + model.addRootNode(node) + } + } + } + + private fun convertRootNode(reference: SModelReference, doc: Document, fileExtension: String?): SNode? { + val owner = PlatformElementsOwner() + val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) + val converter = PlatformConverter.create(configuration, reference, doc) + return when (fileExtension) { + Iec61499ModelFactory.FBT_FILE_EXT -> (converter.convertFBType() as PlatformElement).node + Iec61499ModelFactory.ADP_FILE_EXT -> (converter.convertAdapterType() as PlatformElement).node + Iec61499ModelFactory.SUB_FILE_EXT -> (converter.convertSubapplicationType() as PlatformElement).node + Iec61499ModelFactory.RES_FILE_EXT -> (converter.convertResourceType() as PlatformElement).node + Iec61499ModelFactory.DEV_FILE_EXT -> (converter.convertDeviceType() as PlatformElement).node + Iec61499ModelFactory.SEG_FILE_EXT -> (converter.convertSegmentType() as PlatformElement).node + Iec61499ModelFactory.SYS_FILE_EXT -> (converter.convertSystemConfiguration() as PlatformElement).node + else -> null + } + } + + private fun supportedFileExtension(fileExt: String): Boolean { + return fileExt == Iec61499ModelFactory.FBT_FILE_EXT + || fileExt == Iec61499ModelFactory.ADP_FILE_EXT + || fileExt == Iec61499ModelFactory.SUB_FILE_EXT + || fileExt == Iec61499ModelFactory.RES_FILE_EXT + || fileExt == Iec61499ModelFactory.DEV_FILE_EXT + || fileExt == Iec61499ModelFactory.SYS_FILE_EXT + || fileExt == Iec61499ModelFactory.SEG_FILE_EXT + } + + private fun loadEntries(rootDirectory: File): Sequence = sequence { + val files = rootDirectory.listFiles() ?: return@sequence + for (file in files) { + if (file.isDirectory) { + for (nestedFile in file.listFiles()!!) { // unexpected format if exception occurs + if (supportedFileExtension(nestedFile.extension)) { + yield(nestedFile) + } + } + } + } + } + + private fun handleSelectedFolderPath(folderPath: String, e: AnActionEvent) { +// TODO: copy all files + + // Suppose we've already copied all files, now + // we have to parse them + + val mpsProject: MPSProject = e.getData(MPSCommonDataKeys.MPS_PROJECT)!! + mpsProject.modelAccess.runWriteAction { + // create a variable called moduleName and assign to it the name of directory specified by folderPath + val moduleName = File(folderPath).name + + val moduleDir = mpsProject.project.basePath + "/solutions/" + moduleName + val solution = NewModuleUtil.createSolution(moduleName, moduleDir, mpsProject) + val root = solution.modelRoots.iterator().next() as DefaultModelRoot + val model = try { + root.createModel(SModelName("Library@content"), null, + Iec61499ModelFactory.DST, + Iec61499ModelFactory.TYPE + ) + } catch (e: ModelCannotBeCreatedException) { + throw RuntimeException("Model can not be created", e) + } + val repository = PlatformRepositoryProvider.getInstance(mpsProject) + val initialElement = initModel(mpsProject.project, repository, model, moduleName, folderPath) + model.module.declaredDependencies + val initialNode = initialElement.node + mpsProject.repository.modelAccess.runReadInEDT { + val navigationSupport = NavigationSupport.getInstance() + navigationSupport.openNode(mpsProject, initialNode, true, false) + navigationSupport.selectInTree(mpsProject, initialNode, false) + } + } + } + } + + override fun actionPerformed(e: AnActionEvent) { + val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() + val textFieldWithBrowseButton = TextFieldWithBrowseButton() + textFieldWithBrowseButton.addBrowseFolderListener("Select NxtLib Archive", null, null, fileChooserDescriptor) + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Select NxtLib Folder")) + panel.add(textFieldWithBrowseButton) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = "Import NxtLib" + } + + override fun createCenterPanel(): JComponent { + return panel + } + } + + if (dialogWrapper.showAndGet()) { + val filePath = textFieldWithBrowseButton.text + handleSelectedFolderPath(filePath, e) + } + } + +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/NewLibraryAction.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/NewLibraryAction.kt new file mode 100644 index 000000000..e8c8e1158 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/NewLibraryAction.kt @@ -0,0 +1,106 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil +import jetbrains.mps.ide.projectPane.ProjectPane +import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel +import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog +import jetbrains.mps.openapi.navigation.NavigationSupport +import jetbrains.mps.persistence.DefaultModelRoot +import jetbrains.mps.persistence.ModelCannotBeCreatedException +import jetbrains.mps.project.MPSExtentions +import jetbrains.mps.project.ModelImporter +import jetbrains.mps.project.Solution +import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider +import org.fbme.ide.platform.library.LibraryFacetFactory +import org.fbme.ide.platform.persistence.Iec61499ModelFactory +import org.fbme.ide.platform.projectWizard.LibraryTemplate +import org.jetbrains.mps.openapi.model.SModel +import org.jetbrains.mps.openapi.model.SModelName + +class NewLibraryAction : AnAction() { + + override fun actionPerformed(event: AnActionEvent) { + val mpsProject = event.getData(MPSCommonDataKeys.MPS_PROJECT) + val cfg = + NameLocationPanel(NewModuleDialog.projectHome(mpsProject!!), "Solution name:", "Solution file location:") + cfg.withDefaults("NewSolution", "solutions") + val dialog = NewModuleDialog(mpsProject, cfg) + dialog.withCheck { + NewModuleUtil.check( + mpsProject, + MPSExtentions.DOT_SOLUTION, + cfg.moduleName, + cfg.moduleLocation.absolutePath + ) + } + + var model: SModel? = null + + dialog.withFactory { + val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) + + val root = result.modelRoots.iterator().next() as DefaultModelRoot + model = try { + val fullModelName = "NewLibrary@content" + root.createModel(SModelName(fullModelName), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE) + } catch (e: ModelCannotBeCreatedException) { + throw RuntimeException("Model can not be created", e) + } + + val repository = PlatformRepositoryProvider.getInstance(mpsProject) + val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) + + mpsProject.repository.modelAccess.runReadInEDT { + val navigationSupport = NavigationSupport.getInstance() + navigationSupport.openNode(mpsProject, initialElement.node, true, false) + navigationSupport.selectInTree(mpsProject, initialElement.node, false) + } + + val facetFactory = LibraryFacetFactory.CUSTOM_FACET_FACTORY + +// TODO: add factory at the FBME start +// val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) +// if (facetsRegistry.getFacetFactory("library") == null) { +// facetsRegistry.addFactory("library", facetFactory) +// } + +// val libFacet = facetFactory.create(result) +// result.moduleDescriptor.addFacetDescriptor(libFacet) +//// result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) + result.setModuleDescriptor(result.moduleDescriptor, true) + result.save() + + result + } + + + + dialog.title = "New Library" + dialog.show() + if (!dialog.isOK) { + return + } + + val solution = dialog.result ?: return + + val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) + projectPane.selectModule(solution, false) + + mpsProject.modelAccess.runWriteAction { + mpsProject.projectModules.forEach { module -> +// TODO: import created module&model only to module/models with specific facet + module.models.forEach { + val modelImporter = ModelImporter(it) + modelImporter.prepare(model!!.reference) + modelImporter.execute() + } + } + } + + + } + +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/SetNamespaceAction.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/SetNamespaceAction.kt new file mode 100644 index 000000000..d486f1c99 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/actions/SetNamespaceAction.kt @@ -0,0 +1,56 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.ui.DialogWrapper +import com.intellij.openapi.ui.VerticalFlowLayout +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.ide.ui.tree.smodel.SNodeTreeNode +import jetbrains.mps.project.AbstractModule +import jetbrains.mps.project.StandaloneMPSProject +import jetbrains.mps.smodel.SNodeUtil +import javax.swing.JComponent +import javax.swing.JLabel +import javax.swing.JPanel +import javax.swing.JTextField + + +class SetNamespaceAction: AnAction() { + + val BUTTON_TITLE = "Set namespace" + + override fun actionPerformed(e: AnActionEvent) { + val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject + val mpsNode = (e.getData(MPSCommonDataKeys.TREE_NODE) as SNodeTreeNode).sNode!! + + val textField = JTextField() + + val panel = JPanel(VerticalFlowLayout()) + panel.add(JLabel("Specify the namespace:")) + panel.add(textField) + + val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { + init { + init() + title = BUTTON_TITLE + } + + override fun createCenterPanel(): JComponent? { + return panel + } + } + + mpsProject.modelAccess.runWriteAction { + if (dialogWrapper.showAndGet()) { + val namespaceName = textField.text + mpsNode.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, namespaceName) + + (mpsNode.model!!.module as AbstractModule).setChanged() + + mpsProject.save() + + } + } + + } +} diff --git a/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt new file mode 100644 index 000000000..63b03efc8 --- /dev/null +++ b/code/lib-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt @@ -0,0 +1,107 @@ +package org.fbme.ide.platform.library.util + +import jetbrains.mps.extapi.module.ModuleFacetBase +import org.fbme.ide.iec61499.repository.PlatformElement +import org.fbme.ide.iec61499.repository.PlatformElementsOwner +import org.fbme.ide.platform.converter.PlatformConverter +import org.jdom.Document +import org.jetbrains.mps.openapi.model.SModelReference +import org.jetbrains.mps.openapi.model.SNode +import org.jetbrains.mps.openapi.module.SModule +import org.jetbrains.mps.openapi.persistence.Memento + +class LibraryFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { + companion object { + private const val FACET_TYPE = "library" + private const val NAMESPACES_KEY = "namespaces" + private const val GENERATED_KEY = "generated" + private const val PATH_KEY = "path" + } + + private val namespaces: HashMap = HashMap() + + /** + * Adds a new namespace to the namespaces map. + * + * @param node The SNode to be added. + * @param namespace The namespace represented by a String. + */ + fun addNamespace(node: SNode, namespace: String) { + namespaces[node] = namespace + } + + /** + * Removes a namespace from the namespaces map. + * + * @param node The SNode to be removed. + */ + fun removeNamespace(node: SNode) { + namespaces.remove(node) + } + + /** + * Returns the namespace of a specific SNode. + * + * @param node The SNode whose namespace is to be retrieved. + * @return The namespace of the SNode. + */ + fun getNamespace(node: SNode): String? { + return namespaces[node] + } + + /** + * Returns all the namespaces stored in the namespaces map. + * + * @return A map of all namespaces. + */ + fun getAllNamespaces(): Map { + return namespaces + } + + /** + * Save the current state of the namespaces map to a Memento object. + * + * @param memento The Memento object to save to. + */ + override fun save(memento: Memento) { + memento.clear() + namespaces.forEach { (node, namespace) -> + val child = memento.createChild(NAMESPACES_KEY) + child.put(GENERATED_KEY, node.nodeId.toString()) + child.put(PATH_KEY, namespace) + } + } + + /** + * Load the state of the namespaces map from a Memento object. + * + * @param memento The Memento object to load from. + */ + override fun load(memento: Memento) { + namespaces.clear() + memento.getChildren(NAMESPACES_KEY).forEach { child -> + val nodeId = child.get(GENERATED_KEY) + val namespace = child.get(PATH_KEY) + if (nodeId != null && namespace != null) { + val node = + namespaces[node] = namespace + } + } + } + + /** + * Converts an SNode to a PlatformElement. + * + * @param node The SNode to be converted. + * @param reference The SModelReference for the model that the SNode belongs to. + * @param doc The Document that represents the XML structure of the SNode. + * @return The converted PlatformElement. + */ + fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { + val owner = PlatformElementsOwner() + val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) + val converter = PlatformConverter.create(configuration, reference, doc) + return converter.convert(node) as PlatformElement + } + +} diff --git a/code/lib-management/src/main/resources/META-INF/plugin.xml b/code/lib-management/src/main/resources/META-INF/plugin.xml new file mode 100644 index 000000000..9a28d8b11 --- /dev/null +++ b/code/lib-management/src/main/resources/META-INF/plugin.xml @@ -0,0 +1,37 @@ + + + fbme.lib-management + FBME - Lib management + Defines the core functionality for FBME lib management + 0.1 + FBME + + fbme.library + jetbrains.mps.core + jetbrains.mps.execution.languages + + + + + + + + + + + + + + + diff --git a/code/lib-management/src/main/resources/icons/lib.svg b/code/lib-management/src/main/resources/icons/lib.svg new file mode 100644 index 000000000..6c93a1f63 --- /dev/null +++ b/code/lib-management/src/main/resources/icons/lib.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/code/lib-management/src/main/resources/icons/library_project.svg b/code/lib-management/src/main/resources/icons/library_project.svg new file mode 100644 index 000000000..2765d6d21 --- /dev/null +++ b/code/lib-management/src/main/resources/icons/library_project.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/code/lib-management/src/main/resources/icons/system_project.svg b/code/lib-management/src/main/resources/icons/system_project.svg new file mode 100644 index 000000000..6c3c729c6 --- /dev/null +++ b/code/lib-management/src/main/resources/icons/system_project.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt new file mode 100644 index 000000000..ead0d5b3d --- /dev/null +++ b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt @@ -0,0 +1,191 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooser +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.project.MPSProject +import jetbrains.mps.project.Solution +import junit.framework.TestCase.assertEquals +import org.fbme.ide.platform.testing.PlatformTestRunner +import org.junit.Test +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mock + +@RunWith(PlatformTestRunner::class) +class LibraryActionsTest { + + @Test + fun testNewLibraryAction() { + // Arrange + val newLibraryAction = NewLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock dialog to set module name and location + val cfg = mock(NameLocationPanel::class.java) + `when`(NewModuleDialog.projectHome(project)).thenReturn("solutions") + `when`(cfg.withDefaults("NewSolution", "solutions")).thenReturn(cfg) + val dialog = mock(NewModuleDialog::class.java) + `when`(NewModuleDialog(project, cfg)).thenReturn(dialog) + val model = mock(SModel::class.java) + val result = mock(Solution::class.java) + val modelRoot = mock(DefaultModelRoot::class.java) + `when`(result.modelRoots).thenReturn(setOf(modelRoot)) + `when`(modelRoot.createModel(SModelName("NewLibrary@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE)).thenReturn(model) + val repository = mock(PlatformRepository::class.java) + `when`(PlatformRepositoryProvider.getInstance(project)).thenReturn(repository) + val facet = mock(ModuleFacetBase::class.java) + `when`(result.getFacet(Iec61499Facet.FACET_TYPE)).thenReturn(facet) + val modelImporter = mock(ModelImporter::class.java) + `when`(ModelImporter(it)).thenReturn(modelImporter) + + + // Act + newLibraryAction.actionPerformed(event) + + // Assert + // Add your assertions here based on the expected outcome of the action + + assertNotNull(model) + assertEquals("NewLibrary@Content", model.getName().getValue()) + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + + } + + @Test + fun testExportLibraryAction() { + // Arrange + val exportLibraryAction = ExportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + // Assuming that the solution is selected in the project pane + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + // mock mpsProject to get the project + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock ideaProject to get the project base path + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + // mock module name + `when`(solution.moduleName).thenReturn("NewLibrary") + + // Act + exportLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + // check that the zip file is created + val zipFile = File("/path/to/project/NewLibrary.zip") + assertTrue(zipFile.exists()) + + } + + @Test + fun testImportLibraryAction() { + // Arrange + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(mpsProject) + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/Library.zip")) + + // Act + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + // remove the extracted directory + extractedDir.delete() + + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + + } + + @Test + fun testNewLibImportExport() { + val newLibraryAction = NewLibraryAction() + val exportLibraryAction = ExportLibraryAction() + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + `when`(solution.moduleName).thenReturn("NewLibrary") + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/NewLibrary.zip")) + + // Act + newLibraryAction.actionPerformed(event) + exportLibraryAction.actionPerformed(event) + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + val zipFile = File("/code/platform/src/test/resources/NewLibrary.zip") + assertTrue(zipFile.exists()) + + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + } + +} \ No newline at end of file diff --git a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt new file mode 100644 index 000000000..d5f128ee4 --- /dev/null +++ b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt @@ -0,0 +1,4 @@ +package org.fbme.ide.platform.library + +class TestUtils { +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 14f191ebb..fe292860b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,4 +17,8 @@ include( "samples:statistics-plugin", "samples:sandbox", "samples:smv-debugger" -) \ No newline at end of file +) +include("code:lib-managment") +findProject(":code:lib-managment")?.name = "lib-managment" +include("code:lib-management") +findProject(":code:lib-management")?.name = "lib-management" From 213673026cb506b23356fdf4c262af96fa7c1623 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 13 May 2024 12:57:35 +0300 Subject: [PATCH 47/50] Moved to separate plugin --- .../platform/library/LibraryFacetFactory.kt | 21 -- .../ide/platform/library/LibraryFacetTab.kt | 103 -------- .../library/LibraryFacetTabFactory.kt | 13 - .../library/actions/ExportLibraryAction.kt | 95 ------- .../library/actions/ImportLibraryAction.kt | 182 -------------- .../library/actions/ImportNxtLibraryAction.kt | 238 ------------------ .../library/actions/NewLibraryAction.kt | 106 -------- .../library/actions/SetNamespaceAction.kt | 56 ----- .../ide/platform/library/util/LibraryFacet.kt | 107 -------- .../src/main/resources/META-INF/plugin.xml | 19 -- .../platform/src/main/resources/icons/lib.svg | 1 - .../main/resources/icons/library_project.svg | 5 - .../main/resources/icons/system_project.svg | 5 - .../platform/library/LibraryActionsTest.kt | 191 -------------- .../fbme/ide/platform/library/TestUtils.kt | 4 - 15 files changed, 1146 deletions(-) delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt delete mode 100644 code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt delete mode 100644 code/platform/src/main/resources/icons/lib.svg delete mode 100644 code/platform/src/main/resources/icons/library_project.svg delete mode 100644 code/platform/src/main/resources/icons/system_project.svg delete mode 100644 code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt delete mode 100644 code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt deleted file mode 100644 index 1b31c73be..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetFactory.kt +++ /dev/null @@ -1,21 +0,0 @@ -package org.fbme.ide.platform.library - -import org.fbme.ide.platform.library.util.LibraryFacet -import org.jetbrains.mps.openapi.module.FacetsFacade.FacetFactory -import org.jetbrains.mps.openapi.module.SModule -import org.jetbrains.mps.openapi.module.SModuleFacet - -class LibraryFacetFactory : FacetFactory { - - override fun create(sModule: SModule): SModuleFacet { - return LibraryFacet(sModule) - } - - override fun getPresentation(): String { - return "Library" - } - - companion object { - var CUSTOM_FACET_FACTORY = LibraryFacetFactory() - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt deleted file mode 100644 index 62f07de3d..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTab.kt +++ /dev/null @@ -1,103 +0,0 @@ -package org.fbme.ide.platform.library - -import com.intellij.openapi.ui.VerticalFlowLayout -import com.intellij.ui.components.JBLabel -import com.intellij.uiDesigner.core.GridConstraints -import com.intellij.uiDesigner.core.GridLayoutManager -import com.intellij.util.ui.JBInsets -import com.intellij.util.ui.JBUI -import jetbrains.mps.ide.ui.dialogs.properties.tabs.BaseTab -import org.fbme.ide.platform.library.util.LibraryFacet -import org.jetbrains.mps.openapi.module.SModuleFacet -import org.jetbrains.mps.openapi.ui.persistence.FacetTab -import java.awt.Dimension -import javax.swing.BorderFactory -import javax.swing.JLabel -import javax.swing.JPanel -import javax.swing.JTextField - -class LibraryFacetTab(val moduleFacet: LibraryFacet): BaseTab(), FacetTab { - private var myTextField: JTextField? = null - - private fun displayAllNamespaces() { - val namespacesPanel = JPanel(VerticalFlowLayout()) - moduleFacet.getAllNamespaces().forEach { (node, namespace) -> - val label = JLabel("Node ID: ${node.nodeId}, Name: ${node.name}, Namespace: $namespace") - label.border = BorderFactory.createEmptyBorder(10, 10, 10, 10) // Add space around the label - namespacesPanel.add(label) - } - tabComponent.add(namespacesPanel) - } - - override fun init() { - val content = JPanel() - content.setLayout(GridLayoutManager(1, 2, JBUI.emptyInsets(), -1, -1)) - - val label = JBLabel("Plugin ID:") - content.add( - label, GridConstraints( - 0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, - GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false - ) - ) - - myTextField = JTextField("ID") - myTextField!!.isEditable = false - - content.add( - myTextField, GridConstraints( - 0, - 1, - 1, - 1, - GridConstraints.ANCHOR_WEST, - GridConstraints.FILL_HORIZONTAL, - GridConstraints.SIZEPOLICY_CAN_GROW, - GridConstraints.SIZEPOLICY_FIXED, - null, - null, - null, - 0, - false - ) - ) - - val outerPanel = JPanel() - outerPanel.setLayout(GridLayoutManager(1, 1, JBInsets(10, 10, 10, 10), -1, -1)) - outerPanel.add( - content, - GridConstraints( - 0, - 0, - 1, - 1, - GridConstraints.ANCHOR_NORTHWEST, - GridConstraints.FILL_HORIZONTAL, - GridConstraints.SIZEPOLICY_WANT_GROW, - GridConstraints.SIZEPOLICY_FIXED, - null, - Dimension(150, -1), - null, - 0, - false - ) - ) - - displayAllNamespaces() - - tabComponent = outerPanel - } - - override fun isModified(): Boolean { - TODO("Not yet implemented") - } - - override fun apply() { - TODO("Not yet implemented") - } - - override fun getFacet(): SModuleFacet { - return moduleFacet - } - -} \ No newline at end of file diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt deleted file mode 100644 index cce281315..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/LibraryFacetTabFactory.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.fbme.ide.platform.library - -import org.fbme.ide.platform.library.util.LibraryFacet -import org.fbme.ide.platform.library.LibraryFacetTab -import org.jetbrains.mps.openapi.ui.persistence.FacetTab -import org.jetbrains.mps.openapi.ui.persistence.TabFactory - - -class LibraryFacetTabFactory : TabFactory { - override fun getTab(moduleFacet: LibraryFacet?): FacetTab { - return LibraryFacetTab(moduleFacet!!) - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt deleted file mode 100644 index 356395311..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ExportLibraryAction.kt +++ /dev/null @@ -1,95 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.project.Solution -import jetbrains.mps.vfs.IFile -import org.jetbrains.mps.openapi.module.SModule -import java.io.File -import java.io.FileInputStream -import java.io.FileOutputStream -import java.io.IOException -import java.util.zip.ZipEntry -import java.util.zip.ZipOutputStream - - -class ExportLibraryAction: AnAction() { - - private fun resolveModulePath(module: SModule): String? { - require(module is Solution) { "The module is not a Solution." } - // Attempt to get the descriptor file - val descriptorFile: IFile? = module.descriptorFile - return descriptorFile?.getParent()?.path - - } - - override fun actionPerformed(e: AnActionEvent) { - val module = e.getData(MPSCommonDataKeys.CONTEXT_MODULE) ?: return - - // TODO: (SEE the same note at the ImportLIbraryAction.kt - // consider rename solution or it's id in .mds or header file in order to avoid id conflicts - // while importing exported library - - val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) - val ideaProject = mpsProject!!.project - val targetDir = ideaProject.basePath - zipModule(module, targetDir + "/" + module.moduleName + ".zip") - } - - @Throws(IOException::class) - fun zipModule(module: SModule?, zipFilePath: String?) { - val modulePath = resolveModulePath(module!!) - val fos = FileOutputStream(zipFilePath) - val zipOut = ZipOutputStream(fos) - val fileToZip = File(modulePath) - zipFile(fileToZip, fileToZip.getName(), zipOut) - zipOut.close() - fos.close() - } - - @Throws(IOException::class) - private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream) { - if (!fileToZip.isDirectory()) { - zipFile(fileToZip, fileName, zipOut, "") - return - } - val children = fileToZip.listFiles() - if (children != null) { - for (childFile in children) { - zipFile(childFile, fileName + "/" + childFile.getName(), zipOut, fileName) - } - } - } - - @Throws(IOException::class) - private fun zipFile(fileToZip: File, fileName: String, zipOut: ZipOutputStream, parentDirectoryName: String) { - var fileName = fileName - if (fileToZip.isHidden()) { - return - } - if (fileToZip.isDirectory()) { - if (!fileName.endsWith("/")) { - fileName += "/" - } - if (parentDirectoryName != "") { - zipOut.putNextEntry(ZipEntry(fileName)) - zipOut.closeEntry() - } - val children = fileToZip.listFiles() - for (childFile in children) { - zipFile(childFile, fileName + childFile.getName(), zipOut, fileName) - } - return - } - val fis = FileInputStream(fileToZip) - val zipEntry = ZipEntry(fileName) - zipOut.putNextEntry(zipEntry) - val bytes = ByteArray(1024) - var length: Int - while (fis.read(bytes).also { length = it } >= 0) { - zipOut.write(bytes, 0, length) - } - fis.close() - } -} \ No newline at end of file diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt deleted file mode 100644 index 07dc77b88..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportLibraryAction.kt +++ /dev/null @@ -1,182 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory -import com.intellij.openapi.ui.DialogWrapper -import com.intellij.openapi.ui.TextFieldWithBrowseButton -import com.intellij.openapi.ui.VerticalFlowLayout -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.persistence.DefaultModelRoot -import jetbrains.mps.persistence.MementoImpl -import jetbrains.mps.project.ModuleId -import jetbrains.mps.project.ProjectPathUtil -import jetbrains.mps.project.Solution -import jetbrains.mps.project.StandaloneMPSProject -import jetbrains.mps.project.structure.modules.ModuleFacetDescriptor -import jetbrains.mps.project.structure.modules.SolutionDescriptor -import jetbrains.mps.smodel.GeneralModuleFactory -import jetbrains.mps.smodel.ModuleDependencyVersions -import jetbrains.mps.smodel.language.LanguageRegistry -import jetbrains.mps.vfs.IFile -import org.jdom.Document -import org.jdom.Element -import org.jdom.input.SAXBuilder -import org.jdom.output.Format -import org.jdom.output.XMLOutputter -import java.io.BufferedOutputStream -import java.io.File -import java.io.FileInputStream -import java.io.FileOutputStream -import java.util.zip.ZipInputStream -import javax.swing.JComponent -import javax.swing.JLabel -import javax.swing.JPanel - - -class ImportLibraryAction: AnAction() { - - companion object { - fun unzip(zipFilePath: String, targetDirectoryPath: String) { - val buffer = ByteArray(1024) - val zipFile = File(zipFilePath) - val folder = File(targetDirectoryPath) - if (!folder.exists()) { - folder.mkdirs() - } - - ZipInputStream(FileInputStream(zipFile)).use { zis -> - var zipEntry = zis.nextEntry - while (zipEntry != null) { - val newFile = File(folder, zipEntry.name) - if (zipEntry.isDirectory) { - newFile.mkdirs() - } else { - File(newFile.parent).mkdirs() - - FileOutputStream(newFile).use { fos -> - var len: Int - BufferedOutputStream(fos, buffer.size).use { bos -> - while (zis.read(buffer).also { len = it } > 0) { - bos.write(buffer, 0, len) - } - } - } - } - zipEntry = zis.nextEntry - } - zis.closeEntry() - } - } - - private fun overrideModuleId(id: String, filePath: String) { - try { - val saxBuilder = SAXBuilder() - val document: Document = saxBuilder.build(File(filePath)) - val rootNode: Element = document.rootElement - - rootNode.setAttribute("uuid", id) - - val xmlOutputter = XMLOutputter(Format.getPrettyFormat()) - FileOutputStream(filePath).use { output -> - xmlOutputter.output(document, output) - } - } catch (e: Exception) { - e.printStackTrace() - } - } - - private fun getModuleFile(namespace: String, rootPath: IFile, extension: String): IFile { - return rootPath.findChild(namespace + extension) - } - - private fun createNewSolutionDescriptor(id: ModuleId, namespace: String, descriptorFile: IFile): SolutionDescriptor { - val descriptor = SolutionDescriptor() - descriptor.namespace = namespace - descriptor.id = id - val moduleLocation = descriptorFile.parent - val modelsDir = moduleLocation!!.findChild("models") - - modelsDir.mkdirs() - descriptor.modelRootDescriptors.add( - DefaultModelRoot.createDescriptor( - modelsDir.parent!!, - *arrayOf(modelsDir) - ) - ) - descriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("java", MementoImpl())) - ProjectPathUtil.setGeneratorOutputPath(descriptor, moduleLocation!!.findChild("source_gen").path) - return descriptor - } - - private fun handleSelectedFilePath(filePath: String, e: AnActionEvent) { -// :TODO: get module name from it's descriptor file -// path/to/archive/weird_name.zip - val moduleName = filePath.split("/").last().dropLast(4) - - val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject - - val zipFilePath = filePath - val targetDirectoryPath = mpsProject.project.basePath + "/solutions" - - unzip(zipFilePath, targetDirectoryPath) - val id = ModuleId.regular() - overrideModuleId(id.toString(), filePath) - - val namespace = moduleName - - mpsProject.modelAccess.runWriteAction { -// TODO: are there any issues with specific model(how do IEC61499 model gets loaded?) - - val descriptorFile = getModuleFile(namespace, - mpsProject.getFileSystem().getFile(targetDirectoryPath + "/" + moduleName), - ".msd") - -// NOTE: Before importing I've changed the "ref=" parameter, and haven't changed the uuid of the solution in -// .msd file - val descriptor = createNewSolutionDescriptor(id, namespace, descriptorFile) - val module = GeneralModuleFactory().instantiate(descriptor, descriptorFile) as Solution - mpsProject.addModule(module) - ModuleDependencyVersions( - (mpsProject.getComponent(LanguageRegistry::class.java) as LanguageRegistry)!!, - mpsProject.getRepository() - ).update(module) - module.save() - } - -// return module - - // TODO: add as a dependency - - println("Created?") - } - } - - override fun actionPerformed(e: AnActionEvent) { - // TODO: (SEE the same note at the ExportLIbraryAction.kt - // consider rename solution or it's id in .mds or header file in order to avoid id conflicts - val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() - val textFieldWithBrowseButton = TextFieldWithBrowseButton() - textFieldWithBrowseButton.addBrowseFolderListener("Select Archive", null, null, fileChooserDescriptor) - - val panel = JPanel(VerticalFlowLayout()) - panel.add(JLabel("Select Archive:")) - panel.add(textFieldWithBrowseButton) - - val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { - init { - init() - title = "Import Library" - } - - override fun createCenterPanel(): JComponent? { - return panel - } - } - - if (dialogWrapper.showAndGet()) { - val filePath = textFieldWithBrowseButton.text - handleSelectedFilePath(filePath, e) - } - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt deleted file mode 100644 index d2464e266..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/ImportNxtLibraryAction.kt +++ /dev/null @@ -1,238 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.notification.Notification -import com.intellij.notification.NotificationType -import com.intellij.notification.Notifications -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory -import com.intellij.openapi.project.Project -import com.intellij.openapi.ui.DialogWrapper -import com.intellij.openapi.ui.TextFieldWithBrowseButton -import com.intellij.openapi.ui.VerticalFlowLayout -import jetbrains.mps.extapi.model.SModelSimpleHeader -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil -import jetbrains.mps.openapi.navigation.NavigationSupport -import jetbrains.mps.persistence.DefaultModelRoot -import jetbrains.mps.persistence.ModelCannotBeCreatedException -import jetbrains.mps.project.* -import jetbrains.mps.smodel.SModelId -import jetbrains.mps.smodel.SNodeUtil -import jetbrains.mps.util.JDOMUtil -import org.fbme.ide.iec61499.repository.PlatformElement -import org.fbme.ide.iec61499.repository.PlatformElementsOwner -import org.fbme.ide.iec61499.repository.PlatformRepository -import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider -import org.fbme.ide.platform.converter.PlatformConverter -import org.fbme.ide.platform.persistence.Iec61499ModelFactory -import org.fbme.ide.platform.persistence.Iec61499ModelHeader -import org.jdom.Document -import org.jetbrains.mps.openapi.model.SModel -import org.jetbrains.mps.openapi.model.SModelName -import org.jetbrains.mps.openapi.model.SModelReference -import org.jetbrains.mps.openapi.model.SNode -import org.jetbrains.mps.openapi.persistence.ModelLoadException -import org.jetbrains.mps.openapi.persistence.PersistenceFacade -import java.io.* -import java.nio.file.Files -import java.nio.file.Path -import java.nio.file.Paths -import java.util.stream.Collectors -import javax.swing.JComponent -import javax.swing.JLabel -import javax.swing.JPanel - -class ImportNxtLibraryAction: AnAction() { - - companion object { - - val NAMESPACES_FILE_EXTENSION = ".iecproj" - val NAMESPACES_XML_TAG = "Namespaces" - val NAMESPACE_XML_TAG = "Ns" - val NAMESPACE_PARAMETER_XML_TAG = "Name" - val FB_XML_TAG = "FB" - val FB_PARAMETER_XML_TAG = "Name" - - fun extractNamespaces(folderPath: String): HashMap { - val result = HashMap() - - val iecprojFilePath = Files.walk(Paths.get(folderPath)) - .filter { path: Path -> path.toString().endsWith(NAMESPACES_FILE_EXTENSION) } - .collect(Collectors.toList()) - .firstOrNull() ?: throw RuntimeException("No .iecproj file found in the directory") - - BufferedReader(FileReader(iecprojFilePath.toFile())).use { reader -> - val doc = JDOMUtil.loadDocument(reader) - val rootElement = doc.rootElement - - val namespacesElement = rootElement.getChild(NAMESPACES_XML_TAG, rootElement.namespace) - - for (nsElement in namespacesElement.getChildren(NAMESPACE_XML_TAG, rootElement.namespace)) { - val namespaceName = nsElement.getAttributeValue(NAMESPACE_PARAMETER_XML_TAG) - val fbNames = nsElement.getChildren(FB_XML_TAG, rootElement.namespace) - .map { it.getAttributeValue(FB_PARAMETER_XML_TAG) } - // for all fbNames in the namespace, add the namespaceName to the result - fbNames.forEach { result[it] = namespaceName } - } - } - - return result - } - - - fun initModel(project: Project, repository: PlatformRepository, model: SModel, moduleName: String, folderPath: String): PlatformElement { - val nxtLibNamespaceFolder = "$folderPath/Files" - - val namespaces = extractNamespaces(folderPath) - - val modelId = SModelId.generate() - val modelName = "Library@content" - - val ref = PersistenceFacade.getInstance().createModelReference(null, modelId, modelName) - val header: SModelSimpleHeader = Iec61499ModelHeader(ref, emptyList()) - - val entries = loadEntries(File(nxtLibNamespaceFolder)) - - val errorEntries = mutableSetOf() - for (entry in entries) { - try { - loadRootFromFile(header, entry, model, namespaces) - } catch (e: Exception) { -// errorEntries += entry - } - } - if (errorEntries.isNotEmpty()) { - val notification = Notification( - "fbme.integration.nxt", - "Error during import", - "Failed to load ${errorEntries.size} documents: ${errorEntries.joinToString { it.name }}", - NotificationType.ERROR - ) - Notifications.Bus.notify(notification, project) - } - val first = model.rootNodes.firstOrNull() - if (first != null) { - return repository.adapter(first) - } - val result = repository.iec61499Factory.createBasicFBTypeDeclaration(null) - result.name = "EmptyBasicFB" - return result as PlatformElement - } - - @Throws(ModelLoadException::class) - fun loadRootFromFile(header: SModelSimpleHeader, documentFile: File, model: SModel, namespaces: HashMap) { - BufferedReader(FileReader(documentFile)).use { reader -> - val doc = JDOMUtil.loadDocument(reader) - val node = convertRootNode(header.modelReference, doc, documentFile.extension) - if (node != null) { - val virtualPackage = namespaces[documentFile.name] - if (virtualPackage != null && virtualPackage.isNotEmpty()) { - node.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, virtualPackage) - } - model.addRootNode(node) - } - } - } - - private fun convertRootNode(reference: SModelReference, doc: Document, fileExtension: String?): SNode? { - val owner = PlatformElementsOwner() - val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) - val converter = PlatformConverter.create(configuration, reference, doc) - return when (fileExtension) { - Iec61499ModelFactory.FBT_FILE_EXT -> (converter.convertFBType() as PlatformElement).node - Iec61499ModelFactory.ADP_FILE_EXT -> (converter.convertAdapterType() as PlatformElement).node - Iec61499ModelFactory.SUB_FILE_EXT -> (converter.convertSubapplicationType() as PlatformElement).node - Iec61499ModelFactory.RES_FILE_EXT -> (converter.convertResourceType() as PlatformElement).node - Iec61499ModelFactory.DEV_FILE_EXT -> (converter.convertDeviceType() as PlatformElement).node - Iec61499ModelFactory.SEG_FILE_EXT -> (converter.convertSegmentType() as PlatformElement).node - Iec61499ModelFactory.SYS_FILE_EXT -> (converter.convertSystemConfiguration() as PlatformElement).node - else -> null - } - } - - private fun supportedFileExtension(fileExt: String): Boolean { - return fileExt == Iec61499ModelFactory.FBT_FILE_EXT - || fileExt == Iec61499ModelFactory.ADP_FILE_EXT - || fileExt == Iec61499ModelFactory.SUB_FILE_EXT - || fileExt == Iec61499ModelFactory.RES_FILE_EXT - || fileExt == Iec61499ModelFactory.DEV_FILE_EXT - || fileExt == Iec61499ModelFactory.SYS_FILE_EXT - || fileExt == Iec61499ModelFactory.SEG_FILE_EXT - } - - private fun loadEntries(rootDirectory: File): Sequence = sequence { - val files = rootDirectory.listFiles() ?: return@sequence - for (file in files) { - if (file.isDirectory) { - for (nestedFile in file.listFiles()!!) { // unexpected format if exception occurs - if (supportedFileExtension(nestedFile.extension)) { - yield(nestedFile) - } - } - } - } - } - - private fun handleSelectedFolderPath(folderPath: String, e: AnActionEvent) { -// TODO: copy all files - - // Suppose we've already copied all files, now - // we have to parse them - - val mpsProject: MPSProject = e.getData(MPSCommonDataKeys.MPS_PROJECT)!! - mpsProject.modelAccess.runWriteAction { - // create a variable called moduleName and assign to it the name of directory specified by folderPath - val moduleName = File(folderPath).name - - val moduleDir = mpsProject.project.basePath + "/solutions/" + moduleName - val solution = NewModuleUtil.createSolution(moduleName, moduleDir, mpsProject) - val root = solution.modelRoots.iterator().next() as DefaultModelRoot - val model = try { - root.createModel(SModelName("Library@content"), null, - Iec61499ModelFactory.DST, - Iec61499ModelFactory.TYPE - ) - } catch (e: ModelCannotBeCreatedException) { - throw RuntimeException("Model can not be created", e) - } - val repository = PlatformRepositoryProvider.getInstance(mpsProject) - val initialElement = initModel(mpsProject.project, repository, model, moduleName, folderPath) - model.module.declaredDependencies - val initialNode = initialElement.node - mpsProject.repository.modelAccess.runReadInEDT { - val navigationSupport = NavigationSupport.getInstance() - navigationSupport.openNode(mpsProject, initialNode, true, false) - navigationSupport.selectInTree(mpsProject, initialNode, false) - } - } - } - } - - override fun actionPerformed(e: AnActionEvent) { - val fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor() - val textFieldWithBrowseButton = TextFieldWithBrowseButton() - textFieldWithBrowseButton.addBrowseFolderListener("Select NxtLib Archive", null, null, fileChooserDescriptor) - - val panel = JPanel(VerticalFlowLayout()) - panel.add(JLabel("Select NxtLib Folder")) - panel.add(textFieldWithBrowseButton) - - val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { - init { - init() - title = "Import NxtLib" - } - - override fun createCenterPanel(): JComponent { - return panel - } - } - - if (dialogWrapper.showAndGet()) { - val filePath = textFieldWithBrowseButton.text - handleSelectedFolderPath(filePath, e) - } - } - -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt deleted file mode 100644 index e8c8e1158..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/NewLibraryAction.kt +++ /dev/null @@ -1,106 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.ide.newSolutionDialog.NewModuleUtil -import jetbrains.mps.ide.projectPane.ProjectPane -import jetbrains.mps.ide.ui.dialogs.modules.NameLocationPanel -import jetbrains.mps.ide.ui.dialogs.modules.NewModuleDialog -import jetbrains.mps.openapi.navigation.NavigationSupport -import jetbrains.mps.persistence.DefaultModelRoot -import jetbrains.mps.persistence.ModelCannotBeCreatedException -import jetbrains.mps.project.MPSExtentions -import jetbrains.mps.project.ModelImporter -import jetbrains.mps.project.Solution -import org.fbme.ide.iec61499.repository.PlatformRepositoryProvider -import org.fbme.ide.platform.library.LibraryFacetFactory -import org.fbme.ide.platform.persistence.Iec61499ModelFactory -import org.fbme.ide.platform.projectWizard.LibraryTemplate -import org.jetbrains.mps.openapi.model.SModel -import org.jetbrains.mps.openapi.model.SModelName - -class NewLibraryAction : AnAction() { - - override fun actionPerformed(event: AnActionEvent) { - val mpsProject = event.getData(MPSCommonDataKeys.MPS_PROJECT) - val cfg = - NameLocationPanel(NewModuleDialog.projectHome(mpsProject!!), "Solution name:", "Solution file location:") - cfg.withDefaults("NewSolution", "solutions") - val dialog = NewModuleDialog(mpsProject, cfg) - dialog.withCheck { - NewModuleUtil.check( - mpsProject, - MPSExtentions.DOT_SOLUTION, - cfg.moduleName, - cfg.moduleLocation.absolutePath - ) - } - - var model: SModel? = null - - dialog.withFactory { - val result = NewModuleUtil.createSolution(cfg.moduleName, cfg.moduleLocation.absolutePath, mpsProject) - - val root = result.modelRoots.iterator().next() as DefaultModelRoot - model = try { - val fullModelName = "NewLibrary@content" - root.createModel(SModelName(fullModelName), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE) - } catch (e: ModelCannotBeCreatedException) { - throw RuntimeException("Model can not be created", e) - } - - val repository = PlatformRepositoryProvider.getInstance(mpsProject) - val initialElement = LibraryTemplate().initModel(mpsProject.project, repository, model!!) - - mpsProject.repository.modelAccess.runReadInEDT { - val navigationSupport = NavigationSupport.getInstance() - navigationSupport.openNode(mpsProject, initialElement.node, true, false) - navigationSupport.selectInTree(mpsProject, initialElement.node, false) - } - - val facetFactory = LibraryFacetFactory.CUSTOM_FACET_FACTORY - -// TODO: add factory at the FBME start -// val facetsRegistry: FacetsRegistry = mpsProject.getComponent(FacetsRegistry::class.java) -// if (facetsRegistry.getFacetFactory("library") == null) { -// facetsRegistry.addFactory("library", facetFactory) -// } - -// val libFacet = facetFactory.create(result) -// result.moduleDescriptor.addFacetDescriptor(libFacet) -//// result.moduleDescriptor.moduleFacetDescriptors.add(ModuleFacetDescriptor("library", MementoImpl())) - result.setModuleDescriptor(result.moduleDescriptor, true) - result.save() - - result - } - - - - dialog.title = "New Library" - dialog.show() - if (!dialog.isOK) { - return - } - - val solution = dialog.result ?: return - - val projectPane = ProjectPane.getInstance(event.getData(MPSCommonDataKeys.MPS_PROJECT)) - projectPane.selectModule(solution, false) - - mpsProject.modelAccess.runWriteAction { - mpsProject.projectModules.forEach { module -> -// TODO: import created module&model only to module/models with specific facet - module.models.forEach { - val modelImporter = ModelImporter(it) - modelImporter.prepare(model!!.reference) - modelImporter.execute() - } - } - } - - - } - -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt deleted file mode 100644 index d486f1c99..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/actions/SetNamespaceAction.kt +++ /dev/null @@ -1,56 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.ui.DialogWrapper -import com.intellij.openapi.ui.VerticalFlowLayout -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.ide.ui.tree.smodel.SNodeTreeNode -import jetbrains.mps.project.AbstractModule -import jetbrains.mps.project.StandaloneMPSProject -import jetbrains.mps.smodel.SNodeUtil -import javax.swing.JComponent -import javax.swing.JLabel -import javax.swing.JPanel -import javax.swing.JTextField - - -class SetNamespaceAction: AnAction() { - - val BUTTON_TITLE = "Set namespace" - - override fun actionPerformed(e: AnActionEvent) { - val mpsProject = e.getData(MPSCommonDataKeys.MPS_PROJECT) as StandaloneMPSProject - val mpsNode = (e.getData(MPSCommonDataKeys.TREE_NODE) as SNodeTreeNode).sNode!! - - val textField = JTextField() - - val panel = JPanel(VerticalFlowLayout()) - panel.add(JLabel("Specify the namespace:")) - panel.add(textField) - - val dialogWrapper: DialogWrapper = object : DialogWrapper(true) { - init { - init() - title = BUTTON_TITLE - } - - override fun createCenterPanel(): JComponent? { - return panel - } - } - - mpsProject.modelAccess.runWriteAction { - if (dialogWrapper.showAndGet()) { - val namespaceName = textField.text - mpsNode.setProperty(SNodeUtil.property_BaseConcept_virtualPackage, namespaceName) - - (mpsNode.model!!.module as AbstractModule).setChanged() - - mpsProject.save() - - } - } - - } -} diff --git a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt b/code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt deleted file mode 100644 index 63b03efc8..000000000 --- a/code/platform/src/main/kotlin/org/fbme/ide/platform/library/util/LibraryFacet.kt +++ /dev/null @@ -1,107 +0,0 @@ -package org.fbme.ide.platform.library.util - -import jetbrains.mps.extapi.module.ModuleFacetBase -import org.fbme.ide.iec61499.repository.PlatformElement -import org.fbme.ide.iec61499.repository.PlatformElementsOwner -import org.fbme.ide.platform.converter.PlatformConverter -import org.jdom.Document -import org.jetbrains.mps.openapi.model.SModelReference -import org.jetbrains.mps.openapi.model.SNode -import org.jetbrains.mps.openapi.module.SModule -import org.jetbrains.mps.openapi.persistence.Memento - -class LibraryFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { - companion object { - private const val FACET_TYPE = "library" - private const val NAMESPACES_KEY = "namespaces" - private const val GENERATED_KEY = "generated" - private const val PATH_KEY = "path" - } - - private val namespaces: HashMap = HashMap() - - /** - * Adds a new namespace to the namespaces map. - * - * @param node The SNode to be added. - * @param namespace The namespace represented by a String. - */ - fun addNamespace(node: SNode, namespace: String) { - namespaces[node] = namespace - } - - /** - * Removes a namespace from the namespaces map. - * - * @param node The SNode to be removed. - */ - fun removeNamespace(node: SNode) { - namespaces.remove(node) - } - - /** - * Returns the namespace of a specific SNode. - * - * @param node The SNode whose namespace is to be retrieved. - * @return The namespace of the SNode. - */ - fun getNamespace(node: SNode): String? { - return namespaces[node] - } - - /** - * Returns all the namespaces stored in the namespaces map. - * - * @return A map of all namespaces. - */ - fun getAllNamespaces(): Map { - return namespaces - } - - /** - * Save the current state of the namespaces map to a Memento object. - * - * @param memento The Memento object to save to. - */ - override fun save(memento: Memento) { - memento.clear() - namespaces.forEach { (node, namespace) -> - val child = memento.createChild(NAMESPACES_KEY) - child.put(GENERATED_KEY, node.nodeId.toString()) - child.put(PATH_KEY, namespace) - } - } - - /** - * Load the state of the namespaces map from a Memento object. - * - * @param memento The Memento object to load from. - */ - override fun load(memento: Memento) { - namespaces.clear() - memento.getChildren(NAMESPACES_KEY).forEach { child -> - val nodeId = child.get(GENERATED_KEY) - val namespace = child.get(PATH_KEY) - if (nodeId != null && namespace != null) { - val node = - namespaces[node] = namespace - } - } - } - - /** - * Converts an SNode to a PlatformElement. - * - * @param node The SNode to be converted. - * @param reference The SModelReference for the model that the SNode belongs to. - * @param doc The Document that represents the XML structure of the SNode. - * @return The converted PlatformElement. - */ - fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { - val owner = PlatformElementsOwner() - val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) - val converter = PlatformConverter.create(configuration, reference, doc) - return converter.convert(node) as PlatformElement - } - -} diff --git a/code/platform/src/main/resources/META-INF/plugin.xml b/code/platform/src/main/resources/META-INF/plugin.xml index 4ee99cb33..4dbccfe50 100644 --- a/code/platform/src/main/resources/META-INF/plugin.xml +++ b/code/platform/src/main/resources/META-INF/plugin.xml @@ -16,7 +16,6 @@ - @@ -46,23 +45,5 @@ - - - - - - - diff --git a/code/platform/src/main/resources/icons/lib.svg b/code/platform/src/main/resources/icons/lib.svg deleted file mode 100644 index 6c93a1f63..000000000 --- a/code/platform/src/main/resources/icons/lib.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/code/platform/src/main/resources/icons/library_project.svg b/code/platform/src/main/resources/icons/library_project.svg deleted file mode 100644 index 2765d6d21..000000000 --- a/code/platform/src/main/resources/icons/library_project.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/code/platform/src/main/resources/icons/system_project.svg b/code/platform/src/main/resources/icons/system_project.svg deleted file mode 100644 index 6c3c729c6..000000000 --- a/code/platform/src/main/resources/icons/system_project.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt deleted file mode 100644 index ead0d5b3d..000000000 --- a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt +++ /dev/null @@ -1,191 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.fileChooser.FileChooser -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.project.MPSProject -import jetbrains.mps.project.Solution -import junit.framework.TestCase.assertEquals -import org.fbme.ide.platform.testing.PlatformTestRunner -import org.junit.Test -import org.junit.jupiter.api.Assertions.* -import org.junit.jupiter.api.Test -import org.junit.runner.RunWith -import org.mockito.Mockito.mock - -@RunWith(PlatformTestRunner::class) -class LibraryActionsTest { - - @Test - fun testNewLibraryAction() { - // Arrange - val newLibraryAction = NewLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - // mock dialog to set module name and location - val cfg = mock(NameLocationPanel::class.java) - `when`(NewModuleDialog.projectHome(project)).thenReturn("solutions") - `when`(cfg.withDefaults("NewSolution", "solutions")).thenReturn(cfg) - val dialog = mock(NewModuleDialog::class.java) - `when`(NewModuleDialog(project, cfg)).thenReturn(dialog) - val model = mock(SModel::class.java) - val result = mock(Solution::class.java) - val modelRoot = mock(DefaultModelRoot::class.java) - `when`(result.modelRoots).thenReturn(setOf(modelRoot)) - `when`(modelRoot.createModel(SModelName("NewLibrary@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE)).thenReturn(model) - val repository = mock(PlatformRepository::class.java) - `when`(PlatformRepositoryProvider.getInstance(project)).thenReturn(repository) - val facet = mock(ModuleFacetBase::class.java) - `when`(result.getFacet(Iec61499Facet.FACET_TYPE)).thenReturn(facet) - val modelImporter = mock(ModelImporter::class.java) - `when`(ModelImporter(it)).thenReturn(modelImporter) - - - // Act - newLibraryAction.actionPerformed(event) - - // Assert - // Add your assertions here based on the expected outcome of the action - - assertNotNull(model) - assertEquals("NewLibrary@Content", model.getName().getValue()) - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - - } - - @Test - fun testExportLibraryAction() { - // Arrange - val exportLibraryAction = ExportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - // Assuming that the solution is selected in the project pane - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - // mock mpsProject to get the project - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - // mock ideaProject to get the project base path - val ideaProject = mock(IdeaProject::class.java) - `when`(project.project).thenReturn(ideaProject) - `when`(ideaProject.basePath).thenReturn("/path/to/project") - // mock module name - `when`(solution.moduleName).thenReturn("NewLibrary") - - // Act - exportLibraryAction.actionPerformed(event) - - // Assert - verify(solution).exportLibrary() - assertTrue(solution.isExported) - verify(project).refresh() - - // check that the zip file is created - val zipFile = File("/path/to/project/NewLibrary.zip") - assertTrue(zipFile.exists()) - - } - - @Test - fun testImportLibraryAction() { - // Arrange - val importLibraryAction = ImportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(mpsProject) - val fileChooser = mock(FileChooser::class.java) - `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/Library.zip")) - - // Act - importLibraryAction.actionPerformed(event) - - // Assert - verify(solution).importLibrary() - assertTrue(solution.isImported) - verify(project).refresh() - - val extractedDir = File("code/platform/src/test/resources/Library") - assertTrue(extractedDir.exists()) - val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") - assertTrue(fbtFile.exists()) - // remove the extracted directory - extractedDir.delete() - - - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - verify(project).addModule(module) - assertTrue(project.modules.size() == 1) - - assertEquals("NewLibrary", mpsProject.modules[0].moduleName) - - } - - @Test - fun testNewLibImportExport() { - val newLibraryAction = NewLibraryAction() - val exportLibraryAction = ExportLibraryAction() - val importLibraryAction = ImportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val ideaProject = mock(IdeaProject::class.java) - `when`(project.project).thenReturn(ideaProject) - `when`(ideaProject.basePath).thenReturn("/path/to/project") - `when`(solution.moduleName).thenReturn("NewLibrary") - val fileChooser = mock(FileChooser::class.java) - `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/NewLibrary.zip")) - - // Act - newLibraryAction.actionPerformed(event) - exportLibraryAction.actionPerformed(event) - importLibraryAction.actionPerformed(event) - - // Assert - verify(solution).exportLibrary() - assertTrue(solution.isExported) - verify(project).refresh() - - val zipFile = File("/code/platform/src/test/resources/NewLibrary.zip") - assertTrue(zipFile.exists()) - - verify(solution).importLibrary() - assertTrue(solution.isImported) - verify(project).refresh() - - val extractedDir = File("code/platform/src/test/resources/Library") - assertTrue(extractedDir.exists()) - val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") - assertTrue(fbtFile.exists()) - - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - verify(project).addModule(module) - assertTrue(project.modules.size() == 1) - - assertEquals("NewLibrary", mpsProject.modules[0].moduleName) - } - -} \ No newline at end of file diff --git a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt b/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt deleted file mode 100644 index d5f128ee4..000000000 --- a/code/platform/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt +++ /dev/null @@ -1,4 +0,0 @@ -package org.fbme.ide.platform.library - -class TestUtils { -} \ No newline at end of file From 3f32c9b98c789d38752ca35729de5c69bbe84329 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Mon, 13 May 2024 12:59:25 +0300 Subject: [PATCH 48/50] Moved to separate plugin --- .../src/test/resources/LibExample/Library.zip | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename code/{platform => lib-management}/src/test/resources/LibExample/Library.zip (100%) diff --git a/code/platform/src/test/resources/LibExample/Library.zip b/code/lib-management/src/test/resources/LibExample/Library.zip similarity index 100% rename from code/platform/src/test/resources/LibExample/Library.zip rename to code/lib-management/src/test/resources/LibExample/Library.zip From 56c911fb57b525ef7bf235116101804f35be98f6 Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 23 May 2024 19:07:28 +0300 Subject: [PATCH 49/50] Refactored separate plugin, fixed build --- .idea/modules.xml | 8 + .../FBME.code.library-management.main.iml | 8 + .../platform/library/LibraryActionsTest.kt | 191 ------------------ .../fbme/ide/platform/library/TestUtils.kt | 4 - .../src/test/resources/LibExample/Library.zip | Bin 1386 -> 0 bytes code/library-management/.module-id | 1 + .../build.gradle.kts | 58 +++--- .../src/main/java/org/example/Main.java | 0 .../library/library/LibraryFacetFactory.kt | 0 .../library/library/LibraryFacetTab.kt | 0 .../library/library/LibraryFacetTabFactory.kt | 0 .../library/actions/ExportLibraryAction.kt | 0 .../library/actions/ImportLibraryAction.kt | 0 .../library/actions/ImportNxtLibraryAction.kt | 0 .../library/actions/NewLibraryAction.kt | 0 .../library/actions/SetNamespaceAction.kt | 0 .../library/library/util/LibraryFacet.kt | 92 ++++----- .../src/main/resources/META-INF/plugin.xml | 0 .../src/main/resources/icons/lib.svg | 0 .../main/resources/icons/library_project.svg | 0 .../main/resources/icons/system_project.svg | 0 .../kotlin/org/fbme/lib/common/Element.kt | 2 +- settings.gradle.kts | 2 + 23 files changed, 97 insertions(+), 269 deletions(-) create mode 100644 .idea/modules.xml create mode 100644 .idea/modules/code/library-management/FBME.code.library-management.main.iml delete mode 100644 code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt delete mode 100644 code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt delete mode 100644 code/lib-management/src/test/resources/LibExample/Library.zip create mode 100644 code/library-management/.module-id rename code/{lib-management => library-management}/build.gradle.kts (71%) rename code/{lib-management => library-management}/src/main/java/org/example/Main.java (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetFactory.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTab.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/LibraryFacetTabFactory.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ExportLibraryAction.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportLibraryAction.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/actions/ImportNxtLibraryAction.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/actions/NewLibraryAction.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/actions/SetNamespaceAction.kt (100%) rename code/{lib-management => library-management}/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt (50%) rename code/{lib-management => library-management}/src/main/resources/META-INF/plugin.xml (100%) rename code/{lib-management => library-management}/src/main/resources/icons/lib.svg (100%) rename code/{lib-management => library-management}/src/main/resources/icons/library_project.svg (100%) rename code/{lib-management => library-management}/src/main/resources/icons/system_project.svg (100%) diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..9165b321b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules/code/library-management/FBME.code.library-management.main.iml b/.idea/modules/code/library-management/FBME.code.library-management.main.iml new file mode 100644 index 000000000..c98fad494 --- /dev/null +++ b/.idea/modules/code/library-management/FBME.code.library-management.main.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt deleted file mode 100644 index ead0d5b3d..000000000 --- a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt +++ /dev/null @@ -1,191 +0,0 @@ -package org.fbme.ide.platform.library.actions - -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.fileChooser.FileChooser -import jetbrains.mps.ide.actions.MPSCommonDataKeys -import jetbrains.mps.project.MPSProject -import jetbrains.mps.project.Solution -import junit.framework.TestCase.assertEquals -import org.fbme.ide.platform.testing.PlatformTestRunner -import org.junit.Test -import org.junit.jupiter.api.Assertions.* -import org.junit.jupiter.api.Test -import org.junit.runner.RunWith -import org.mockito.Mockito.mock - -@RunWith(PlatformTestRunner::class) -class LibraryActionsTest { - - @Test - fun testNewLibraryAction() { - // Arrange - val newLibraryAction = NewLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - // mock dialog to set module name and location - val cfg = mock(NameLocationPanel::class.java) - `when`(NewModuleDialog.projectHome(project)).thenReturn("solutions") - `when`(cfg.withDefaults("NewSolution", "solutions")).thenReturn(cfg) - val dialog = mock(NewModuleDialog::class.java) - `when`(NewModuleDialog(project, cfg)).thenReturn(dialog) - val model = mock(SModel::class.java) - val result = mock(Solution::class.java) - val modelRoot = mock(DefaultModelRoot::class.java) - `when`(result.modelRoots).thenReturn(setOf(modelRoot)) - `when`(modelRoot.createModel(SModelName("NewLibrary@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE)).thenReturn(model) - val repository = mock(PlatformRepository::class.java) - `when`(PlatformRepositoryProvider.getInstance(project)).thenReturn(repository) - val facet = mock(ModuleFacetBase::class.java) - `when`(result.getFacet(Iec61499Facet.FACET_TYPE)).thenReturn(facet) - val modelImporter = mock(ModelImporter::class.java) - `when`(ModelImporter(it)).thenReturn(modelImporter) - - - // Act - newLibraryAction.actionPerformed(event) - - // Assert - // Add your assertions here based on the expected outcome of the action - - assertNotNull(model) - assertEquals("NewLibrary@Content", model.getName().getValue()) - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - - } - - @Test - fun testExportLibraryAction() { - // Arrange - val exportLibraryAction = ExportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - // Assuming that the solution is selected in the project pane - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - // mock mpsProject to get the project - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - // mock ideaProject to get the project base path - val ideaProject = mock(IdeaProject::class.java) - `when`(project.project).thenReturn(ideaProject) - `when`(ideaProject.basePath).thenReturn("/path/to/project") - // mock module name - `when`(solution.moduleName).thenReturn("NewLibrary") - - // Act - exportLibraryAction.actionPerformed(event) - - // Assert - verify(solution).exportLibrary() - assertTrue(solution.isExported) - verify(project).refresh() - - // check that the zip file is created - val zipFile = File("/path/to/project/NewLibrary.zip") - assertTrue(zipFile.exists()) - - } - - @Test - fun testImportLibraryAction() { - // Arrange - val importLibraryAction = ImportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(mpsProject) - val fileChooser = mock(FileChooser::class.java) - `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/Library.zip")) - - // Act - importLibraryAction.actionPerformed(event) - - // Assert - verify(solution).importLibrary() - assertTrue(solution.isImported) - verify(project).refresh() - - val extractedDir = File("code/platform/src/test/resources/Library") - assertTrue(extractedDir.exists()) - val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") - assertTrue(fbtFile.exists()) - // remove the extracted directory - extractedDir.delete() - - - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - verify(project).addModule(module) - assertTrue(project.modules.size() == 1) - - assertEquals("NewLibrary", mpsProject.modules[0].moduleName) - - } - - @Test - fun testNewLibImportExport() { - val newLibraryAction = NewLibraryAction() - val exportLibraryAction = ExportLibraryAction() - val importLibraryAction = ImportLibraryAction() - val event = mock(AnActionEvent::class.java) - - // Setup mocks: - val project = mock(MPSProject::class.java) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val solution = mock(Solution::class.java) - `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) - `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) - val ideaProject = mock(IdeaProject::class.java) - `when`(project.project).thenReturn(ideaProject) - `when`(ideaProject.basePath).thenReturn("/path/to/project") - `when`(solution.moduleName).thenReturn("NewLibrary") - val fileChooser = mock(FileChooser::class.java) - `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/NewLibrary.zip")) - - // Act - newLibraryAction.actionPerformed(event) - exportLibraryAction.actionPerformed(event) - importLibraryAction.actionPerformed(event) - - // Assert - verify(solution).exportLibrary() - assertTrue(solution.isExported) - verify(project).refresh() - - val zipFile = File("/code/platform/src/test/resources/NewLibrary.zip") - assertTrue(zipFile.exists()) - - verify(solution).importLibrary() - assertTrue(solution.isImported) - verify(project).refresh() - - val extractedDir = File("code/platform/src/test/resources/Library") - assertTrue(extractedDir.exists()) - val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") - assertTrue(fbtFile.exists()) - - verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) - verify(modelImporter, times(1)).execute() - verify(project).addModule(result) - - verify(project).addModule(module) - assertTrue(project.modules.size() == 1) - - assertEquals("NewLibrary", mpsProject.modules[0].moduleName) - } - -} \ No newline at end of file diff --git a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt b/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt deleted file mode 100644 index d5f128ee4..000000000 --- a/code/lib-management/src/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt +++ /dev/null @@ -1,4 +0,0 @@ -package org.fbme.ide.platform.library - -class TestUtils { -} \ No newline at end of file diff --git a/code/lib-management/src/test/resources/LibExample/Library.zip b/code/lib-management/src/test/resources/LibExample/Library.zip deleted file mode 100644 index 38f1146babcd42b76b23ededbbaab869f7bef8e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1386 zcmWIWW@Zs#;Nak3xD}fh!GHw#foz}5q@u*4O8wmYl+>JJeP)ILZ*~rl8YZa10G!&T zFtz)omctAr#Uy>aCIu(v7UZNlB^GBUJGq5a7NqK>C6(Crp5|*Z5ODooOZIM2J5XKUE+~*xHD zpYrF<4LuYeMVdb$oGB09TCkdy@Up{>B zZ&{cw&)yeG!HX|OZB049Sw}`@O7aS)jLzOqv$9%qvQp1p`Lo%hLPF3scio?TM^^Sc ztzI-I%lYQck*g^ggo-X#T66o3*y#5hJ@((m&=;aot^iDeMcNi3TKePm%*e|h=QD)!=AwZt&*_f0Jt855=GchcSSXa3)V|SRZ&ZU&v*@gVWB++yn(%$=@vBb~JG|+QzQpNc>o { return namespaces } - - /** - * Save the current state of the namespaces map to a Memento object. - * - * @param memento The Memento object to save to. - */ - override fun save(memento: Memento) { - memento.clear() - namespaces.forEach { (node, namespace) -> - val child = memento.createChild(NAMESPACES_KEY) - child.put(GENERATED_KEY, node.nodeId.toString()) - child.put(PATH_KEY, namespace) - } - } - - /** - * Load the state of the namespaces map from a Memento object. - * - * @param memento The Memento object to load from. - */ - override fun load(memento: Memento) { - namespaces.clear() - memento.getChildren(NAMESPACES_KEY).forEach { child -> - val nodeId = child.get(GENERATED_KEY) - val namespace = child.get(PATH_KEY) - if (nodeId != null && namespace != null) { - val node = - namespaces[node] = namespace - } - } - } - - /** - * Converts an SNode to a PlatformElement. - * - * @param node The SNode to be converted. - * @param reference The SModelReference for the model that the SNode belongs to. - * @param doc The Document that represents the XML structure of the SNode. - * @return The converted PlatformElement. - */ - fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { - val owner = PlatformElementsOwner() - val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) - val converter = PlatformConverter.create(configuration, reference, doc) - return converter.convert(node) as PlatformElement - } +// +// /** +// * Save the current state of the namespaces map to a Memento object. +// * +// * @param memento The Memento object to save to. +// */ +// override fun save(memento: Memento) { +// memento.clear() +// namespaces.forEach { (node, namespace) -> +// val child = memento.createChild(NAMESPACES_KEY) +// child.put(GENERATED_KEY, node.nodeId.toString()) +// child.put(PATH_KEY, namespace) +// } +// } +// +// /** +// * Load the state of the namespaces map from a Memento object. +// * +// * @param memento The Memento object to load from. +// */ +// override fun load(memento: Memento) { +// namespaces.clear() +// memento.getChildren(NAMESPACES_KEY).forEach { child -> +// val nodeId = child.get(GENERATED_KEY) +// val namespace = child.get(PATH_KEY) +// if (nodeId != null && namespace != null) { +// val node = +// namespaces[node] = namespace +// } +// } +// } +// +// /** +// * Converts an SNode to a PlatformElement. +// * +// * @param node The SNode to be converted. +// * @param reference The SModelReference for the model that the SNode belongs to. +// * @param doc The Document that represents the XML structure of the SNode. +// * @return The converted PlatformElement. +// */ +// fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { +// val owner = PlatformElementsOwner() +// val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) +// val converter = PlatformConverter.create(configuration, reference, doc) +// return converter.convert(node) as PlatformElement +// } } diff --git a/code/lib-management/src/main/resources/META-INF/plugin.xml b/code/library-management/src/main/resources/META-INF/plugin.xml similarity index 100% rename from code/lib-management/src/main/resources/META-INF/plugin.xml rename to code/library-management/src/main/resources/META-INF/plugin.xml diff --git a/code/lib-management/src/main/resources/icons/lib.svg b/code/library-management/src/main/resources/icons/lib.svg similarity index 100% rename from code/lib-management/src/main/resources/icons/lib.svg rename to code/library-management/src/main/resources/icons/lib.svg diff --git a/code/lib-management/src/main/resources/icons/library_project.svg b/code/library-management/src/main/resources/icons/library_project.svg similarity index 100% rename from code/lib-management/src/main/resources/icons/library_project.svg rename to code/library-management/src/main/resources/icons/library_project.svg diff --git a/code/lib-management/src/main/resources/icons/system_project.svg b/code/library-management/src/main/resources/icons/system_project.svg similarity index 100% rename from code/lib-management/src/main/resources/icons/system_project.svg rename to code/library-management/src/main/resources/icons/system_project.svg diff --git a/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt b/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt index 1bb55e6a6..e4b6643ba 100644 --- a/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt +++ b/code/library/src/main/kotlin/org/fbme/lib/common/Element.kt @@ -4,6 +4,6 @@ import org.fbme.lib.common.attributes.WithExternalXmlContent interface Element : WithExternalXmlContent { val container: Element? - val library: Library? +// val library: Library? fun copy(): Element } diff --git a/settings.gradle.kts b/settings.gradle.kts index fe292860b..e6e50ccae 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -22,3 +22,5 @@ include("code:lib-managment") findProject(":code:lib-managment")?.name = "lib-managment" include("code:lib-management") findProject(":code:lib-management")?.name = "lib-management" +include("code:library-management") +findProject(":code:library-management")?.name = "library-management" From 67b8b352a9e45bf2e80714d3086c58ed0bb7df5d Mon Sep 17 00:00:00 2001 From: Emgariko Date: Thu, 23 May 2024 19:08:45 +0300 Subject: [PATCH 50/50] Facet logic & tests --- .../library/library/util/LibraryFacet.kt | 92 ++++----- .../platform/library/LibraryActionsTest.kt | 191 ++++++++++++++++++ .../fbme/ide/platform/library/TestUtils.kt | 4 + .../test/resources/LibExample/Library.zip | Bin 0 -> 1386 bytes .../kotlin/org/fbme/lib/common/Element.kt | 2 +- 5 files changed, 242 insertions(+), 47 deletions(-) create mode 100644 code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt create mode 100644 code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt create mode 100644 code/library-management/src/test/test/resources/LibExample/Library.zip diff --git a/code/library-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt b/code/library-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt index 7d43196b7..63b03efc8 100644 --- a/code/library-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt +++ b/code/library-management/src/main/kotlin/org/fbme/ide/platform/library/library/util/LibraryFacet.kt @@ -57,51 +57,51 @@ class LibraryFacet(module: SModule) : ModuleFacetBase(FACET_TYPE, module) { fun getAllNamespaces(): Map { return namespaces } -// -// /** -// * Save the current state of the namespaces map to a Memento object. -// * -// * @param memento The Memento object to save to. -// */ -// override fun save(memento: Memento) { -// memento.clear() -// namespaces.forEach { (node, namespace) -> -// val child = memento.createChild(NAMESPACES_KEY) -// child.put(GENERATED_KEY, node.nodeId.toString()) -// child.put(PATH_KEY, namespace) -// } -// } -// -// /** -// * Load the state of the namespaces map from a Memento object. -// * -// * @param memento The Memento object to load from. -// */ -// override fun load(memento: Memento) { -// namespaces.clear() -// memento.getChildren(NAMESPACES_KEY).forEach { child -> -// val nodeId = child.get(GENERATED_KEY) -// val namespace = child.get(PATH_KEY) -// if (nodeId != null && namespace != null) { -// val node = -// namespaces[node] = namespace -// } -// } -// } -// -// /** -// * Converts an SNode to a PlatformElement. -// * -// * @param node The SNode to be converted. -// * @param reference The SModelReference for the model that the SNode belongs to. -// * @param doc The Document that represents the XML structure of the SNode. -// * @return The converted PlatformElement. -// */ -// fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { -// val owner = PlatformElementsOwner() -// val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) -// val converter = PlatformConverter.create(configuration, reference, doc) -// return converter.convert(node) as PlatformElement -// } + + /** + * Save the current state of the namespaces map to a Memento object. + * + * @param memento The Memento object to save to. + */ + override fun save(memento: Memento) { + memento.clear() + namespaces.forEach { (node, namespace) -> + val child = memento.createChild(NAMESPACES_KEY) + child.put(GENERATED_KEY, node.nodeId.toString()) + child.put(PATH_KEY, namespace) + } + } + + /** + * Load the state of the namespaces map from a Memento object. + * + * @param memento The Memento object to load from. + */ + override fun load(memento: Memento) { + namespaces.clear() + memento.getChildren(NAMESPACES_KEY).forEach { child -> + val nodeId = child.get(GENERATED_KEY) + val namespace = child.get(PATH_KEY) + if (nodeId != null && namespace != null) { + val node = + namespaces[node] = namespace + } + } + } + + /** + * Converts an SNode to a PlatformElement. + * + * @param node The SNode to be converted. + * @param reference The SModelReference for the model that the SNode belongs to. + * @param doc The Document that represents the XML structure of the SNode. + * @return The converted PlatformElement. + */ + fun convertSNodeToPlatformElement(node: SNode, reference: SModelReference, doc: Document): PlatformElement { + val owner = PlatformElementsOwner() + val configuration = PlatformConverter.STANDARD_CONFIG_FACTORY.createConfiguration(owner) + val converter = PlatformConverter.create(configuration, reference, doc) + return converter.convert(node) as PlatformElement + } } diff --git a/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt b/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt new file mode 100644 index 000000000..ead0d5b3d --- /dev/null +++ b/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/LibraryActionsTest.kt @@ -0,0 +1,191 @@ +package org.fbme.ide.platform.library.actions + +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.fileChooser.FileChooser +import jetbrains.mps.ide.actions.MPSCommonDataKeys +import jetbrains.mps.project.MPSProject +import jetbrains.mps.project.Solution +import junit.framework.TestCase.assertEquals +import org.fbme.ide.platform.testing.PlatformTestRunner +import org.junit.Test +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.mock + +@RunWith(PlatformTestRunner::class) +class LibraryActionsTest { + + @Test + fun testNewLibraryAction() { + // Arrange + val newLibraryAction = NewLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock dialog to set module name and location + val cfg = mock(NameLocationPanel::class.java) + `when`(NewModuleDialog.projectHome(project)).thenReturn("solutions") + `when`(cfg.withDefaults("NewSolution", "solutions")).thenReturn(cfg) + val dialog = mock(NewModuleDialog::class.java) + `when`(NewModuleDialog(project, cfg)).thenReturn(dialog) + val model = mock(SModel::class.java) + val result = mock(Solution::class.java) + val modelRoot = mock(DefaultModelRoot::class.java) + `when`(result.modelRoots).thenReturn(setOf(modelRoot)) + `when`(modelRoot.createModel(SModelName("NewLibrary@content"), null, Iec61499ModelFactory.DST, Iec61499ModelFactory.TYPE)).thenReturn(model) + val repository = mock(PlatformRepository::class.java) + `when`(PlatformRepositoryProvider.getInstance(project)).thenReturn(repository) + val facet = mock(ModuleFacetBase::class.java) + `when`(result.getFacet(Iec61499Facet.FACET_TYPE)).thenReturn(facet) + val modelImporter = mock(ModelImporter::class.java) + `when`(ModelImporter(it)).thenReturn(modelImporter) + + + // Act + newLibraryAction.actionPerformed(event) + + // Assert + // Add your assertions here based on the expected outcome of the action + + assertNotNull(model) + assertEquals("NewLibrary@Content", model.getName().getValue()) + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + + } + + @Test + fun testExportLibraryAction() { + // Arrange + val exportLibraryAction = ExportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + // Assuming that the solution is selected in the project pane + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + // mock mpsProject to get the project + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + // mock ideaProject to get the project base path + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + // mock module name + `when`(solution.moduleName).thenReturn("NewLibrary") + + // Act + exportLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + // check that the zip file is created + val zipFile = File("/path/to/project/NewLibrary.zip") + assertTrue(zipFile.exists()) + + } + + @Test + fun testImportLibraryAction() { + // Arrange + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(mpsProject) + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/Library.zip")) + + // Act + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + // remove the extracted directory + extractedDir.delete() + + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + + } + + @Test + fun testNewLibImportExport() { + val newLibraryAction = NewLibraryAction() + val exportLibraryAction = ExportLibraryAction() + val importLibraryAction = ImportLibraryAction() + val event = mock(AnActionEvent::class.java) + + // Setup mocks: + val project = mock(MPSProject::class.java) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val solution = mock(Solution::class.java) + `when`(ProjectPane.getInstance(project).selectedSolution).thenReturn(solution) + `when`(event.getData(MPSCommonDataKeys.MPS_PROJECT)).thenReturn(project) + val ideaProject = mock(IdeaProject::class.java) + `when`(project.project).thenReturn(ideaProject) + `when`(ideaProject.basePath).thenReturn("/path/to/project") + `when`(solution.moduleName).thenReturn("NewLibrary") + val fileChooser = mock(FileChooser::class.java) + `when`(FileChooser.chooseFile(any(), any(), any())).thenReturn(VirtualFile("code/platform/src/test/resources/NewLibrary.zip")) + + // Act + newLibraryAction.actionPerformed(event) + exportLibraryAction.actionPerformed(event) + importLibraryAction.actionPerformed(event) + + // Assert + verify(solution).exportLibrary() + assertTrue(solution.isExported) + verify(project).refresh() + + val zipFile = File("/code/platform/src/test/resources/NewLibrary.zip") + assertTrue(zipFile.exists()) + + verify(solution).importLibrary() + assertTrue(solution.isImported) + verify(project).refresh() + + val extractedDir = File("code/platform/src/test/resources/Library") + assertTrue(extractedDir.exists()) + val fbtFile = File("code/platform/src/test/resources/Library/models/SampleFbType.fbt") + assertTrue(fbtFile.exists()) + + verify(result).setFacet(Iec61499Facet.FACET_TYPE, facet) + verify(modelImporter, times(1)).execute() + verify(project).addModule(result) + + verify(project).addModule(module) + assertTrue(project.modules.size() == 1) + + assertEquals("NewLibrary", mpsProject.modules[0].moduleName) + } + +} \ No newline at end of file diff --git a/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt b/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt new file mode 100644 index 000000000..d5f128ee4 --- /dev/null +++ b/code/library-management/src/test/test/kotlin/org/fbme/ide/platform/library/TestUtils.kt @@ -0,0 +1,4 @@ +package org.fbme.ide.platform.library + +class TestUtils { +} \ No newline at end of file diff --git a/code/library-management/src/test/test/resources/LibExample/Library.zip b/code/library-management/src/test/test/resources/LibExample/Library.zip new file mode 100644 index 0000000000000000000000000000000000000000..38f1146babcd42b76b23ededbbaab869f7bef8e4 GIT binary patch literal 1386 zcmWIWW@Zs#;Nak3xD}fh!GHw#foz}5q@u*4O8wmYl+>JJeP)ILZ*~rl8YZa10G!&T zFtz)omctAr#Uy>aCIu(v7UZNlB^GBUJGq5a7NqK>C6(Crp5|*Z5ODooOZIM2J5XKUE+~*xHD zpYrF<4LuYeMVdb$oGB09TCkdy@Up{>B zZ&{cw&)yeG!HX|OZB049Sw}`@O7aS)jLzOqv$9%qvQp1p`Lo%hLPF3scio?TM^^Sc ztzI-I%lYQck*g^ggo-X#T66o3*y#5hJ@((m&=;aot^iDeMcNi3TKePm%*e|h=QD)!=AwZt&*_f0Jt855=GchcSSXa3)V|SRZ&ZU&v*@gVWB++yn(%$=@vBb~JG|+QzQpNc>o