Esempio n. 1
0
 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);
Esempio n. 2
0
 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)
Esempio n. 3
0
    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);
Esempio n. 4
0
    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))
Esempio n. 5
0
 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);
Esempio n. 6
0
    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)
Esempio n. 7
0
    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)