#!/usr/bin/python '''Testing the ability to receive and unpack model descriptions''' from PIPRes.util.server_import import * from PIPRes.cipres_types import * from PIPRes.wrap.output_parser import * import os, random class ModelSupplierImpl (CipresIDL_api2__POA.ModelSupplier, SimpleServer): def __init__(self, registry = None): SimpleServer.__init__(self, registry) self.convertTreeFunc = self.orb is None and toTreeBridge or toIDLTree def getModel(self, mod): _LOG.debug('getModel called') return mod def ping(self, mod): _LOG.debug('ping called') return mod + 1 def getUIXml(self): return '' def execute(self, command): _LOG.debug('execute called with "%s"' % command) return (True, '') _LOG = cipresGetLogger('pipres.service_impl.server.model_supplier') if __name__=='__main__': try: registryWrapper = cipresServe(sys.argv, {'ModelSupplier': ModelSupplierImpl}) except ModelSupplierImpl: logException(_LOG)