(self, command, termination=None, encoding=None)
| 154 | return interfaces[0] |
| 155 | |
| 156 | def send(self, command, termination=None, encoding=None): |
| 157 | if termination is None: |
| 158 | termination = self.SEND_TERMINATION |
| 159 | if encoding is None: |
| 160 | encoding = self.ENCODING |
| 161 | |
| 162 | message = bytes(command + termination, encoding) |
| 163 | self.log_debug('Sending {}', message) |
| 164 | |
| 165 | begin, end, size = 0, 0, len(message) |
| 166 | bytes_sent = 0 |
| 167 | while not end > size: |
| 168 | begin, end = end, begin + self.RECV_CHUNK |
| 169 | |
| 170 | self._btag = (self._btag % 255) + 1 |
| 171 | |
| 172 | data = BulkOutMessage.build_array(self._btag, end > size, message[begin:end]) |
| 173 | |
| 174 | bytes_sent += self.raw_send(data) |
| 175 | |
| 176 | return bytes_sent |
| 177 | |
| 178 | send.__doc__ = TextualMixin.send.__doc__ |
| 179 |
nothing calls this directly
no test coverage detected