# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from mettler_toledo_quantos_q2_msgs/QuantosSample.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class QuantosSample(genpy.Message):
  _md5sum = "f9fe3a45ae4ba2f62c51823286634eac"
  _type = "mettler_toledo_quantos_q2_msgs/QuantosSample"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """string Substance
string LotID
string UserID
string FillingDate
string ExpiryDate
string RetestDate
string mgFillWeight
string RemainingDoses
string TerminalSNR
string BridgeSNR
string BalanceType
string BalanceID
string LastCalibration
string OptionSNR
string DoseUnitSNR
string ApplicationName
string DateTime
string LevelControl
string ProductionDateHead
string HeadType
string DoseHeadLimit
string DosesDoneHead
string mgRemainingPowderHead
"""
  __slots__ = ['Substance','LotID','UserID','FillingDate','ExpiryDate','RetestDate','mgFillWeight','RemainingDoses','TerminalSNR','BridgeSNR','BalanceType','BalanceID','LastCalibration','OptionSNR','DoseUnitSNR','ApplicationName','DateTime','LevelControl','ProductionDateHead','HeadType','DoseHeadLimit','DosesDoneHead','mgRemainingPowderHead']
  _slot_types = ['string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string','string']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       Substance,LotID,UserID,FillingDate,ExpiryDate,RetestDate,mgFillWeight,RemainingDoses,TerminalSNR,BridgeSNR,BalanceType,BalanceID,LastCalibration,OptionSNR,DoseUnitSNR,ApplicationName,DateTime,LevelControl,ProductionDateHead,HeadType,DoseHeadLimit,DosesDoneHead,mgRemainingPowderHead

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(QuantosSample, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.Substance is None:
        self.Substance = ''
      if self.LotID is None:
        self.LotID = ''
      if self.UserID is None:
        self.UserID = ''
      if self.FillingDate is None:
        self.FillingDate = ''
      if self.ExpiryDate is None:
        self.ExpiryDate = ''
      if self.RetestDate is None:
        self.RetestDate = ''
      if self.mgFillWeight is None:
        self.mgFillWeight = ''
      if self.RemainingDoses is None:
        self.RemainingDoses = ''
      if self.TerminalSNR is None:
        self.TerminalSNR = ''
      if self.BridgeSNR is None:
        self.BridgeSNR = ''
      if self.BalanceType is None:
        self.BalanceType = ''
      if self.BalanceID is None:
        self.BalanceID = ''
      if self.LastCalibration is None:
        self.LastCalibration = ''
      if self.OptionSNR is None:
        self.OptionSNR = ''
      if self.DoseUnitSNR is None:
        self.DoseUnitSNR = ''
      if self.ApplicationName is None:
        self.ApplicationName = ''
      if self.DateTime is None:
        self.DateTime = ''
      if self.LevelControl is None:
        self.LevelControl = ''
      if self.ProductionDateHead is None:
        self.ProductionDateHead = ''
      if self.HeadType is None:
        self.HeadType = ''
      if self.DoseHeadLimit is None:
        self.DoseHeadLimit = ''
      if self.DosesDoneHead is None:
        self.DosesDoneHead = ''
      if self.mgRemainingPowderHead is None:
        self.mgRemainingPowderHead = ''
    else:
      self.Substance = ''
      self.LotID = ''
      self.UserID = ''
      self.FillingDate = ''
      self.ExpiryDate = ''
      self.RetestDate = ''
      self.mgFillWeight = ''
      self.RemainingDoses = ''
      self.TerminalSNR = ''
      self.BridgeSNR = ''
      self.BalanceType = ''
      self.BalanceID = ''
      self.LastCalibration = ''
      self.OptionSNR = ''
      self.DoseUnitSNR = ''
      self.ApplicationName = ''
      self.DateTime = ''
      self.LevelControl = ''
      self.ProductionDateHead = ''
      self.HeadType = ''
      self.DoseHeadLimit = ''
      self.DosesDoneHead = ''
      self.mgRemainingPowderHead = ''

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self.Substance
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LotID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.UserID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.FillingDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ExpiryDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.RetestDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.mgFillWeight
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.RemainingDoses
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.TerminalSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BridgeSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BalanceType
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BalanceID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LastCalibration
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.OptionSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DoseUnitSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ApplicationName
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DateTime
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LevelControl
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ProductionDateHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.HeadType
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DoseHeadLimit
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DosesDoneHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.mgRemainingPowderHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.Substance = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.Substance = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LotID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LotID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.UserID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.UserID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.FillingDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.FillingDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ExpiryDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ExpiryDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.RetestDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.RetestDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.mgFillWeight = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.mgFillWeight = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.RemainingDoses = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.RemainingDoses = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.TerminalSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.TerminalSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BridgeSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BridgeSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BalanceType = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BalanceType = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BalanceID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BalanceID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LastCalibration = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LastCalibration = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.OptionSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.OptionSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DoseUnitSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DoseUnitSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ApplicationName = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ApplicationName = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DateTime = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DateTime = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LevelControl = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LevelControl = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ProductionDateHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ProductionDateHead = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.HeadType = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.HeadType = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DoseHeadLimit = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DoseHeadLimit = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DosesDoneHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DosesDoneHead = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.mgRemainingPowderHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.mgRemainingPowderHead = str[start:end]
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self.Substance
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LotID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.UserID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.FillingDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ExpiryDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.RetestDate
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.mgFillWeight
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.RemainingDoses
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.TerminalSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BridgeSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BalanceType
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.BalanceID
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LastCalibration
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.OptionSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DoseUnitSNR
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ApplicationName
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DateTime
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.LevelControl
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.ProductionDateHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.HeadType
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DoseHeadLimit
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.DosesDoneHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
      _x = self.mgRemainingPowderHead
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    if python3:
      codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.Substance = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.Substance = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LotID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LotID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.UserID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.UserID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.FillingDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.FillingDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ExpiryDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ExpiryDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.RetestDate = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.RetestDate = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.mgFillWeight = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.mgFillWeight = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.RemainingDoses = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.RemainingDoses = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.TerminalSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.TerminalSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BridgeSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BridgeSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BalanceType = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BalanceType = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.BalanceID = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.BalanceID = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LastCalibration = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LastCalibration = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.OptionSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.OptionSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DoseUnitSNR = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DoseUnitSNR = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ApplicationName = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ApplicationName = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DateTime = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DateTime = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.LevelControl = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.LevelControl = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ProductionDateHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ProductionDateHead = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.HeadType = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.HeadType = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DoseHeadLimit = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DoseHeadLimit = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.DosesDoneHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.DosesDoneHead = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.mgRemainingPowderHead = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.mgRemainingPowderHead = str[start:end]
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
