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


class GetEntrypointRequest(genpy.Message):
  _md5sum = "10feff0d020ceb3c871bb97db52e5033"
  _type = "digitaleye_msgs/GetEntrypointRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# Returns all entry points associated to a given UAV

# agent registration of the UAV
uint64 agent_reg

"""
  __slots__ = ['agent_reg']
  _slot_types = ['uint64']

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

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

  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.agent_reg
      buff.write(_get_struct_Q().pack(_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 += 8
      (self.agent_reg,) = _get_struct_Q().unpack(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.agent_reg
      buff.write(_get_struct_Q().pack(_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 += 8
      (self.agent_reg,) = _get_struct_Q().unpack(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
_struct_Q = None
def _get_struct_Q():
    global _struct_Q
    if _struct_Q is None:
        _struct_Q = struct.Struct("<Q")
    return _struct_Q
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from digitaleye_msgs/GetEntrypointResponse.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 std_msgs.msg

class GetEntrypointResponse(genpy.Message):
  _md5sum = "7394b4d618990e3129e380d7a4cc8e04"
  _type = "digitaleye_msgs/GetEntrypointResponse"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """
# list of entry point(s)
digitaleye_msgs/UavFlightData[] flight_data


================================================================================
MSG: digitaleye_msgs/UavFlightData
# Specific flight data for a given UAV

# standard header
std_msgs/Header header

# agent registration of the UAV
uint64 agent_reg

# list of point(s) linked to msg_type
digitaleye_msgs/Flightpath flight_path

# type of flight data
uint32 msg_type


# msg_type constants

# Take off data (hover point)
uint32 TAKE_OFF=9400
# Landing data (landing point)
uint32 LANDING=9401
# Reset (no flight data associated) 
uint32 RESET=9402
# flight exiting the MGS
uint32 FLIGHT_OUT=9403
# flight entering the MGS
uint32 FLIGHT_IN=9404
# entry point data: TOLZ id
uint32 TOLZ_ENTRY=9405
# entry point data: local coordinates (meters)
uint32 COORD_ENTRY=9406

================================================================================
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: digitaleye_msgs/Flightpath
# Fligh path definition

# TOLZ id (0 = N/A)
uint32 tolz_id

# list of flight point(s)
digitaleye_msgs/Flightpoint[] flight_points

================================================================================
MSG: digitaleye_msgs/Flightpoint
# Flight point definition

# local coordinates of point (meters)
geometry_msgs/Point coord

# desired speed to reach this point (m/s)
float32 speed

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
float64 x
float64 y
float64 z
"""
  __slots__ = ['flight_data']
  _slot_types = ['digitaleye_msgs/UavFlightData[]']

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

    :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(GetEntrypointResponse, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.flight_data is None:
        self.flight_data = []
    else:
      self.flight_data = []

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

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      length = len(self.flight_data)
      buff.write(_struct_I.pack(length))
      for val1 in self.flight_data:
        _v1 = val1.header
        _x = _v1.seq
        buff.write(_get_struct_I().pack(_x))
        _v2 = _v1.stamp
        _x = _v2
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v1.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))
        _x = val1.agent_reg
        buff.write(_get_struct_Q().pack(_x))
        _v3 = val1.flight_path
        _x = _v3.tolz_id
        buff.write(_get_struct_I().pack(_x))
        length = len(_v3.flight_points)
        buff.write(_struct_I.pack(length))
        for val3 in _v3.flight_points:
          _v4 = val3.coord
          _x = _v4
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _x = val3.speed
          buff.write(_get_struct_f().pack(_x))
        _x = val1.msg_type
        buff.write(_get_struct_I().pack(_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:
      if self.flight_data is None:
        self.flight_data = None
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.flight_data = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.UavFlightData()
        _v5 = val1.header
        start = end
        end += 4
        (_v5.seq,) = _get_struct_I().unpack(str[start:end])
        _v6 = _v5.stamp
        _x = _v6
        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:
          _v5.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v5.frame_id = str[start:end]
        start = end
        end += 8
        (val1.agent_reg,) = _get_struct_Q().unpack(str[start:end])
        _v7 = val1.flight_path
        start = end
        end += 4
        (_v7.tolz_id,) = _get_struct_I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v7.flight_points = []
        for i in range(0, length):
          val3 = digitaleye_msgs.msg.Flightpoint()
          _v8 = val3.coord
          _x = _v8
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          start = end
          end += 4
          (val3.speed,) = _get_struct_f().unpack(str[start:end])
          _v7.flight_points.append(val3)
        start = end
        end += 4
        (val1.msg_type,) = _get_struct_I().unpack(str[start:end])
        self.flight_data.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:
      length = len(self.flight_data)
      buff.write(_struct_I.pack(length))
      for val1 in self.flight_data:
        _v9 = val1.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))
        _x = val1.agent_reg
        buff.write(_get_struct_Q().pack(_x))
        _v11 = val1.flight_path
        _x = _v11.tolz_id
        buff.write(_get_struct_I().pack(_x))
        length = len(_v11.flight_points)
        buff.write(_struct_I.pack(length))
        for val3 in _v11.flight_points:
          _v12 = val3.coord
          _x = _v12
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _x = val3.speed
          buff.write(_get_struct_f().pack(_x))
        _x = val1.msg_type
        buff.write(_get_struct_I().pack(_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:
      if self.flight_data is None:
        self.flight_data = None
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.flight_data = []
      for i in range(0, length):
        val1 = digitaleye_msgs.msg.UavFlightData()
        _v13 = val1.header
        start = end
        end += 4
        (_v13.seq,) = _get_struct_I().unpack(str[start:end])
        _v14 = _v13.stamp
        _x = _v14
        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:
          _v13.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v13.frame_id = str[start:end]
        start = end
        end += 8
        (val1.agent_reg,) = _get_struct_Q().unpack(str[start:end])
        _v15 = val1.flight_path
        start = end
        end += 4
        (_v15.tolz_id,) = _get_struct_I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v15.flight_points = []
        for i in range(0, length):
          val3 = digitaleye_msgs.msg.Flightpoint()
          _v16 = val3.coord
          _x = _v16
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          start = end
          end += 4
          (val3.speed,) = _get_struct_f().unpack(str[start:end])
          _v15.flight_points.append(val3)
        start = end
        end += 4
        (val1.msg_type,) = _get_struct_I().unpack(str[start:end])
        self.flight_data.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_3d = None
def _get_struct_3d():
    global _struct_3d
    if _struct_3d is None:
        _struct_3d = struct.Struct("<3d")
    return _struct_3d
_struct_Q = None
def _get_struct_Q():
    global _struct_Q
    if _struct_Q is None:
        _struct_Q = struct.Struct("<Q")
    return _struct_Q
_struct_f = None
def _get_struct_f():
    global _struct_f
    if _struct_f is None:
        _struct_f = struct.Struct("<f")
    return _struct_f
class GetEntrypoint(object):
  _type          = 'digitaleye_msgs/GetEntrypoint'
  _md5sum = '5aecbcf7a3f05b23a7227ea0206f3cfe'
  _request_class  = GetEntrypointRequest
  _response_class = GetEntrypointResponse
