Exemple #1
0
    def __init__(self, ir, name=None, parent=None):
        '''
        '''
        self.__ir = ir
        
        DynamicImplementation.__init__(self, ir)

        if name != None:
            self.__name = str(name)

        else:
            self.__name = ir

        self.parent = parent

        self.recorder = Recorder(self.__name)
        self.recorder.begin()
# 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
#
# @(#) $Id$
#------------------------------------------------------------------------------

'''
Tests DynamicImplementation.
'''
from Acssim.Corba.DynamicImplementation import DynamicImplementation

if __name__ == "__main__":
    print "-----------------------------------------------------------------"
    g = DynamicImplementation("IDL:alma/acssimTest/JunkControl:1.0")
    g.onewayOn()
    g.on()
    g._set_charplainAttribute('a')
    g._set_charplainSeqAttribute(('a', 'b', 'c'))
    g._set_charplainArrayAttribute(('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'))

    print "-----------------------------------------------------------------"
    h = DynamicImplementation("IDL:alma/PS/PowerSupply:1.0")
    print "PowerSupply dict:", dir(h)

    print "-----------------------------------------------------------------"
    i = DynamicImplementation("IDL:alma/RampedPS/RampedPowerSupply:1.0")
    print "PowerSupply dict:", dir(i)
    print "-----------------------------------------------------------------"
    try: