00001
00002
00003 package ros.pkg.sensor_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class ChannelFloat32 extends ros.communication.Message {
00008
00009 public java.lang.String name = new java.lang.String();
00010 public float[] values = new float[0];
00011
00012 public ChannelFloat32() {
00013 }
00014
00015 public static java.lang.String __s_getDataType() { return "sensor_msgs/ChannelFloat32"; }
00016 public java.lang.String getDataType() { return __s_getDataType(); }
00017 public static java.lang.String __s_getMD5Sum() { return "3d40139cdd33dfedcb71ffeeeb42ae7f"; }
00018 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00019 public static java.lang.String __s_getMessageDefinition() { return "# This message is used by the PointCloud message to hold optional data\n" +
00020 "# associated with each point in the cloud. The length of the values\n" +
00021 "# array should be the same as the length of the points array in the\n" +
00022 "# PointCloud, and each value should be associated with the corresponding\n" +
00023 "# point.\n" +
00024 "\n" +
00025 "# Channel names in existing practice include:\n" +
00026 "# \"u\", \"v\" - row and column (respectively) in the left stereo image.\n" +
00027 "# This is opposite to usual conventions but remains for\n" +
00028 "# historical reasons. The newer PointCloud2 message has no\n" +
00029 "# such problem.\n" +
00030 "# \"rgb\" - For point clouds produced by color stereo cameras. uint8\n" +
00031 "# (R,G,B) values packed into the least significant 24 bits,\n" +
00032 "# in order.\n" +
00033 "# \"intensity\" - laser or pixel intensity.\n" +
00034 "# \"distance\"\n" +
00035 "\n" +
00036 "# The channel name should give semantics of the channel (e.g.\n" +
00037 "# \"intensity\" instead of \"value\").\n" +
00038 "string name\n" +
00039 "\n" +
00040 "# The values array should be 1-1 with the elements of the associated\n" +
00041 "# PointCloud.\n" +
00042 "float32[] values\n" +
00043 "\n" +
00044 ""; }
00045 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00046
00047 public ChannelFloat32 clone() {
00048 ChannelFloat32 c = new ChannelFloat32();
00049 c.deserialize(serialize(0));
00050 return c;
00051 }
00052
00053 public void setTo(ros.communication.Message m) {
00054 deserialize(m.serialize(0));
00055 }
00056
00057 public int serializationLength() {
00058 int __l = 0;
00059 __l += 4 + name.length();
00060 __l += 4 + values.length * 4;
00061 return __l;
00062 }
00063
00064 public void serialize(ByteBuffer bb, int seq) {
00065 Serialization.writeString(bb, name);
00066 bb.putInt(values.length);
00067 for(float val : values) {
00068 bb.putFloat(val);
00069 }
00070 }
00071
00072 public void deserialize(ByteBuffer bb) {
00073 name = Serialization.readString(bb);
00074
00075 int __values_len = bb.getInt();
00076 values = new float[__values_len];
00077 for(int __i=0; __i<__values_len; __i++) {
00078 values[__i] = bb.getFloat();
00079 }
00080 }
00081
00082 @SuppressWarnings("all")
00083 public boolean equals(Object o) {
00084 if(!(o instanceof ChannelFloat32))
00085 return false;
00086 ChannelFloat32 other = (ChannelFloat32) o;
00087 return
00088 name.equals(other.name) &&
00089 java.util.Arrays.equals(values, other.values) &&
00090 true;
00091 }
00092
00093 @SuppressWarnings("all")
00094 public int hashCode() {
00095 final int prime = 31;
00096 int result = 1;
00097 long tmp;
00098 result = prime * result + (this.name == null ? 0 : this.name.hashCode());
00099 result = prime * result + java.util.Arrays.hashCode(this.values);
00100 return result;
00101 }
00102 }
00103