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


class GetStatusRequest(genpy.Message):
  _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
  _type = "digitaleye_msgs/GetStatusRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """"""
  __slots__ = []
  _slot_types = []

  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:
       

    :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(GetStatusRequest, self).__init__(*args, **kwds)

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

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      pass
    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
      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:
      pass
    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
      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
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from digitaleye_msgs/GetStatusResponse.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import digitaleye_msgs.msg
import geometry_msgs.msg
import sensor_msgs.msg
import std_msgs.msg

class GetStatusResponse(genpy.Message):
  _md5sum = "3debe849e7d84e1c8a45738e73fc747e"
  _type = "digitaleye_msgs/GetStatusResponse"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# DigitalEye Operating Status
digitaleye_msgs/DigitalEyeStatus status


================================================================================
MSG: digitaleye_msgs/DigitalEyeStatus
# Details of the DigitalEye’s external state,
# and the states of its subsystems

# TODO
uint32 started

# current external state of the DigitalEye
digitaleye_msgs/State digitaleye

# states of the DigitalEye’s subsystem(s)
# (DEMS, MVS , IOT, etc.) and their component(s)
digitaleye_msgs/SystemState[] subsystems

================================================================================
MSG: digitaleye_msgs/State
# Details of a system’s status

# unique identifier of the system
# whose status is being reported
uint32 id

# system’s current state within the 
# DigitalEye state machine
uint32 state

# system’s substatus within the current state,
# unique to each system
uint32 status

# description of the system’s current state/status
string description

# timestamp indicating last change in state or status
# (epoch time in sec)
uint32 lastChange

# list of performance metrics associated with the
# current state
digitaleye_msgs/Metric[] metrics

================================================================================
MSG: digitaleye_msgs/Metric
# Performance indicator for a subsystem,
# component or sensor

# name of the performance indicator
string name

# value of the performance indicator
string value

================================================================================
MSG: digitaleye_msgs/SystemState
# State of a system and its constituent subsystem(s)

# state of the system
digitaleye_msgs/State system

# list of the state(s) of the system’s constituent component(s)
digitaleye_msgs/ComponentState[] components

================================================================================
MSG: digitaleye_msgs/ComponentState
# State of a system component and its attached sensor(s)

# state of the component
digitaleye_msgs/State component

# state(s) of the component’s attached sensor(s)
digitaleye_msgs/Sensor[] sensors

================================================================================
MSG: digitaleye_msgs/Sensor
# Description of a monitoring DigitalEye sensor
# and its properties

# unique identifier of the sensor
# e.g. hardware serial number
string sensor_id

# brand/model of sensor hardware
string model

# type of sensor being described
# e.g. camera, LIDAR, etc.
uint32 type

# position of the sensor in
# the DigitalEye’s local reference frame (meters)
geometry_msgs/Pose pose

# direction in which the sensor is facing
# with respect to the local frame’s x-axis
float32 azimuth

# resolution height of the image captured by the sensor
uint32 image_width

# resolution width of the image captured by the sensor
uint32 image_height

# frame rate of a vision sensor
uint32 frame_rate

# sensor’s current power level
float32 power

# Whether or not the sensor has been calibrated
bool calibrated

# current state of the sensor
digitaleye_msgs/State state

# Sensor inertial measurements
digitaleye_msgs/IMUValue imu

================================================================================
MSG: geometry_msgs/Pose
# A representation of pose in free space, composed of position and orientation. 
Point position
Quaternion orientation

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
float64 x
float64 y
float64 z

================================================================================
MSG: geometry_msgs/Quaternion
# This represents an orientation in free space in quaternion form.

float64 x
float64 y
float64 z
float64 w

================================================================================
MSG: digitaleye_msgs/IMUValue
# Description of an IMU value reading

# Imu heading
float32 heading

# Unique identifier of the sensor
# e.g. hardware serial number
string device_id

# Imu measurements
sensor_msgs/Imu imu

# Magenetometer readings
geometry_msgs/Vector3 magnetic_field

# Imu reading of roll
float32 roll

# Imu reading of pitch
float32 pitch

# Calibration status
bool deviceCalibrated

================================================================================
MSG: sensor_msgs/Imu
# This is a message to hold data from an IMU (Inertial Measurement Unit)
#
# Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec
#
# If the covariance of the measurement is known, it should be filled in (if all you know is the 
# variance of each measurement, e.g. from the datasheet, just put those along the diagonal)
# A covariance matrix of all zeros will be interpreted as "covariance unknown", and to use the
# data a covariance will have to be assumed or gotten from some other source
#
# If you have no estimate for one of the data elements (e.g. your IMU doesn't produce an orientation 
# estimate), please set element 0 of the associated covariance matrix to -1
# If you are interpreting this message, please check for a value of -1 in the first element of each 
# covariance matrix, and disregard the associated estimate.

Header header

geometry_msgs/Quaternion orientation
float64[9] orientation_covariance # Row major about x, y, z axes

geometry_msgs/Vector3 angular_velocity
float64[9] angular_velocity_covariance # Row major about x, y, z axes

geometry_msgs/Vector3 linear_acceleration
float64[9] linear_acceleration_covariance # Row major x, y z 

================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
string frame_id

================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space. 
# It is only meant to represent a direction. Therefore, it does not
# make sense to apply a translation to it (e.g., when applying a 
# generic rigid transformation to a Vector3, tf2 will only apply the
# rotation). If you want your data to be translatable too, use the
# geometry_msgs/Point message instead.

float64 x
float64 y
float64 z"""
  __slots__ = ['status']
  _slot_types = ['digitaleye_msgs/DigitalEyeStatus']

  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:
       status

    :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(GetStatusResponse, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.status is None:
        self.status = digitaleye_msgs.msg.DigitalEyeStatus()
    else:
      self.status = digitaleye_msgs.msg.DigitalEyeStatus()

  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
      buff.write(_get_struct_4I().pack(_x.status.started, _x.status.digitaleye.id, _x.status.digitaleye.state, _x.status.digitaleye.status))
      _x = self.status.digitaleye.description
      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.status.digitaleye.lastChange
      buff.write(_get_struct_I().pack(_x))
      length = len(self.status.digitaleye.metrics)
      buff.write(_struct_I.pack(length))
      for val1 in self.status.digitaleye.metrics:
        _x = val1.name
        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 = val1.value
        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))
      length = len(self.status.subsystems)
      buff.write(_struct_I.pack(length))
      for val1 in self.status.subsystems:
        _v1 = val1.system
        _x = _v1
        buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
        _x = _v1.description
        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 = _v1.lastChange
        buff.write(_get_struct_I().pack(_x))
        length = len(_v1.metrics)
        buff.write(_struct_I.pack(length))
        for val3 in _v1.metrics:
          _x = val3.name
          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 = val3.value
          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))
        length = len(val1.components)
        buff.write(_struct_I.pack(length))
        for val2 in val1.components:
          _v2 = val2.component
          _x = _v2
          buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
          _x = _v2.description
          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 = _v2.lastChange
          buff.write(_get_struct_I().pack(_x))
          length = len(_v2.metrics)
          buff.write(_struct_I.pack(length))
          for val4 in _v2.metrics:
            _x = val4.name
            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 = val4.value
            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))
          length = len(val2.sensors)
          buff.write(_struct_I.pack(length))
          for val3 in val2.sensors:
            _x = val3.sensor_id
            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 = val3.model
            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 = val3.type
            buff.write(_get_struct_I().pack(_x))
            _v3 = val3.pose
            _v4 = _v3.position
            _x = _v4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v5 = _v3.orientation
            _x = _v5
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val3
            buff.write(_get_struct_f3IfB().pack(_x.azimuth, _x.image_width, _x.image_height, _x.frame_rate, _x.power, _x.calibrated))
            _v6 = val3.state
            _x = _v6
            buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
            _x = _v6.description
            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 = _v6.lastChange
            buff.write(_get_struct_I().pack(_x))
            length = len(_v6.metrics)
            buff.write(_struct_I.pack(length))
            for val5 in _v6.metrics:
              _x = val5.name
              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 = val5.value
              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))
            _v7 = val3.imu
            _x = _v7.heading
            buff.write(_get_struct_f().pack(_x))
            _x = _v7.device_id
            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))
            _v8 = _v7.imu
            _v9 = _v8.header
            _x = _v9.seq
            buff.write(_get_struct_I().pack(_x))
            _v10 = _v9.stamp
            _x = _v10
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v9.frame_id
            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))
            _v11 = _v8.orientation
            _x = _v11
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            buff.write(_get_struct_9d().pack(*_v8.orientation_covariance))
            _v12 = _v8.angular_velocity
            _x = _v12
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            buff.write(_get_struct_9d().pack(*_v8.angular_velocity_covariance))
            _v13 = _v8.linear_acceleration
            _x = _v13
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            buff.write(_get_struct_9d().pack(*_v8.linear_acceleration_covariance))
            _v14 = _v7.magnetic_field
            _x = _v14
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _x = _v7
            buff.write(_get_struct_2fB().pack(_x.roll, _x.pitch, _x.deviceCalibrated))
    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:
      if self.status is None:
        self.status = digitaleye_msgs.msg.DigitalEyeStatus()
      end = 0
      _x = self
      start = end
      end += 16
      (_x.status.started, _x.status.digitaleye.id, _x.status.digitaleye.state, _x.status.digitaleye.status,) = _get_struct_4I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.status.digitaleye.description = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.status.digitaleye.description = str[start:end]
      start = end
      end += 4
      (self.status.digitaleye.lastChange,) = _get_struct_I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.status.digitaleye.metrics = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.Metric()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.name = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.value = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.value = str[start:end]
        self.status.digitaleye.metrics.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.status.subsystems = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.SystemState()
        _v15 = val1.system
        _x = _v15
        start = end
        end += 12
        (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v15.description = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v15.description = str[start:end]
        start = end
        end += 4
        (_v15.lastChange,) = _get_struct_I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v15.metrics = []
        for i in range(0, length):
          val3 = digitaleye_msgs.msg.Metric()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.value = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.value = str[start:end]
          _v15.metrics.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.components = []
        for i in range(0, length):
          val2 = digitaleye_msgs.msg.ComponentState()
          _v16 = val2.component
          _x = _v16
          start = end
          end += 12
          (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v16.description = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v16.description = str[start:end]
          start = end
          end += 4
          (_v16.lastChange,) = _get_struct_I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v16.metrics = []
          for i in range(0, length):
            val4 = digitaleye_msgs.msg.Metric()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.name = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.value = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.value = str[start:end]
            _v16.metrics.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val2.sensors = []
          for i in range(0, length):
            val3 = digitaleye_msgs.msg.Sensor()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val3.sensor_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val3.sensor_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val3.model = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val3.model = str[start:end]
            start = end
            end += 4
            (val3.type,) = _get_struct_I().unpack(str[start:end])
            _v17 = val3.pose
            _v18 = _v17.position
            _x = _v18
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v19 = _v17.orientation
            _x = _v19
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val3
            start = end
            end += 21
            (_x.azimuth, _x.image_width, _x.image_height, _x.frame_rate, _x.power, _x.calibrated,) = _get_struct_f3IfB().unpack(str[start:end])
            val3.calibrated = bool(val3.calibrated)
            _v20 = val3.state
            _x = _v20
            start = end
            end += 12
            (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v20.description = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v20.description = str[start:end]
            start = end
            end += 4
            (_v20.lastChange,) = _get_struct_I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v20.metrics = []
            for i in range(0, length):
              val5 = digitaleye_msgs.msg.Metric()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              start = end
              end += length
              if python3:
                val5.name = str[start:end].decode('utf-8', 'rosmsg')
              else:
                val5.name = str[start:end]
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              start = end
              end += length
              if python3:
                val5.value = str[start:end].decode('utf-8', 'rosmsg')
              else:
                val5.value = str[start:end]
              _v20.metrics.append(val5)
            _v21 = val3.imu
            start = end
            end += 4
            (_v21.heading,) = _get_struct_f().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v21.device_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v21.device_id = str[start:end]
            _v22 = _v21.imu
            _v23 = _v22.header
            start = end
            end += 4
            (_v23.seq,) = _get_struct_I().unpack(str[start:end])
            _v24 = _v23.stamp
            _x = _v24
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v23.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v23.frame_id = str[start:end]
            _v25 = _v22.orientation
            _x = _v25
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 72
            _v22.orientation_covariance = _get_struct_9d().unpack(str[start:end])
            _v26 = _v22.angular_velocity
            _x = _v26
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            start = end
            end += 72
            _v22.angular_velocity_covariance = _get_struct_9d().unpack(str[start:end])
            _v27 = _v22.linear_acceleration
            _x = _v27
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            start = end
            end += 72
            _v22.linear_acceleration_covariance = _get_struct_9d().unpack(str[start:end])
            _v28 = _v21.magnetic_field
            _x = _v28
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _x = _v21
            start = end
            end += 9
            (_x.roll, _x.pitch, _x.deviceCalibrated,) = _get_struct_2fB().unpack(str[start:end])
            _v21.deviceCalibrated = bool(_v21.deviceCalibrated)
            val2.sensors.append(val3)
          val1.components.append(val2)
        self.status.subsystems.append(val1)
      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
      buff.write(_get_struct_4I().pack(_x.status.started, _x.status.digitaleye.id, _x.status.digitaleye.state, _x.status.digitaleye.status))
      _x = self.status.digitaleye.description
      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.status.digitaleye.lastChange
      buff.write(_get_struct_I().pack(_x))
      length = len(self.status.digitaleye.metrics)
      buff.write(_struct_I.pack(length))
      for val1 in self.status.digitaleye.metrics:
        _x = val1.name
        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 = val1.value
        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))
      length = len(self.status.subsystems)
      buff.write(_struct_I.pack(length))
      for val1 in self.status.subsystems:
        _v29 = val1.system
        _x = _v29
        buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
        _x = _v29.description
        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 = _v29.lastChange
        buff.write(_get_struct_I().pack(_x))
        length = len(_v29.metrics)
        buff.write(_struct_I.pack(length))
        for val3 in _v29.metrics:
          _x = val3.name
          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 = val3.value
          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))
        length = len(val1.components)
        buff.write(_struct_I.pack(length))
        for val2 in val1.components:
          _v30 = val2.component
          _x = _v30
          buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
          _x = _v30.description
          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 = _v30.lastChange
          buff.write(_get_struct_I().pack(_x))
          length = len(_v30.metrics)
          buff.write(_struct_I.pack(length))
          for val4 in _v30.metrics:
            _x = val4.name
            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 = val4.value
            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))
          length = len(val2.sensors)
          buff.write(_struct_I.pack(length))
          for val3 in val2.sensors:
            _x = val3.sensor_id
            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 = val3.model
            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 = val3.type
            buff.write(_get_struct_I().pack(_x))
            _v31 = val3.pose
            _v32 = _v31.position
            _x = _v32
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v33 = _v31.orientation
            _x = _v33
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val3
            buff.write(_get_struct_f3IfB().pack(_x.azimuth, _x.image_width, _x.image_height, _x.frame_rate, _x.power, _x.calibrated))
            _v34 = val3.state
            _x = _v34
            buff.write(_get_struct_3I().pack(_x.id, _x.state, _x.status))
            _x = _v34.description
            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 = _v34.lastChange
            buff.write(_get_struct_I().pack(_x))
            length = len(_v34.metrics)
            buff.write(_struct_I.pack(length))
            for val5 in _v34.metrics:
              _x = val5.name
              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 = val5.value
              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))
            _v35 = val3.imu
            _x = _v35.heading
            buff.write(_get_struct_f().pack(_x))
            _x = _v35.device_id
            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))
            _v36 = _v35.imu
            _v37 = _v36.header
            _x = _v37.seq
            buff.write(_get_struct_I().pack(_x))
            _v38 = _v37.stamp
            _x = _v38
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v37.frame_id
            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))
            _v39 = _v36.orientation
            _x = _v39
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            buff.write(_v36.orientation_covariance.tostring())
            _v40 = _v36.angular_velocity
            _x = _v40
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            buff.write(_v36.angular_velocity_covariance.tostring())
            _v41 = _v36.linear_acceleration
            _x = _v41
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            buff.write(_v36.linear_acceleration_covariance.tostring())
            _v42 = _v35.magnetic_field
            _x = _v42
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _x = _v35
            buff.write(_get_struct_2fB().pack(_x.roll, _x.pitch, _x.deviceCalibrated))
    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:
      if self.status is None:
        self.status = digitaleye_msgs.msg.DigitalEyeStatus()
      end = 0
      _x = self
      start = end
      end += 16
      (_x.status.started, _x.status.digitaleye.id, _x.status.digitaleye.state, _x.status.digitaleye.status,) = _get_struct_4I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.status.digitaleye.description = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.status.digitaleye.description = str[start:end]
      start = end
      end += 4
      (self.status.digitaleye.lastChange,) = _get_struct_I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.status.digitaleye.metrics = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.Metric()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.name = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.value = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.value = str[start:end]
        self.status.digitaleye.metrics.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.status.subsystems = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.SystemState()
        _v43 = val1.system
        _x = _v43
        start = end
        end += 12
        (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v43.description = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v43.description = str[start:end]
        start = end
        end += 4
        (_v43.lastChange,) = _get_struct_I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v43.metrics = []
        for i in range(0, length):
          val3 = digitaleye_msgs.msg.Metric()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.value = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.value = str[start:end]
          _v43.metrics.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.components = []
        for i in range(0, length):
          val2 = digitaleye_msgs.msg.ComponentState()
          _v44 = val2.component
          _x = _v44
          start = end
          end += 12
          (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v44.description = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v44.description = str[start:end]
          start = end
          end += 4
          (_v44.lastChange,) = _get_struct_I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v44.metrics = []
          for i in range(0, length):
            val4 = digitaleye_msgs.msg.Metric()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.name = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.value = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.value = str[start:end]
            _v44.metrics.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val2.sensors = []
          for i in range(0, length):
            val3 = digitaleye_msgs.msg.Sensor()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val3.sensor_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val3.sensor_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val3.model = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val3.model = str[start:end]
            start = end
            end += 4
            (val3.type,) = _get_struct_I().unpack(str[start:end])
            _v45 = val3.pose
            _v46 = _v45.position
            _x = _v46
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v47 = _v45.orientation
            _x = _v47
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val3
            start = end
            end += 21
            (_x.azimuth, _x.image_width, _x.image_height, _x.frame_rate, _x.power, _x.calibrated,) = _get_struct_f3IfB().unpack(str[start:end])
            val3.calibrated = bool(val3.calibrated)
            _v48 = val3.state
            _x = _v48
            start = end
            end += 12
            (_x.id, _x.state, _x.status,) = _get_struct_3I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v48.description = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v48.description = str[start:end]
            start = end
            end += 4
            (_v48.lastChange,) = _get_struct_I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v48.metrics = []
            for i in range(0, length):
              val5 = digitaleye_msgs.msg.Metric()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              start = end
              end += length
              if python3:
                val5.name = str[start:end].decode('utf-8', 'rosmsg')
              else:
                val5.name = str[start:end]
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              start = end
              end += length
              if python3:
                val5.value = str[start:end].decode('utf-8', 'rosmsg')
              else:
                val5.value = str[start:end]
              _v48.metrics.append(val5)
            _v49 = val3.imu
            start = end
            end += 4
            (_v49.heading,) = _get_struct_f().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v49.device_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v49.device_id = str[start:end]
            _v50 = _v49.imu
            _v51 = _v50.header
            start = end
            end += 4
            (_v51.seq,) = _get_struct_I().unpack(str[start:end])
            _v52 = _v51.stamp
            _x = _v52
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v51.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v51.frame_id = str[start:end]
            _v53 = _v50.orientation
            _x = _v53
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 72
            _v50.orientation_covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
            _v54 = _v50.angular_velocity
            _x = _v54
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            start = end
            end += 72
            _v50.angular_velocity_covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
            _v55 = _v50.linear_acceleration
            _x = _v55
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            start = end
            end += 72
            _v50.linear_acceleration_covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
            _v56 = _v49.magnetic_field
            _x = _v56
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _x = _v49
            start = end
            end += 9
            (_x.roll, _x.pitch, _x.deviceCalibrated,) = _get_struct_2fB().unpack(str[start:end])
            _v49.deviceCalibrated = bool(_v49.deviceCalibrated)
            val2.sensors.append(val3)
          val1.components.append(val2)
        self.status.subsystems.append(val1)
      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
_struct_2I = None
def _get_struct_2I():
    global _struct_2I
    if _struct_2I is None:
        _struct_2I = struct.Struct("<2I")
    return _struct_2I
_struct_2fB = None
def _get_struct_2fB():
    global _struct_2fB
    if _struct_2fB is None:
        _struct_2fB = struct.Struct("<2fB")
    return _struct_2fB
_struct_3I = None
def _get_struct_3I():
    global _struct_3I
    if _struct_3I is None:
        _struct_3I = struct.Struct("<3I")
    return _struct_3I
_struct_3d = None
def _get_struct_3d():
    global _struct_3d
    if _struct_3d is None:
        _struct_3d = struct.Struct("<3d")
    return _struct_3d
_struct_4I = None
def _get_struct_4I():
    global _struct_4I
    if _struct_4I is None:
        _struct_4I = struct.Struct("<4I")
    return _struct_4I
_struct_4d = None
def _get_struct_4d():
    global _struct_4d
    if _struct_4d is None:
        _struct_4d = struct.Struct("<4d")
    return _struct_4d
_struct_9d = None
def _get_struct_9d():
    global _struct_9d
    if _struct_9d is None:
        _struct_9d = struct.Struct("<9d")
    return _struct_9d
_struct_f = None
def _get_struct_f():
    global _struct_f
    if _struct_f is None:
        _struct_f = struct.Struct("<f")
    return _struct_f
_struct_f3IfB = None
def _get_struct_f3IfB():
    global _struct_f3IfB
    if _struct_f3IfB is None:
        _struct_f3IfB = struct.Struct("<f3IfB")
    return _struct_f3IfB
class GetStatus(object):
  _type          = 'digitaleye_msgs/GetStatus'
  _md5sum = '3debe849e7d84e1c8a45738e73fc747e'
  _request_class  = GetStatusRequest
  _response_class = GetStatusResponse
