00001
00002
00003 package ros.pkg.std_msgs.msg;
00004
00005 import java.nio.ByteBuffer;
00006
00007 public class ColorRGBA extends ros.communication.Message {
00008
00009 public float r;
00010 public float g;
00011 public float b;
00012 public float a;
00013
00014 public ColorRGBA() {
00015 }
00016
00017 public static java.lang.String __s_getDataType() { return "std_msgs/ColorRGBA"; }
00018 public java.lang.String getDataType() { return __s_getDataType(); }
00019 public static java.lang.String __s_getMD5Sum() { return "a29a96539573343b1310c73607334b00"; }
00020 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00021 public static java.lang.String __s_getMessageDefinition() { return "float32 r\n" +
00022 "float32 g\n" +
00023 "float32 b\n" +
00024 "float32 a\n" +
00025 "\n" +
00026 ""; }
00027 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00028
00029 public ColorRGBA clone() {
00030 ColorRGBA c = new ColorRGBA();
00031 c.deserialize(serialize(0));
00032 return c;
00033 }
00034
00035 public void setTo(ros.communication.Message m) {
00036 deserialize(m.serialize(0));
00037 }
00038
00039 public int serializationLength() {
00040 int __l = 0;
00041 __l += 4;
00042 __l += 4;
00043 __l += 4;
00044 __l += 4;
00045 return __l;
00046 }
00047
00048 public void serialize(ByteBuffer bb, int seq) {
00049 bb.putFloat(r);
00050 bb.putFloat(g);
00051 bb.putFloat(b);
00052 bb.putFloat(a);
00053 }
00054
00055 public void deserialize(ByteBuffer bb) {
00056 r = bb.getFloat();
00057 g = bb.getFloat();
00058 b = bb.getFloat();
00059 a = bb.getFloat();
00060 }
00061
00062 @SuppressWarnings("all")
00063 public boolean equals(Object o) {
00064 if(!(o instanceof ColorRGBA))
00065 return false;
00066 ColorRGBA other = (ColorRGBA) o;
00067 return
00068 r == other.r &&
00069 g == other.g &&
00070 b == other.b &&
00071 a == other.a &&
00072 true;
00073 }
00074
00075 @SuppressWarnings("all")
00076 public int hashCode() {
00077 final int prime = 31;
00078 int result = 1;
00079 long tmp;
00080 result = prime * result + Float.floatToIntBits(this.r);
00081 result = prime * result + Float.floatToIntBits(this.g);
00082 result = prime * result + Float.floatToIntBits(this.b);
00083 result = prime * result + Float.floatToIntBits(this.a);
00084 return result;
00085 }
00086 }
00087