00001 """autogenerated by genmsg_py from LaneMarking.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class LaneMarking(roslib.message.Message):
00007 _md5sum = "39a90d328b8d3f3a2f63e9f13330afca"
00008 _type = "art_msgs/LaneMarking"
00009 _has_header = False
00010 _full_text = """# Route Network Definition File lane marking
00011 # $Id: LaneMarking.msg 614 2010-09-24 15:08:46Z jack.oquin $
00012
00013 int16 DOUBLE_YELLOW = 0
00014 int16 SOLID_YELLOW = 1
00015 int16 SOLID_WHITE = 2
00016 int16 BROKEN_WHITE = 3
00017 int16 UNDEFINED = 4
00018
00019 int16 lane_marking
00020
00021 """
00022
00023 DOUBLE_YELLOW = 0
00024 SOLID_YELLOW = 1
00025 SOLID_WHITE = 2
00026 BROKEN_WHITE = 3
00027 UNDEFINED = 4
00028
00029 __slots__ = ['lane_marking']
00030 _slot_types = ['int16']
00031
00032 def __init__(self, *args, **kwds):
00033 """
00034 Constructor. Any message fields that are implicitly/explicitly
00035 set to None will be assigned a default value. The recommend
00036 use is keyword arguments as this is more robust to future message
00037 changes. You cannot mix in-order arguments and keyword arguments.
00038
00039 The available fields are:
00040 lane_marking
00041
00042 @param args: complete set of field values, in .msg order
00043 @param kwds: use keyword arguments corresponding to message field names
00044 to set specific fields.
00045 """
00046 if args or kwds:
00047 super(LaneMarking, self).__init__(*args, **kwds)
00048
00049 if self.lane_marking is None:
00050 self.lane_marking = 0
00051 else:
00052 self.lane_marking = 0
00053
00054 def _get_types(self):
00055 """
00056 internal API method
00057 """
00058 return self._slot_types
00059
00060 def serialize(self, buff):
00061 """
00062 serialize message into buffer
00063 @param buff: buffer
00064 @type buff: StringIO
00065 """
00066 try:
00067 buff.write(_struct_h.pack(self.lane_marking))
00068 except struct.error, se: self._check_types(se)
00069 except TypeError, te: self._check_types(te)
00070
00071 def deserialize(self, str):
00072 """
00073 unpack serialized message in str into this message instance
00074 @param str: byte array of serialized message
00075 @type str: str
00076 """
00077 try:
00078 end = 0
00079 start = end
00080 end += 2
00081 (self.lane_marking,) = _struct_h.unpack(str[start:end])
00082 return self
00083 except struct.error, e:
00084 raise roslib.message.DeserializationError(e)
00085
00086
00087 def serialize_numpy(self, buff, numpy):
00088 """
00089 serialize message with numpy array types into buffer
00090 @param buff: buffer
00091 @type buff: StringIO
00092 @param numpy: numpy python module
00093 @type numpy module
00094 """
00095 try:
00096 buff.write(_struct_h.pack(self.lane_marking))
00097 except struct.error, se: self._check_types(se)
00098 except TypeError, te: self._check_types(te)
00099
00100 def deserialize_numpy(self, str, numpy):
00101 """
00102 unpack serialized message in str into this message instance using numpy for array types
00103 @param str: byte array of serialized message
00104 @type str: str
00105 @param numpy: numpy python module
00106 @type numpy: module
00107 """
00108 try:
00109 end = 0
00110 start = end
00111 end += 2
00112 (self.lane_marking,) = _struct_h.unpack(str[start:end])
00113 return self
00114 except struct.error, e:
00115 raise roslib.message.DeserializationError(e)
00116
00117 _struct_I = roslib.message.struct_I
00118 _struct_h = struct.Struct("<h")