1 # Copyright (C) 2015-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author : Adrien BRUNETON (CEA)
22 import PVSERVER_ORB__POA
23 from SALOME_NamingServicePy import SALOME_NamingServicePy_i
24 from PVSERVER_impl import PVSERVER_impl, MESSAGE
26 class PVSERVER(PVSERVER_ORB__POA.PVSERVER_Gen,
29 Construct an instance of PVSERVER *service*.
30 The class PVSERVER implements the CORBA interface PVSERVER_Gen (see PVSERVER_Gen.idl).
31 It is NOT inherited from the classes SALOME_ComponentPy_i, as we present
32 the class as a pure CORBA service, not as a standard SALOME component.
34 def __init__ ( self, orb, poa, contID, containerName, instanceName,
38 PVSERVER_impl.__init__(self)
42 self._instanceName = instanceName
43 # self._interfaceName = interfaceName
44 self._containerName = containerName
45 # self._contId = contID
47 self._naming_service = SALOME_NamingServicePy_i(self._orb)
48 Component_path = self._containerName + "/" + self._instanceName
49 MESSAGE( 'SALOME_ComponentPy_i Register' + str( Component_path ) )
50 id_o = poa.activate_object(self)
51 compo_o = poa.id_to_reference(id_o)
53 ## And launch registration
55 self._naming_service.Register(compo_o, Component_path)
57 """ Override base class destroy to make sure we try to kill the pvserver