Project: engagement_generation License: BSD Dependencies:
Used by:
None |
engagement_generation/msg_gen/java/ros/pkg/bml_msgs/msg/Entity.javaGo to the documentation of this file.00001 /* Auto-generated by genmsg_java.py for file /home/mel/workspace/ros_stacks/bml/bml_msgs/msg/Entity.msg */ 00002 00003 package ros.pkg.bml_msgs.msg; 00004 00005 import java.nio.ByteBuffer; 00006 00007 public class Entity extends ros.communication.Message { 00008 static public final short OBJECT = 0; 00009 static public final short HAND = 1; 00010 static public final short FACE = 2; 00011 static public final short QUADRANT = 3; 00012 static public final short UNKNOWN = 4; 00013 static public final java.lang.String UP_LEFT = "UP_LEFT"; 00014 static public final java.lang.String UP_FRONT = "UP_FRONT"; 00015 static public final java.lang.String UP_RIGHT = "UP_RIGHT"; 00016 static public final java.lang.String STRAIGHT_LEFT = "STRAIGHT_LEFT"; 00017 static public final java.lang.String STRAIGHT_FRONT = "STRAIGHT_FRONT"; 00018 static public final java.lang.String STRAIGHT_RIGHT = "STRAIGHT_RIGHT"; 00019 static public final java.lang.String DOWN_LEFT = "DOWN_LEFT"; 00020 static public final java.lang.String DOWN_FRONT = "DOWN_FRONT"; 00021 static public final java.lang.String DOWN_RIGHT = "DOWN_RIGHT"; 00022 00023 public short type; 00024 public java.lang.String id = new java.lang.String(); 00025 00026 public Entity() { 00027 } 00028 00029 public static java.lang.String __s_getDataType() { return "bml_msgs/Entity"; } 00030 public java.lang.String getDataType() { return __s_getDataType(); } 00031 public static java.lang.String __s_getMD5Sum() { return "b906d5c02b3b1ce0c6f8a7c2a7f24b2c"; } 00032 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); } 00033 public static java.lang.String __s_getMessageDefinition() { return "#The following constants represent all possible salient objects\n" + 00034 "uint8 OBJECT=0\n" + 00035 "uint8 HAND=1\n" + 00036 "uint8 FACE=2\n" + 00037 "uint8 QUADRANT=3\n" + 00038 "uint8 UNKNOWN=4\n" + 00039 "\n" + 00040 "# Constants for the upper quadrants\n" + 00041 "string UP_LEFT=UP_LEFT\n" + 00042 "string UP_FRONT=UP_FRONT\n" + 00043 "string UP_RIGHT=UP_RIGHT\n" + 00044 "\n" + 00045 "# Constants for the middle quadrants\n" + 00046 "string STRAIGHT_LEFT=STRAIGHT_LEFT\n" + 00047 "string STRAIGHT_FRONT=STRAIGHT_FRONT\n" + 00048 "string STRAIGHT_RIGHT=STRAIGHT_RIGHT\n" + 00049 "\n" + 00050 "# Constants for the lower quadrants\n" + 00051 "string DOWN_LEFT=DOWN_LEFT\n" + 00052 "string DOWN_FRONT=DOWN_FRONT\n" + 00053 "string DOWN_RIGHT=DOWN_RIGHT\n" + 00054 "\n" + 00055 "#there is just one field for type\n" + 00056 "uint8 type\n" + 00057 "\n" + 00058 "# The id of the object\n" + 00059 "string id\n" + 00060 "\n" + 00061 ""; } 00062 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); } 00063 00064 public Entity clone() { 00065 Entity c = new Entity(); 00066 c.deserialize(serialize(0)); 00067 return c; 00068 } 00069 00070 public void setTo(ros.communication.Message m) { 00071 deserialize(m.serialize(0)); 00072 } 00073 00074 public int serializationLength() { 00075 int __l = 0; 00076 __l += 1; // type 00077 __l += 4 + id.length(); 00078 return __l; 00079 } 00080 00081 public void serialize(ByteBuffer bb, int seq) { 00082 bb.put((byte)type); 00083 Serialization.writeString(bb, id); 00084 } 00085 00086 public void deserialize(ByteBuffer bb) { 00087 type = (short)(bb.get() & 0xff); 00088 id = Serialization.readString(bb); 00089 } 00090 00091 @SuppressWarnings("all") 00092 public boolean equals(Object o) { 00093 if(!(o instanceof Entity)) 00094 return false; 00095 Entity other = (Entity) o; 00096 return 00097 type == other.type && 00098 id.equals(other.id) && 00099 true; 00100 } 00101 00102 @SuppressWarnings("all") 00103 public int hashCode() { 00104 final int prime = 31; 00105 int result = 1; 00106 long tmp; 00107 result = prime * result + this.type; 00108 result = prime * result + (this.id == null ? 0 : this.id.hashCode()); 00109 return result; 00110 } 00111 } // class Entity 00112 |