00001 """autogenerated by genmsg_py from UniqueID.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class UniqueID(roslib.message.Message):
00007 _md5sum = "18ad0215778d252d8f14959901273e8d"
00008 _type = "geographic_msgs/UniqueID"
00009 _has_header = False
00010 _full_text = """# A universally unique identifier (UUID) for a geographic feature.
00011 #
00012 # http://en.wikipedia.org/wiki/Universally_unique_identifier
00013 # http://tools.ietf.org/html/rfc4122.html
00014 #
00015 # For simplicity and human readability, the UUID is represented as a
00016 # string of hex digits and dashes.
00017 #
00018 # UUID generation is up to the programmer, but the intent is for
00019 # matching features within a domain such as Open Street Map to yield
00020 # the same UUID. The recommended method is RFC 4122 variant 5,
00021 # computing the SHA-1 hash of a URL encoded using the map source. For
00022 # example:
00023 #
00024 # http://openstreetmap.org/node/NUMBER
00025 # http://openstreetmap.org/way/NUMBER
00026 # http://openstreetmap.org/relation/NUMBER
00027 #
00028 # Here NUMBER is the decimal representation of the OSM node, way, or
00029 # relation ID without leading zeros.
00030 #
00031 # Other map sources should use similar conventions.
00032
00033 string uuid # format: 01234567-89ab-cdef-0123-456789abcdef
00034
00035 """
00036 __slots__ = ['uuid']
00037 _slot_types = ['string']
00038
00039 def __init__(self, *args, **kwds):
00040 """
00041 Constructor. Any message fields that are implicitly/explicitly
00042 set to None will be assigned a default value. The recommend
00043 use is keyword arguments as this is more robust to future message
00044 changes. You cannot mix in-order arguments and keyword arguments.
00045
00046 The available fields are:
00047 uuid
00048
00049 @param args: complete set of field values, in .msg order
00050 @param kwds: use keyword arguments corresponding to message field names
00051 to set specific fields.
00052 """
00053 if args or kwds:
00054 super(UniqueID, self).__init__(*args, **kwds)
00055
00056 if self.uuid is None:
00057 self.uuid = ''
00058 else:
00059 self.uuid = ''
00060
00061 def _get_types(self):
00062 """
00063 internal API method
00064 """
00065 return self._slot_types
00066
00067 def serialize(self, buff):
00068 """
00069 serialize message into buffer
00070 @param buff: buffer
00071 @type buff: StringIO
00072 """
00073 try:
00074 _x = self.uuid
00075 length = len(_x)
00076 buff.write(struct.pack('<I%ss'%length, length, _x))
00077 except struct.error as se: self._check_types(se)
00078 except TypeError as te: self._check_types(te)
00079
00080 def deserialize(self, str):
00081 """
00082 unpack serialized message in str into this message instance
00083 @param str: byte array of serialized message
00084 @type str: str
00085 """
00086 try:
00087 end = 0
00088 start = end
00089 end += 4
00090 (length,) = _struct_I.unpack(str[start:end])
00091 start = end
00092 end += length
00093 self.uuid = str[start:end]
00094 return self
00095 except struct.error as e:
00096 raise roslib.message.DeserializationError(e)
00097
00098
00099 def serialize_numpy(self, buff, numpy):
00100 """
00101 serialize message with numpy array types into buffer
00102 @param buff: buffer
00103 @type buff: StringIO
00104 @param numpy: numpy python module
00105 @type numpy module
00106 """
00107 try:
00108 _x = self.uuid
00109 length = len(_x)
00110 buff.write(struct.pack('<I%ss'%length, length, _x))
00111 except struct.error as se: self._check_types(se)
00112 except TypeError as te: self._check_types(te)
00113
00114 def deserialize_numpy(self, str, numpy):
00115 """
00116 unpack serialized message in str into this message instance using numpy for array types
00117 @param str: byte array of serialized message
00118 @type str: str
00119 @param numpy: numpy python module
00120 @type numpy: module
00121 """
00122 try:
00123 end = 0
00124 start = end
00125 end += 4
00126 (length,) = _struct_I.unpack(str[start:end])
00127 start = end
00128 end += length
00129 self.uuid = str[start:end]
00130 return self
00131 except struct.error as e:
00132 raise roslib.message.DeserializationError(e)
00133
00134 _struct_I = roslib.message.struct_I