Beispiel #1
0
    def send_msg_chan_send(self, chanName, value, wait=False):
        """Send a channel write message.

        Arguments:
        chanName -- a string representing the channel name, i.e. 'var/toto'
        value -- channel value
        """
        if self.isSpecConnected():
            self.__send_msg_no_reply(SpecMessage.msg_chan_send(chanName, value, version=self.serverVersion), wait)
        else:
            raise SpecClientNotConnectedError
Beispiel #2
0
    def send_msg_chan_send(self, chanName, value, wait=False):
        """Send a channel write message.

        Arguments:
        chanName -- a string representing the channel name, i.e. 'var/toto'
        value -- channel value
        """
        if self.isSpecConnected():
            self.__send_msg_no_reply(
                SpecMessage.msg_chan_send(chanName,
                                          value,
                                          version=self.serverVersion), wait)
        else:
            raise SpecClientNotConnectedError
Beispiel #3
0
    def send_msg_chan_send(self, chan_name, value):
        """Send a channel write message.

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

        msg = SpecMessage.msg_chan_send(chan_name,
                                        value,
                                        version=self.server_version)
        self.__send_msg_no_reply(msg)
    def send_msg_chan_send(self, chanName, value):
        """Send a channel write message.

        Arguments:
        chanName -- a string representing the channel name, i.e. 'var/toto'
        value -- channel value
        """
        log.log(
            DEBUG,
            "message channel send channel=%s, value=%s" % (chanName, value))
        if self.isSpecConnected():
            try:
                self.__send_msg_no_reply(
                    SpecMessage.msg_chan_send(chanName,
                                              value,
                                              version=self.serverVersion))
            except:
                import traceback
                log.log(1, traceback.format_exc())
        else:
            log.log(DEBUG, " not connected")
            raise SpecClientNotConnectedError