Exemple #1
0
    def send_msg_chan_read(self, chanName):
        """Send a channel read message, and return the reply id.

        Arguments:
        chanName -- a string representing the channel name, i.e. 'var/toto'
        """
        if self.isSpecConnected():
            try:
                caller = sys._getframe(1).f_locals['self']
            except KeyError:
                caller = None

            return self.__send_msg_with_reply(replyReceiverObject = caller, *SpecMessage.msg_chan_read(chanName, version = self.serverVersion))
        else:
            raise SpecClientNotConnectedError
    def send_msg_chan_read(self, chanName):
        """Send a channel read message, and return the reply id.

        Arguments:
        chanName -- a string representing the channel name, i.e. 'var/toto'
        """
        if self.isSpecConnected():
            try:
                caller = sys._getframe(1).f_locals['self']
            except KeyError:
                caller = None

            return self.__send_msg_with_reply(replyReceiverObject=caller,
                                              *SpecMessage.msg_chan_read(
                                                  chanName,
                                                  version=self.serverVersion))
        else:
            raise SpecClientNotConnectedError
Exemple #3
0
    def send_msg_chan_read(self, chan_name):
        """Send a channel read message, and return the reply id.

        Arguments:
        chan_name -- a string representing the channel name, i.e. 'var/toto'
        """
        if not self.is_connected():
            raise SpecClientNotConnectedError

        try:
            caller = sys._getframe(1).f_locals['self']
        except KeyError:
            caller = None

        reply, msg = SpecMessage.msg_chan_read(chan_name,
                                               version=self.server_version)
        reply_id = self.__send_msg_with_reply(reply, msg, receiver_obj=caller)
        return reply_id