Return the measurement in the line protocol format.

        :rtype: str
774061
def marshall(self):
        
        return '{},{} {} {}'.format(
            self._escape(self.name),
            ','.join(['{}={}'.format(self._escape(k), self._escape(v))
                      for k, v in self.tags.items()]),
            self._marshall_fields(),
            int(self.timestamp * 1000))
643345
def extendedMeasurementReport():
    """"""
    a = TpPd(pd=0x6)
    b = MessageType(mesType=0x36)  # 00110110
    c = ExtendedMeasurementResults()
    packet = a / b / c
    return packet
271366
def line_width(line):
    
    if six.PY2:
        assert isinstance(line, unicode)
    _line = width_cal_preprocess(line)
    result = sum(map(get_char_width, _line))
    return result
859339
def get_api_ruler(self):
        
        if self.api_ruler is None:
            try:
                self.api_ruler = \
                    autoclass('org.clulab.reach.export.apis.ApiRuler')
            except JavaException as e:
                raise ReachOfflineReadingError(e)
        return self.api_ruler
327697
def measuredim(self):
        """"""

        if isinstance(self, PartitionProxy):
            return MeasureDimensionPartition(self._obj)
        else:
            return MeasureDimensionPartition(self)
727270
def content_bytes(self):
        """"""
        get_message = \
            self._communication.needle_positions.get_line_configuration_message
        return get_message(self._line_number)
805960
def get_format_spec(self):
        '''
        
        '''
        return u"{{:{align}{width}}}".format(align=self.align, width=self.width)
1217105
def get_line_str(self):
        """"""
        if self.from_string:
            return ' '.join([s for s in [self.merge_marker_str,
                                         self._datetime_str,
                                         self._line_str] if s])
        else:
            return ' '.join([s for s in [self._datetime_str,
                                         self._line_str] if s])
498337
def lines(self) -> str:
        """"""
        if self.definition is None:
            return ''
        source = ''
        lines = self.definition.source
        offset = self.definition.start  # type: ignore
        lines_stripped = list(reversed(list(dropwhile(is_blank,
                                                      reversed(lines)))))
        numbers_width = len(str(offset + len(lines_stripped)))
        line_format = '{{:{}}}:{{}}'.format(numbers_width)
        for n, line in enumerate(lines_stripped):
            if line:
                line = ' ' + line
            source += line_format.format(n + offset, line)
            if n > 5:
                source += '        ...\n'
                break
        return source
502602
def lbnd(self):
        
        if not self.istransformed:
            return self.pst.parameter_data.parlbnd.copy()
        else:
            lb = self.pst.parameter_data.parlbnd.copy()
            lb[self.log_indexer] = np.log10(lb[self.log_indexer])
            return lb
316747
def GetStructFormatString(self):
    
    if self._data_type_definition.format == definitions.FORMAT_UNSIGNED:
      return self._FORMAT_STRINGS_UNSIGNED.get(
          self._data_type_definition.size, None)

    return self._FORMAT_STRINGS_SIGNED.get(
        self._data_type_definition.size, None)
313721
def unwrap(msmt):
    """"""

    if np.isscalar(msmt):
        return float(msmt)
    if isinstance(msmt, (Uval, Lval)):
        return msmt
    if isinstance(msmt, Textual):
        return msmt.unwrap()
    raise ValueError('don\'t know how to treat %r as a measurement' % msmt)
1272042
def readline(self, size=-1):
        
        return self._safe_call(
            True,
            super(SSLFileobjectMixin, self).readline,
            size,
        )
1267280
def means(self):
        
        mean_measure_dict = (
            self._cube_dict.get("result", {}).get("measures", {}).get("mean")
        )
        if mean_measure_dict is None:
            return None
        return _MeanMeasure(self._cube_dict, self._all_dimensions)
1347244
def measurements(self):
        
        # check if we have measurements
        mid = self.assignments.get('measurements', None)
        if mid is None:
            return_value = self.model(
                voltages=True,
                sensitivities=False,
                potentials=False,
            )
            if return_value is None:
                print('cannot model')
                return

        # retrieve measurements
        cids = self.assignments['measurements']
        measurements = np.vstack((
            self.configs.measurements[cids[0]],
            self.configs.measurements[cids[1]],
        )).T
        return measurements
500233
def data(self):
        
        return self._buf[self.offset():self.offset() + self.size()]
662080
def get_so_far(self):
        
        position = self.packet.tell()
        self.rewind()
        return self.packet.read(position)