def __invoke_findObjectByIdInSameSet(self, reqmsg): rsp = reqmsg.response; if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectByIdInSameSet_exception(rsp.iRet); return rsp.iRet; ios = tarscore.TarsInputStream(rsp.sBuffer); ret = ios.read(tarscore.int32, 0, True); activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True); inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True); self.callback_findObjectByIdInSameSet(ret, activeEp, inactiveEp);
def __invoke_findObjectById4All(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectById4All_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) self.callback_findObjectById4All(ret, activeEp, inactiveEp)
def findObjectByIdInSameGroup(self, id, context = ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream(); oos.write(tarscore.string, 1, id); rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None); ios = tarscore.TarsInputStream(rsp.sBuffer); ret = ios.read(tarscore.int32, 0, True); activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True); inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True); return (ret, activeEp, inactiveEp);
def findObjectByIdInSameGroup(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None) startDecodeTime = time.time() ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) endDecodeTime = time.time() return (ret, activeEp, inactiveEp, (endDecodeTime - startDecodeTime))
def __invoke_findObjectById(self, reqmsg): rsp = reqmsg.response; if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectById_exception(rsp.iRet); return rsp.iRet; ios = tarscore.TarsInputStream(rsp.sBuffer); ret = ios.read(tarscore.vctclass(EndpointF), 0, True); self.callback_findObjectById(ret);
def findObjectByIdInSameStation(self, id, sStation, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) oos.write(tarscore.string, 2, sStation) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameStation", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True) return (ret, activeEp, inactiveEp)
def findObjectById(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectById", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.vctclass(EndpointF), 0, True) return (ret)