00001
00002
00003 package ros.pkg.sensor_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class PointField extends ros.communication.Message {
00008 static public final short INT8 = 1;
00009 static public final short UINT8 = 2;
00010 static public final short INT16 = 3;
00011 static public final short UINT16 = 4;
00012 static public final short INT32 = 5;
00013 static public final short UINT32 = 6;
00014 static public final short FLOAT32 = 7;
00015 static public final short FLOAT64 = 8;
00016
00017 public java.lang.String name = new java.lang.String();
00018 public long offset;
00019 public short datatype;
00020 public long count;
00021
00022 public PointField() {
00023 }
00024
00025 public static java.lang.String __s_getDataType() { return "sensor_msgs/PointField"; }
00026 public java.lang.String getDataType() { return __s_getDataType(); }
00027 public static java.lang.String __s_getMD5Sum() { return "268eacb2962780ceac86cbd17e328150"; }
00028 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00029 public static java.lang.String __s_getMessageDefinition() { return "# This message holds the description of one point entry in the\n" +
00030 "# PointCloud2 message format.\n" +
00031 "uint8 INT8 = 1\n" +
00032 "uint8 UINT8 = 2\n" +
00033 "uint8 INT16 = 3\n" +
00034 "uint8 UINT16 = 4\n" +
00035 "uint8 INT32 = 5\n" +
00036 "uint8 UINT32 = 6\n" +
00037 "uint8 FLOAT32 = 7\n" +
00038 "uint8 FLOAT64 = 8\n" +
00039 "\n" +
00040 "string name # Name of field\n" +
00041 "uint32 offset # Offset from start of point struct\n" +
00042 "uint8 datatype # Datatype enumeration, see above\n" +
00043 "uint32 count # How many elements in the field\n" +
00044 "\n" +
00045 ""; }
00046 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00047
00048 public PointField clone() {
00049 PointField c = new PointField();
00050 c.deserialize(serialize(0));
00051 return c;
00052 }
00053
00054 public void setTo(ros.communication.Message m) {
00055 deserialize(m.serialize(0));
00056 }
00057
00058 public int serializationLength() {
00059 int __l = 0;
00060 __l += 4 + name.length();
00061 __l += 4;
00062 __l += 1;
00063 __l += 4;
00064 return __l;
00065 }
00066
00067 public void serialize(ByteBuffer bb, int seq) {
00068 Serialization.writeString(bb, name);
00069 bb.putInt((int)offset);
00070 bb.put((byte)datatype);
00071 bb.putInt((int)count);
00072 }
00073
00074 public void deserialize(ByteBuffer bb) {
00075 name = Serialization.readString(bb);
00076 offset = (long)(bb.getInt() & 0xffffffff);
00077 datatype = (short)(bb.get() & 0xff);
00078 count = (long)(bb.getInt() & 0xffffffff);
00079 }
00080
00081 @SuppressWarnings("all")
00082 public boolean equals(Object o) {
00083 if(!(o instanceof PointField))
00084 return false;
00085 PointField other = (PointField) o;
00086 return
00087 name.equals(other.name) &&
00088 offset == other.offset &&
00089 datatype == other.datatype &&
00090 count == other.count &&
00091 true;
00092 }
00093
00094 @SuppressWarnings("all")
00095 public int hashCode() {
00096 final int prime = 31;
00097 int result = 1;
00098 long tmp;
00099 result = prime * result + (this.name == null ? 0 : this.name.hashCode());
00100 result = prime * result + (int)(this.offset ^ (this.offset >>> 32));
00101 result = prime * result + this.datatype;
00102 result = prime * result + (int)(this.count ^ (this.count >>> 32));
00103 return result;
00104 }
00105 }
00106