Write the points in MQTT.
436044
def export(self, name, columns, points):
        """"""

        WHITELIST = '_-' + string.ascii_letters + string.digits
        SUBSTITUTE = '_'

        def whitelisted(s,
                        whitelist=WHITELIST,
                        substitute=SUBSTITUTE):
            return ''.join(c if c in whitelist else substitute for c in s)

        for sensor, value in zip(columns, points):
            try:
                sensor = [whitelisted(name) for name in sensor.split('.')]
                tobeexport = [self.topic, self.hostname, name]
                tobeexport.extend(sensor)
                topic = '/'.join(tobeexport)

                self.client.publish(topic, value)
            except Exception as e:
                logger.error("Can not export stats to MQTT server (%s)" % e)
906196
def write(self, *messages):
        """"""

        for i in self.graph.outputs_of(BEGIN):
            for message in messages:
                self[i].write(message)
93599
def write_to_canvas(self, canvas, name):
        """"""

        points = self.canvas_points()
        args = []
        for point in points:
            args += list(point)
        canvas.add_polyline(
         *args, line_color=self.color(), line_style=self.linestyle(),
         line_width=self.linewidth(), name=name
        )
942302
def _write_entry_points(self, fp):
        
        entry_points = self.convert_entry_points()

        for group_name in sorted(entry_points):
            fp.write("[{}]\n".format(group_name))
            for ep in sorted(entry_points[group_name]):
                fp.write(ep.replace(" ", "") + "\n")

            fp.write("\n")
710173
def write(self, value):
        """"""
        assert self.num_write_waits > 0, self
        self.num_write_waits -= 1
        self.values.append(value)
        if self.readable:
            LOG.debug('%s is now readable', self.name)
115713
function () {
      var self = this;

      this.trajectories.forEach(function(line, index) {
        write('\u001b[' + self.scoreboardWidth + 'C');
        write(line.join(''));
        write('\n');
      });

      cursor.up(this.numberOfLines);
    }
906182
def write_lines(self, lines, level=0):
        """"""

        for line in lines:
            self.write_line(line, level)
453584
def point(self, x, y, z=0, m=0):
        """"""
        pointShape = _Shape(self.shapeType)
        pointShape.points.append([x, y, z, m])
        self._shapes.append(pointShape)
103980
def write_table(self, d):
        """"""
        self._flushbits()
        table_data = AMQPWriter()
        for k, v in items(d):
            table_data.write_shortstr(k)
            table_data.write_item(v, k)
        table_data = table_data.getvalue()
        self.write_long(len(table_data))
        self.out.write(table_data)
289982
def text(self, x, y, text):
        
        for i, char in enumerate(text):
            self.point(x + i, y, char)
517562
def update_points(self):
        
        x, y, w, h = self.x, self.y, self.w, self.h
        self.points = (x, y, x + w, y, x + w, y + h, x, y + h)
128368
def write_line(self, line, count=1):
        """"""
        self.write(line)
        self.write_newlines(count)
575148
def process(self, metric):
        

        if not mosquitto:
            return

        line = str(metric)
        topic, value, timestamp = line.split()
        if len(self.prefix):
            topic = "%s/%s" % (self.prefix, topic)
        topic = topic.replace('.', '/')
        topic = topic.replace('#', '&')     # Topic must not contain wildcards

        if self.timestamp == 0:
            self.mqttc.publish(topic, "%s" % (value), self.qos)
        else:
            self.mqttc.publish(topic, "%s %s" % (value, timestamp), self.qos)
1076690
def multipointm(self, points):
        """"""
        shapeType = MULTIPOINTM
        points = [points] # nest the points inside a list to be compatible with the generic shapeparts method
        self._shapeparts(parts=points, shapeType=shapeType)
369971
protected function write_heartbeat()
    {
        $pkt = new AMQPWriter();
        $pkt->write_octet(8);
        $pkt->write_short(0);
        $pkt->write_long(0);
        $pkt->write_octet(0xCE);
        $this->write($pkt->getvalue());
    }
583464
void writeSlot(int position, int w0, int w1, int w2, int w3)
  {
      position *= slotsize;
      int chunkpos = position >> lowbits;
      int slotpos = (position & lowmask);

    // Grow if needed
    if (chunkpos > chunks.size() - 1)
      chunks.addElement(new int[chunkalloc]);
    int[] chunk = chunks.elementAt(chunkpos);
    chunk[slotpos] = w0;
    chunk[slotpos + 1] = w1;
    chunk[slotpos + 2] = w2;
    chunk[slotpos + 3] = w3;
  }
250862
def write_data(self, data, response_required=None, timeout=5.0, raw=False):
        """"""
        if self._transport is None:
            return

        if self._paused:
            return

        if self._waiting_for_response:
            LOG.debug("queueing write %s", data)
            self._queued_writes.append((data, response_required, timeout))
            return

        if response_required:
            self._waiting_for_response = response_required
            if timeout > 0:
                self._timeout_task = self.loop.call_later(
                    timeout, self._response_required_timeout)

        if not raw:
            cksum = 256 - reduce(lambda x, y: x+y, map(ord, data)) % 256
            data = data + '{:02X}'.format(cksum)
            if int(data[0:2], 16) != len(data)-2:
                LOG.debug("message length wrong: %s", data)

        LOG.debug("write_data '%s'", data)
        self._transport.write((data + '\r\n').encode())