if(ADAO_SALOME_MODULE)
- install(FILES SalomeApp.xml ADAOCatalog.xml DESTINATION ${ADAO_RES_SALOME})
+ install(FILES ADAOCatalog.xml DESTINATION ${ADAO_RES_SALOME})
+ SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${ADAO_RES_SALOME})
+ SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeAppSL.xml INSTALL ${ADAO_RES_SALOME})
else(ADAO_SALOME_MODULE)
+++ /dev/null
-<!--
- Copyright (C) 2008-2021 EDF R&D
-
- This file is part of SALOME ADAO module
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
- Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
--->
-<document>
- <section name="ADAO">
- <!-- Major module parameters -->
- <parameter name="name" value="ADAO"/>
- <parameter name="icon" value="ADAO.png"/>
- <parameter name="library" value="SalomePyQtGUI"/>
- <parameter name="documentation" value="adao_help"/>
- <parameter name="version" value="9.8.0"/>
- <!-- parameter name="description" value="Calibrate numerical simulations, interpolate measurements, combine data and calculations, optimize trajectories, verify and validate models"/ -->
- <!-- parameter name="description" value="Recaler les simulations numériques, interpoler des mesures, combiner des données et des calculs, optimiser des trajectoires, vérifier et valider des modèles"/ -->
- </section>
- <section name="resources">
- <!-- Module resources -->
- <parameter name="ADAO" value="${ADAO_ENGINE_ROOT_DIR}/share/resources/adao"/>
- </section>
- <section name="adao_help">
- <parameter name="User's Guide/%1 module/(EN) User's Guide" value="${ADAO_ENGINE_ROOT_DIR}/share/doc/gui/ADAO/en/index.html"/>
- <parameter name="User's Guide/%1 module/(FR) Guide de l'utilisateur" value="${ADAO_ENGINE_ROOT_DIR}/share/doc/gui/ADAO/fr/index.html"/>
- </section>
-</document>
--- /dev/null
+<!--
+ Copyright (C) 2008-2021 EDF R&D
+
+ This file is part of SALOME ADAO module
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+ Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
+-->
+<document>
+ <section name="ADAO">
+ <!-- Major module parameters -->
+ <parameter name="name" value="ADAO"/>
+ <parameter name="icon" value="ADAO.png"/>
+ <parameter name="library" value="SalomePyQtGUI"/>
+ <parameter name="documentation" value="adao_help"/>
+ <parameter name="version" value="9.8.0"/>
+ <!-- parameter name="description" value="Calibrate numerical simulations, interpolate measurements, combine data and calculations, optimize trajectories, verify and validate models"/ -->
+ <!-- parameter name="description" value="Recaler les simulations numériques, interpoler des mesures, combiner des données et des calculs, optimiser des trajectoires, vérifier et valider des modèles"/ -->
+ </section>
+ <section name="resources">
+ <!-- Module resources -->
+ <parameter name="ADAO" value="${ADAO_ENGINE_ROOT_DIR}/share/resources/adao"/>
+ </section>
+ <section name="adao_help">
+ <parameter name="User's Guide/%1 module/(EN) User's Guide" value="${ADAO_ENGINE_ROOT_DIR}/share/doc/gui/ADAO/en/index.html"/>
+ <parameter name="User's Guide/%1 module/(FR) Guide de l'utilisateur" value="${ADAO_ENGINE_ROOT_DIR}/share/doc/gui/ADAO/fr/index.html"/>
+ </section>
+</document>
import ADAO_COMPONENT__POA
import SALOME_ComponentPy
import SALOME_DriverPy
+import SALOME_Embedded_NamingService_ClientPy
from daUtils.adaoLogger import *
SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
# On stocke dans l'attribut _naming_service, une ref sur le Naming Service
- self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
+ #
+ emb_ns = self._contId.get_embedded_NS_if_ssl()
+ import CORBA
+ if CORBA.is_nil(emb_ns):
+ self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
+ else:
+ self._naming_service = SALOME_Embedded_NamingService_ClientPy.SALOME_Embedded_NamingService_ClientPy(emb_ns)
+ #
def print_ping():
info("ADAO ENGINE Ping", "ENGINE")
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2021 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+def buildInstance(orb):
+ from ADAO import ADAO
+
+ # set SSL mode, if not done yes
+ import KernelBasis
+ KernelBasis.setSSLMode(True)
+
+ # check if ADAO is already registered
+ import KernelServices
+ try:
+ return KernelServices.RetrieveCompo("ADAO"), orb
+ except Exception:
+ pass
+
+ # initialize and register ADAO engine
+ import PortableServer
+ obj = orb.resolve_initial_references("RootPOA")
+ poa = obj._narrow(PortableServer.POA)
+ pman = poa._get_the_POAManager()
+ pman.activate()
+ #
+ from SALOME_ContainerPy import SALOME_ContainerPy_SSL_i
+ cont = SALOME_ContainerPy_SSL_i(orb, poa, "FactoryServer")
+ conObj = poa.id_to_reference(poa.activate_object(cont))
+ #
+ servant = ADAO(orb, poa, conObj, "FactoryServer", "ADAO_inst_1", "ADAO")
+ ret = servant.getCorbaRef()
+ KernelServices.RegisterCompo("ADAO", ret)
+ return ret, orb
if(ADAO_SALOME_MODULE)
- install(FILES ADAOGUI.py ADAO.py DESTINATION ${ADAO_SCRIPT_PYTHON_SALOME})
+ install(FILES ADAOGUI.py ADAO.py ADAO_SalomeSessionless.py DESTINATION ${ADAO_SCRIPT_PYTHON_SALOME})
else(ADAO_SALOME_MODULE)
"modulePixmap",
"verbose",
"getORB",
- "getNS",
"getLCC",
"getStudyManager",
"getEngine",
from omniORB import CORBA
from SALOME_NamingServicePy import SALOME_NamingServicePy_i
from LifeCycleCORBA import LifeCycleCORBA
+import salome
import SALOMEDS
import SALOMEDS_Attributes_idl
from salome.kernel.studyedit import getStudyEditor
###
# Get ORB reference
###
-__orb__ = None
def getORB():
- global __orb__
- if __orb__ is None:
- __orb__ = CORBA.ORB_init( [''], CORBA.ORB_ID )
- pass
- return __orb__
-
-###
-# Get naming service instance
-###
-__naming_service__ = None
-def getNS():
- global __naming_service__
- if __naming_service__ is None:
- __naming_service__ = SALOME_NamingServicePy_i( getORB() )
- pass
- return __naming_service__
+ salome.salome_init()
+ return salome.orb
##
# Get life cycle CORBA instance
##
-__lcc__ = None
def getLCC():
- global __lcc__
- if __lcc__ is None:
- __lcc__ = LifeCycleCORBA( getORB() )
- pass
- return __lcc__
+ salome.salome_init()
+ return salome.lcc
##
# Get study manager
###
-__study_manager__ = None
def getStudyManager():
- global __study_manager__
- if __study_manager__ is None:
- obj = getNS().Resolve( '/myStudyManager' )
- __study_manager__ = obj._narrow( SALOMEDS.StudyManager )
- pass
- return __study_manager__
+ salome.salome_init()
+ return salome.myStudy
###
# Get OMA engine